Side navigation
#11755 closed enhancement (fixed)
Opened May 11, 2012 05:02PM UTC
Closed May 23, 2012 02:42AM UTC
animate and it aliases should not use :hidden selector
Reported by: | markel | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.8 |
Component: | effects | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
There four cases in which elements considered to be hidden, when ":hidden" selector used, according to documentation –
They have a CSS display value of none.
They are form elements with type="hidden".
Their width and height are explicitly set to 0.
An ancestor element is hidden, so the element is not shown on the page.
And there is fifth one, which is not mentioned in documentation – elements is considered to be hidden when they disconnected from the document – http://jsfiddle.net/jeDrX/
animate and it aliases use ":hidden" selector to know when element is hidden, but in those five cases animate should look only for the first one (but not for jQuery.fn.show case), i don't see a reason to look for another four, this change will cost some bytes, but i think its worth it, it will cause less confusion – http://bugs.jquery.com/ticket/11585, and it will be faster – http://jsperf.com/hidden-vs-jquery-css-elem-display