我想在两个函数之间添加wait()
或延迟。
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 to the same cloned image on the right */
clonedImageID = my.max - my.imageFocusMax;
jumpTarget = -clonedImageID * my.xStep;
/* Set the imageID to the last image */
imageID = clonedImageID-1 ;
}
在我的函数中,我想在if语句后添加delar。我怎样才能做到这一点?我尝试添加delay()
,但它无效。我该怎么用?