Horizontally organised dynamic grid with CSS and jQuery -


the title bit misleading, not find more fitting title.

i'm intensively working images on website , loading more 50 of them slows things down. wanted use lazyload delay load of images not yet in view port, however, layout not make possible.

i have images right after each other: <div id="container"><img ..><img ..><img ..></div>and use css organise them separate columns. (to absolutely correct, images in divs well: <div class="pin"><img ..></div>

here's css thing.

#container {   width:100%;   padding:2px 2px 2px 2px;    column-count:7;   -webkit-column-count:7;   -moz-column-count:7;   -ms-column-count:7;   -o-column-count:7;    column-gap:2px;   -webkit-column-gap:2px;   -moz-column-gap:2px;   -ms-column-gap:2px;   -o-column-gap:2px;    column-fill:balance;   -webkit-column-fill:balance;   -moz-column-fill:balance;   -ms-column-fill:balance;   -o-column-fill:balance; }  .pin {   display:block;   width:100%;   column-break-inside:avoid;   -webkit-column-break-inside:avoid;   -moz-column-break-inside:avoid;   -ms-column-break-inside:avoid;   -o-column-break-inside:avoid; } 

my issue is, way top-left pin first pin inside container , next pin under it, not next it. lazyload script load first first, , 1 under it, while first pin of second column not loaded.. not until scroll down bottom of container, let pins in first column load , start loading pins in second column. there option in lazylaod load things in specific container, however, if i'd have 100 pins inside container (from which, many outside view port), lazylaod load them @ same time... option designed smaller containers.

my question is: (first) there way organise pins css second pin not under first in first column, top in second column? if not, have suggestion on how solve dilemma?

(mainly, im interested in conceptual ideas first , not other, ready-to-use grid script.. if there no other way i'd use script, since case have lot redo..)

thanks!


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -