Return to Snippet

Revision: 46975
at May 28, 2011 06:03 by kendsnyder


Initial Code
$.fn.display = function(setTo) {
	if (setTo) {
		return this.each(function(i, el) {
			el.style.display = setTo;
		});						
	}
	if (!0 in this) {
		return false;
	}
	return this[0].style.display;
};

Initial URL

                                

Initial Description
Plugin to get and set Element#style.display (e.g. "none" or "")

Initial Title
jQuery plugin to get and set Element#style.display

Initial Tags
javascript, jquery

Initial Language
jQuery