(updated)
I want to change the following,
<div id="system">
<div id="product_cont img">
<img src="image1.jpg" />
<img src="image2.jpg" />
<img src="image3.jpg" />
..
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nunc porta euismod luctus. Curabitur vehicula scelerisque diam at vestibulum.
Pellentesque in lacus et augue malesuad.
</div>
</div>
to like this.
<div id="system">
<div id="product_cont img">
<ul class="cont_thumb">
<li><img src="image1.jpg" /></li>
<li><img src="image2.jpg" /></li>
<li><img src="image3.jpg" /></li>
...
</ul>
<div style="clear:both;"></div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nunc porta euismod luctus. Curabitur vehicula scelerisque diam at vestibulum.
Pellentesque in lacus et augue malesuad
</div>
</div>
When I use the following I can wrap images with <li>
and <ul>
.
$("#system #product_cont img").wrapAll("<ul class=\"cont_thumb\">").wrap("<li>");
But I am not sure how to add this after the </ul>
tag with jquery:
<div style="clear:both;"></div>
I tried this, but it didn't work:
$("#system #product_cont img").wrapAll("<ul class=\"cont_thumb\">").wrap("<li>").after('<div style="clear:both;"></div>');
Could anyone help me please? Thanks in advance.