Need help to fix a script with dynamic content -


i can't figure out why not working. i'm trying different div tags have different text content in cycle loop.

<script type="text/javascript"> var text1 = ['foo', 'bar', 'baz']; var i1 = 0, var text2 = ['hug', 'kiss001', 'bank22']; var i2 = 0, $(document).ready(function() {     setinterval(function (){             $("#div1").fadeout(function ()         {             $("#div1").text(text[i1++ % text1.length]).fadein();         });     }, 1000);     setinterval(function (){         $("#div2").fadeout(function ()         {             $("#div2").text(text[i2++ % text2.length]).fadein();         });     }, 1000); }); </script> 
<div id="div1"><div>   <div id="div2"><div>  

seems bunch of syntax errors (text instead of text1/text2, no closing /div, etc. works fine here: http://jsbin.com/obaqi4/3


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -