Find the first ten images on a page

Find the first ten images on a page

Hi,

I'm trying to create a dynamic image gallery in my wordpress blog and I have successfully managed to collect the images in the blog posts and clone them and wrap them in the right tags etc. This is to make a jquery script that someone else wrote work in my blog.

My problem is that I only want to collect and clone 10 images. So how do I make it stop after 10 images? I am completely new at Jquery and it's amazing that I've got this far. :)

Here is my code without even trying to only get 10 images. This code returns all images on the page.

  1. <script type="text/javascript">

    jQuery(function ($) {
            $('.entry p a').clone().appendTo('#roundrr_container').wrapAll("<ul class='list'></ul>");
            $("#roundrr_container a img").parent("a[href*=threefacesinone]").wrap("<li class='item' />");
            $("#roundrr_container a img").parent("a[href*=threefacesinone]").wrap("<div class='my_class' />");
    });

    </script>