Grouping images to make thumbnail pages.
Hello I looked all over the forum, but can't figure it out.
I would like to place every n-th element in a div.
change this html
- <div id="container">
- <img />
- <img />
- <img />
- <img />
- <img />
- <img />
- </div>
into this:
- <div id="container">
- <div>
- <img />
- <img />
- <img />
- </div>
- <div>
- <img />
- <img />
- <img />
- </div>
- </div>
Can anyone help me with the jquery code?
Thanks.