0

All the samples shown for Lazyload have pre-determined number of elements to be displayed using lazyload, please see here.

Say if I don't know the number of elements beforehand, how to design at html side to implement in Lazyload.

More precizely, I have a gridview as shown in this fiddle. That fiddle sample has eight <li> html elements.

I am working to load all data using Lazyload with horizontal scrolling. Say if the data is fed from a database at server using Json without knowing the number of grid elements beforehand, how can prepare at html side?

For example, this fiddle has predefined 2 x 4 grid elements. But if 2 x N is the status till I receive Json from server. Then I know exactly what is N value after receiving the Json, may be 2 x 50 or 2 x 100 or 2 x 10000.

For that case, how can I implement in html side so that I can load all images using Lazyload and horizontal scrolling?

batuman
  • 7,066
  • 26
  • 107
  • 229
  • I research around and found that , according to this link (http://stackoverflow.com/questions/27258880/changing-css-content-property-dynamically), I can change CSS content dynamically. So I use AJAX to query the size of images and returned with Json. Then according to the size, I can change the CSS content dynamically and refresh the page. I think I can do that way. – batuman Jan 24 '16 at 04:34
  • Will update if successfully implemented. – batuman Jan 24 '16 at 04:46

0 Answers0