Ensure Element.hide and Element.show return an element, even if you pass an element ID.
This commit is contained in:
parent
ae707f4475
commit
6004aa8289
|
@ -1,3 +1,5 @@
|
|||
* Ensure Element.hide and Element.show return an element, even if you pass an element ID. (Andrew Dupont)
|
||||
|
||||
* Fix an issue where Element#getStyle('height') returns null if the height is set to "auto." (kangax, jddalton)
|
||||
|
||||
* Add unit tests for Element#descendantOf. (jddalton)
|
||||
|
|
|
@ -74,12 +74,14 @@ Element.Methods = {
|
|||
},
|
||||
|
||||
hide: function(element) {
|
||||
$(element).style.display = 'none';
|
||||
element = $(element);
|
||||
element.style.display = 'none';
|
||||
return element;
|
||||
},
|
||||
|
||||
show: function(element) {
|
||||
$(element).style.display = '';
|
||||
element = $(element);
|
||||
element.style.display = '';
|
||||
return element;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue