Reference http://www.sucaihuo.com/js/74.html
<script src= "Scripts/blocksit.min.js" ></script>
12345678 |
<
div
id="container">
<
div
class="grid">
<!-- content -->
</
div
>
<
div
class="grid">
<!-- content -->
</
div
>
</
div
>
|
$ (document). Ready (function () {//blocksit define $ (window). Load (function () {$ (' #container '). Blocksit ({numofcol:5,//Emissions offsetx:0,//Transverse distance offsety:0,//longitudinal distance Blockel Ement: '. Grid '//Waterfall Stream box}); }); Window resize var currentwidth = 1100; $ (window). Resize (function () {var winwidth = $ (window). width (); var conwidth; if (Winwidth < 660) {conwidth = 300; Col = 1} else if (Winwidth < 880) {conwidth = 660; Col = 2} else if (Winwidth < 1100) {conwidth = 880; col = 3; } else {conwidth = 1100; col = 5; } if (conwidth! = currentwidth) {currentwidth = Conwidth; $ (' #container '). Width (conwidth); $ (' #container '). Blocksit ({numofcol:col, offsetx:0, offsety:0}); } });});
jquery Super cool responsive waterfall flow effect