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!' );
});
精彩评论