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 ?