0

Wondering if I have a dynamic list of image data, whether there's any libraries or techniques out there to tile the list of data. Keep in mind I don't know a priori how long the list is, but let's say that it is at least one (tile) row's worth of elements.

e.g. something like this enter image description here

Michael
  • 7,087
  • 21
  • 52
  • 81
  • possible duplicate of [Google+ style tiled photo gallery](http://stackoverflow.com/questions/8950842/google-style-tiled-photo-gallery) – Ben Oct 14 '13 at 03:57

1 Answers1

0

I would make a grid, or pre-built table that has one row, and how ever many images acrross you want. Then when you get your images, get a count, and dynamically add rows, using the index of the image placing it into the index of the cell/td. Would be a good route, until you maybe find a library for it if there is one. Though, sometimes, if it isn't a huge "reinventing the wheel" type of snippet, there are some benefits to writing your own code for it. :) Hopefully that helps.

By the way, jQuery Masonary, and Responsive Photo Grid are some libraries you could look into to. Here is a related post for you:Mosaic Grid gallery with dynamic sized images

Community
  • 1
  • 1
Casey ScriptFu Pharr
  • 1,672
  • 1
  • 16
  • 36
  • One more great library to have a look at is Isotope - http://isotope.metafizzy.co/ – Pavel Oct 14 '13 at 03:57
  • I just posted one. A quick google search showed this on the return from a stack conversation. I just have never needed to use this style, so wasn't aware of a library off hand. – Casey ScriptFu Pharr Oct 14 '13 at 03:57
  • After looking into these, I think I might write one, and put my current project on hold. Though, I feel my current project would be very useful. A problem that comes up a lot, so I don't know... Post how the library works for you, to follow up if you don't mind! – Casey ScriptFu Pharr Oct 14 '13 at 04:05