Skip to content

Instantly share code, notes, and snippets.

@minhd
Created September 3, 2012 05:05
Show Gist options
  • Save minhd/3606831 to your computer and use it in GitHub Desktop.
Save minhd/3606831 to your computer and use it in GitHub Desktop.
jquery extend slide show/hide
jQuery.fn.extend({
slideRightShow: function(duration) {
return this.each(function() {
$(this).show('slide', {direction: 'right'}, duration);
});
},
slideLeftHide: function(duration) {
return this.each(function() {
$(this).hide('slide', {direction: 'left'}, duration);
});
},
slideRightHide: function(duration) {
return this.each(function() {
$(this).hide('slide', {direction: 'right'}, duration);
});
},
slideLeftShow: function(duration) {
return this.each(function() {
$(this).show('slide', {direction: 'left'}, duration);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment