Added in some more bug fixes - and added the slideToggle method.

This commit is contained in:
John Resig 2006-08-24 21:30:21 +00:00
parent ccf9d44062
commit 8a1adfcd2a
2 changed files with 10 additions and 3 deletions

View file

@ -141,6 +141,13 @@ jQuery.fn.extend({
slideUp: function(speed,callback){
return this.animate({height: "hide"}, speed, callback);
},
slideToggle: function(speed,callback){
return this.each(function(){
var state = $(this).is(":hidden") ? "show" : "hide";
$(this).animate({height: state}, speed, callback);
});
},
/**
* Fade in all matched elements by adjusting their opacity.