image - Jquery slider setinterval not working. -


what problem code?
actually, trying implement simple image slider on html page, got error on setinterval function, cant find it. try find out error console cant.

<script>          function slider(){            $(".slider #1").show("fade" , 500);            $(".slider #1").delay(5500).hide("slide",{direction:"left"},500);        var sc = $(".slider img").size();       var count = 2;        setinterval(function(){          $(".slider #"=count).show("slide",{direction:"right"},500);          $(".slider #"=count).delay(5500).hide("slide",{direction:"left"},500);           if(count == sc){              count = 1;           }else{              count = count+1;          }       },5500);         }          </script>    </head>     <body onload="slider()">            <div class="slider" >             <img id="1" src="images/slider1.jpg" border="0" alt="slider1">             <img id ="2" src="images/slider2.jpg" border="0" alt="slider2">             <img id ="3" src="images/slider3.jpg" border="0" alt="slider3">             <img id ="4" src="images/slider4.jpg" border="0" alt="slider4">         </div>         <div class="clear"></div>     </body> 

console error is: referenceerror: invalid assignment left-hand side

thanks.

you have =count should have + count.

$(".slider #" + count).show("slide",{direction:"right"},500); 

same other line(s).


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -