JQuery Wookmark Load waterfall stream layout example demonstration, jquerywookmark

Source: Internet
Author: User
Tags php server

JQuery Wookmark Load waterfall stream layout example demonstration, jquerywookmark

Waterfall stream layout is very suitable for displaying a large number of images. When you change the layout of a cropped image in a uniform size, each image can be displayed completely and displayed in a different way.

  • Version:
  • JQuery v1.4.3 +
  • JQuery Wookmark Load v1.4.8
  • Note:
  • The width and height attributes of the img element in the project must be written; otherwise, the positioning will be inaccurate. (You can use JavaScript to obtain the width and height of an image in real time, but it is unreliable if there are too many images .)

  • Github

Online instance

Basic Example of instance preview Example

Instance preview AMD Loader

Instance preview Endless scroll unlimited scrolling

Instance preview Flexible width elastic Layout

Instance preview Lightbox supports the light window plug-in

Instance preview Load it all dynamic read image size

Instance preview Placeholders at the bottom of Placeholders

Instance preview PHP server PHP loading data

Instance preview Remote API load data

Instance preview Filtering Or Filtering

Instance preview Filtering And Filtering

Instance preview Filtering Only Filtering

Instance preview Filtering Fade Filtering

Basic example of instance preview sorting

Basic example of instance preview stamping

How to load JavaScript files
  1. <script src="jquery.js"></script> 
  2. <script src="jquery.wookmark.js"></script>
Copy CSS styles
  1. /* 
  2. * Parent container needs to set relative positioning
  3. * The project needs to be hidden.
  4.  */ 
  5. #list{position:relative;} 
  6. #list li{display:none;} 
Copy the DOM Structure
  1. <!-- 
  2. In this example, $ ("# list") is the parent container, and the internal li is the project for waterfall flow layout. Of course, you can also use div or other labels to write.
  3. The width and height attributes of the img element in the project must be written; otherwise, the positioning will be inaccurate.
  4. --> 
  5. <ul id="list"> 
  6.   <li><p>text</p></li> 
  7.   <li><p>text</p></li> 
  8.   ... 
  9.   <li><p>text</p></li> 
  10. </ul> 
Copy and call Wookmark
  1. $('#list li').wookmark(); 
  2.  
  3. // Call custom Parameters
  4. $('#list li').wookmark({ 
  5.   container: $('#list'), 
  6.   offset: 10, 
  7.   itemWidth: 200 
  8. }); 
Manually trigger layout events by copying
  1. // You can manually trigger re-layout as needed
  2. $('#list').trigger('refreshWookmark');
Copy parameter description
Name Default Value Description
Container $ ('Body ') Parent container. You need to set the CSS attribute "position: relative" for the parent container during customization ".
Align 'Center' Alignment direction, which can be set to "left", "right", and "center ".
Direction Undefined Sorting direction. Can be set to: "left" (from left to right), "right" (from right to left)

If this parameter is not set, when align is set to "right", direction is "right"; otherwise, the default value is "left ".

AutoResize False Whether to re-layout when the browser window size changes.
ResizeDelay 50 Detects the interval (MS) for automatic relayout ).
ItemWidth 0 The width of the list item (px or % ).
FlexibleWidth 0 The maximum adaptive width of the list item. When this item is set, the value of itemWidth serves as the minimum width of the list item.
Offset 2 The spacing (px) of the list items.
VerticalOffset Undefined The Vertical spacing (px) of the list items. The horizontal and vertical spacing can be set in combination with the offset.
OuterOffset 0 The outer spacing between the container and the parent container.
IgnoreInactiveItems True Whether to hide filtered items.
FillEmptySpace False Whether to fill in the placeholder at the bottom. The placeholder class is "wookmark-placeholder ".
Comparator Null Custom sorting method.
PossibleFilters []  
OnLayoutChanged Undefined The function that is triggered when the layout changes.
Download

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.