Problem with creating a simple jquery slide show - .append() method is too slow!!

Problem with creating a simple jquery slide show - .append() method is too slow!!

Hello,

i have created a simple jquery slideshow on a webpage.
In that webpage i use php and i have a relational db,too.

I use append in order to show the images and
i notice that append is too slow!

I have a div which consists of  "href" . Every href is a link to an image.
Also, i use .append()

The code is as follows:


  1. <html>
  2. <head><title>SImple Jquery slide show - TEST</title></head>
  3. <body>
  4.           
  5.             <div class="div_photos">
  6.                   //photos are shown here, by using append
  7.             </div>

  8.             <div class="LinksForImages">
  9.                   // List of Links of my images
  10.                   <a href="photos/img1">1</a>
  11.                   <a href="photos/img2">2</a>
  12.                   <a href="photos/img3">3</a>
  13.                   <a href="photos/img4">4</a>
  14.                   <a href="photos/img5">5</a>
  15.             </div>
  16.             <script type="text/javascript" src="jquery.js"></script>
  17.             <script type="text/javascript">
  18.             $(document).ready(function() {
  19.                                   $(".LinksForImages a").click(function () {   
                                                                         $(".div_photos img").hide();
                                                                          var attr_href = $(this).attr('href');
                                                                         // alert(attr_href);
                                                                          $(".div_photos").append('<img src="'+attr_href+'"   style="border:1px solid yellow"').;
                                                                          return false;             // used for href links
                                                                          });





  20.                                                       });
  21.             </script>
  22. </body>
  23. </html>

The problem is with append, it's too slow!!!
Also, the div "LinksForImages" is being created by using a php function

  1. <div class="LinksForImages">

  2.                   // List of Links of my images

  3.                   <a href="photos/img1">1</a>
  4.                   <a href="photos/img2">2</a>
  5.                   <a href="photos/img3">3</a>
  6.                   <a href="photos/img4">4</a>
  7.                   <a href="photos/img5">5</a>
  8.             </div>

Is there any better and faster way to use in order to create a simple jquery slide show instead of using .append()??
Cause, .append() appears to be slow and the user can understand that.

Thanks, in advance!