Please help me a little - jquery Slide show
I made a simple slide show using jquery and "setInterval() " function.
Everything working fine but I just need to start this serInterval function only after the div or page loads completely.
I will post my code here ...
- $(document).ready(function () {
- var s=setInterval('slide()',3000);
- });
- function slide(){
- var pos=$("#slider").position().left;
- if(pos>-5400){
- $("#slider").animate({"left":"-=600px"},300);
- }else
- $("#slider").animate({"left":"0px"},600);
- }
- }
and my html page
- <div id="imgContainer" style="width:600px;height:350px;float:left;border:3px solid #353E4D;position:relative;overflow:hidden;">
- <div id="slider" style="height:350px;float:left;width:6000px;position:absolute;left:0;"><img src="images/one.jpg" width="600" height="350" title="1" /><img src="images/two.jpg" width="600" height="350" title="2" /><img src="images/three.jpg" width="600" height="350" /><img src="images/four.jpg" width="600" height="350" /><img src="images/five.jpg" width="600" height="350" /><img src="images/six.jpg" width="600" height="350" /><img src="images/seven.jpg" width="600" height="350" /><img src="images/eight.jpg" width="600" height="350" /><img src="images/nine.jpg" width="600" height="350" /><img src="images/ten.jpg" width="600" height="350" /></div>
- </div>
Friends Please go through this and help me. I tried to give a pre loader . But can't
Please help
Thanks in advance
Rajeesh