jquery - Add delay in between two if conditions -
i add wait()
or delay between 2 functions.
function(imageid) { //alert("i main slider called "); if(en==1) { var selected=$('#' + sel); $(selected).animate({"left": "+=30px","opacity": "0.99"},"slow"); $(selected).animate({"height":"354px","width":"295px"},30); $(selected).css("-webkit-transform-style","preserve-3d"); $(selected).css("-webkit-transition","all 1.0s linear"); $(selected).css("transform-style","preserve-3d"); $(selected).css("transition","all 1.0s linear"); $(selected).css("-webkit-transform","rotatey(0deg)"); $(selected).css("transform","rotatey(0deg)"); en=0; } if(my.circular) { /* trigger left jumppoint */ if(imageid+1 === my.imagefocusmax) { /* set jump target same cloned image on right */ clonedimageid = my.max - my.imagefocusmax; jumptarget = -clonedimageid * my.xstep; /* set imageid last image */ imageid = clonedimageid-1 ; }
in function want add delar after if statement. how can that? have tried adding delay()
not working. should use?
use settimeout function. way can tell browser wait before doing something.
Comments
Post a Comment