jQuery how to stop diagonaly animation after ONE mouseenter? -


$(document).ready(function(){   $(".glavna").mouseenter(function(){     $(".ocenjevanje").animate({right:"+=440", bottom:"+=20"},1000);     $(".svetovanje").animate({right:"+=440", top:"+140"},1000);     $(".onas").animate({left:"+=440", top:"+160"},1000);     $(".infotocka").animate({left:"+=440", bottom:"+3"},1000);   }); }); 

so every time put mouse on main card (glavna) others cards move side. how can make apply 1 time? want move on main card, other cards move side , stay there. how can achive this?

try this:

var flag=true; $(document).ready(function(){    $(".glavna").mouseenter(function(){       if(flag)       {          $(".ocenjevanje").animate({right:"+=440", bottom:"+=20"},1000);          $(".svetovanje").animate({right:"+=440", top:"+140"},1000);          $(".onas").animate({left:"+=440", top:"+160"},1000);          $(".infotocka").animate({left:"+=440", bottom:"+3"},1000);          flag=false;       }     }); }); 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -