JQuery infinite animation -


i try infinite jquery animation, this, 1 animation , stop.... try use settimeout resolve didn't work. know why?

<div class="row">     <div id="homeanimation">         <div id="a">soins</div>         <div id="b">formation</div>         <div id="c">contact</div>     </div> </div> 

function anim( selector, firstdelay) { console.log(selector); $(selector).animate({     'margin-left':'100%' }, 0).delay(firstdelay) .animate({             'margin-left': '50%',             'transform: scale':'2'         }, 1000).delay(2000)         .animate({             'margin-left': '-7%',             'transform: scale':'1'         }, 1000);         return;     }     settimeout( anim("#homeanimation #a", 0 * 8000), 10000);     settimeout( anim("#homeanimation #b", 1 * 8000), 10000);     settimeout( anim("#homeanimation #c", 2 * 8000), 10000);` 

i made infinite:

function anim( selector, firstdelay) {     console.log(selector);     $(selector).animate({         'margin-left':'100%'     }, 0).delay(firstdelay)     .animate({                 'margin-left': '50%',                 'transform: scale':'2'             }, 1000).delay(2000)             .animate({                 'margin-left': '-7%',                 'transform: scale':'1'             }, 1000);             return;         }         settimeout( anim("#homeanimation #a", 0 * 8000), 100000);         settimeout( anim("#homeanimation #b", 1 * 8000), 100000);         settimeout( anim("#homeanimation #c", 2 * 8000), 100000); 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -