Grid-a-licious is a responsive waterfall streaming plugin that adheres to the MIT protocol. The total code line of the plug-in is no more than 400 lines, the implementation is very clever, the use is also very smooth. The implementation principle is also very simple, according to the width of the screen and the width of the column set in the parameters and the width of the interval between each item, the calculation of the current screen width should generate a few equal-width columns, the column is generated, then put each item in the Equal width column, when the screen size changes, the list is recalculated, and then re
It is also convenient to use the plugin. Usage examples:
Plug-in default parameters:
{ selector: '. Item ',//Set the class name of each item in the waterfall stream width:225,//Set the width of the wide column, default 225, note that the following do not add "px" gutter:20,//Set no entry in the waterfall stream The interval, default 20, note the following do not add "px" animate:false, //Set the animation effect to generate waterfall stream, the default no animation effect animationoptions: { //Animation effect control options speed:200, duration:300, effect: ' fadeinonappear ',//Current animation effect Queue:true, comple Te:function () {}//callback After completion of animation }}
The parameters above are optional.
Plug-in effect instance http://suprb.com/apps/gridalicious/
Plugin Source Download https://github.com/suprb/Grid-A-Licious
Responsive waterfall Stream Plug-in grid-a-licious