Jump to content

New at this


raptor30506090

Recommended Posts

Hi guys new at this when the slide comes to the last image how do i make it go back to the first one cheers

 

<div id="holder">

<div id="box">
             <div class="1"><img src="test_image/1.jpg" width="520" height="248"></div>
             <div class="2"><img src="test_image/2.gif" width="520" height="248"></div>
             <div class="3"><img src="test_image/3.jpg" width="520" height="248"></div>
             <div class="4"><img src="test_image/4.jpg" width="520" height="248"></div>
             <div class="5"><img src="test_image/5.gif" width="520" height="248"></div>
             </div>



<span><button id="left">«</button><button id="right">»</button></span>
<div id="clear"></div>
</div>

<script type="text/javascript">
$("#left").click(function(){
                                                    
                        $("#box").stop().animate({"left": "+=520px"}, "slow");

						});

$("#right").click(function(){
                            $("#box").animate({"left": "-=520px"}, "slow");
						});
</script>

Link to comment
https://forums.phpfreaks.com/topic/265881-new-at-this/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.