How to add images to image gallery?
My gallery is structured like:
- <div id="gallery">
- <div class="galleryRow">
- <div class="uPic">
- <img />
- <p> description </p>
- </div>
- </div>
- </div>
I want to generate this thing entirely from data fetched from db. Each #galleryRow can have 4 .uPic -s, after that, I need to add another galleryRow and add pictures inside it, and so on.... Now I have never touched ajax in jQuery and I don't know how to do this in code.... I know I can add list items or predefined divs using append(), and for things like this, I can use clone()....but frankly speaking, I have no idea how to handle this structure. Please help me.