Skip to content

Instantly share code, notes, and snippets.

@buzzedword
Created October 14, 2010 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save buzzedword/627318 to your computer and use it in GitHub Desktop.
Save buzzedword/627318 to your computer and use it in GitHub Desktop.
ASP.NET Friendly Show/Hide in jQuery
jQuery.fn.aspHide = function() {
var elem = $(this[0]);
elem.data('height', elem.height());
elem.height('0');
elem.css('visibility', 'hidden');
};
jQuery.fn.aspShow = function() {
var elem = $(this[0]);
elem.height(elem.data('height'));
elem.css('visibility', 'visible');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment