Ian Tearle

is finding it hard to find inspiration.

Updated 4 days, 18 hours, 34 minutes ago

Javascript Goodness

jQuery Show Hide Bug

by Ian Tearle 1:41pm Tuesday, Apr 29


Firstly a big thank you to the original poster of this bug, Jamie Thomspon thank you very much, although it took me a while to find it, thus I am posting it here for reference use.

The issue being is that Safari has trouble with hide/show methods on elements when used by jQuery. The same bug has been reported about fadeIn/fadeOut methods also, although I have not experienced this.

The issue can be solved by the use of CSS. By applying CSS rules to the element, Safari appears to control the hide/show methods correctly.

// This fails in Safari
$(element).hide();
// Change it to this
$(element).css('display','none');
There are no comments on this entry. You should add one.

Post A Comment

* Required Fields
No HTML is allowed. All links, and new lines will be automagically converted to HTML for you.
Notice to spammers, all links will be sanitized with rel="nofollow".

*
*

*