1

Possible Duplicate:
jQuery/Ajax : image slider

I'm new on Jquery but what I would like is to create a simple slider that load images with Ajax.

  • how to create a loop
  • how to set loop time speed
  • how to load an image with Ajax request

Suppose I have an index.php with this:

<div id="output"></div>

 <script type="text/javascript">
    //<![CDATA[

    jQuery(document).ready(function($) {

        $.ajax({
            type: "POST",
            url: "<?php echo $this->getUrl('somewhere/index/testajax') ?>",
            data: "id=1",
            success: function(response){
                $("#output").html(response);
            }
        });
    });
    //]]>

How can I create a loop that replicate the AJAX call ?

Community
  • 1
  • 1
WonderLand
  • 5,494
  • 7
  • 57
  • 76
  • 1
    It is not as simple as you think. you need to preload the images. why wont you use a ready made plugin? there are zillions of these out there. – Rafael Herscovici Oct 08 '12 at 12:17
  • 1
    why you want to create custom one ,when there are tons of free plugins available – Buzz Oct 08 '12 at 12:18
  • Duplicates: http://stackoverflow.com/questions/3949913/jquery-simple-image-slider-w-ajax http://stackoverflow.com/questions/5628108/simplest-ajax-photo-gallery http://stackoverflow.com/questions/7252497/jquery-ajax-image-slider – Rafael Herscovici Oct 08 '12 at 12:19
  • I want to create one plugin as I'd like to learn use jquery – WonderLand Oct 08 '12 at 12:48

0 Answers0