开发者

Why is this not a valid, chained function?

$("#infoBox").hide(, function(){
            alert('hidden!');
        });

Just a sm开发者_StackOverflowall question, but my code breaks when I try to do this -


You cannot simply omit the first parameter. You need to supply a value for it e.g.:

$("#infoBox").hide('slow', function(){
    alert('hidden!');
});

See the API page for information on what available values there are for the first parameter (duration).


change this to

$("#infoBox").hide('slow', function(){
            alert('hidden!');
        });


jQuery will work out what do do if you omit the speed argument in this case

$( "#infoBox" ).hide( function() {
    alert( 'hidden!' );
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜