Jquery 增加延误
我目前已经安装了PrettyTo,并通过Jquery 增加延误,jquery,Jquery,我目前已经安装了PrettyTo,并通过 $(document).ready(function(){ 添加延迟的最快方法是什么?javascript中的函数很容易使用 你可能会这样做 $(document).ready(function(){ $('#photo').prettyphoto(); //Not sure how you call prettyphoto } 在您拨打电话之前添加延迟: $(document).ready(function(){ //The cal
$(document).ready(function(){
添加延迟的最快方法是什么?javascript中的函数很容易使用
你可能会这样做
$(document).ready(function(){
$('#photo').prettyphoto(); //Not sure how you call prettyphoto
}
在您拨打电话之前添加延迟:
$(document).ready(function(){
//The call to callPrettyPhoto will only be made after 1 second
window.setTimeout(callPrettyPhoto, 1000 );
});
function callPrettyPhoto() {
$('#photo').prettyphoto();
}
请注意,如果希望将函数内联,也可以将其内联:
$(document).ready(function(){
window.setTimeout(function() {
$('#photo').prettyphoto();
}, 1000);
});
哇!非常感谢你,米尼隆先生-非常出色,非常感谢:)