Skip to content

Update visible-selector.xml #522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions entries/visible-selector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<p>Elements with <code>visibility: hidden</code> or <code>opacity: 0</code> are considered visible, since they still consume space in the layout.</p>
<p>Elements that are not in a document are considered to be hidden; jQuery does not have a way to know if they will be visible when appended to a document since it depends on the applicable styles.</p>
<p>During animations that hide an element, the element is considered to be visible until the end of the animation. During animations to show an element, the element is considered to be visible at the start at the animation.</p>
<p>Attempting to detect if an <code>option</code> element is visible or not is completely useless. It'll be always hidden, regardless if it's selected (thus visible) or not.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AurelioDeRosa . This is good information to have in here. Thanks! I'm just not sure about the phrasing (e.g. "is completely useless" and "It'll be always"). Mind if I merge it in with some editing? Authorship will still go to you, of course.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kswedberg. Hi! Feel free to change anything you want to further improve the documentation. I also don't mind about the authorship as long as we, together, can improve the project. :)

<p>How <code>:visible</code> is calculated was changed in jQuery 1.3.2. The <a href="http://blog.jquery.com/2009/02/20/jquery-1-3-2-released/">release notes</a> outline the changes in more detail.</p>
</longdesc>
<note id="jquery-selector-extension" type="additional" data-selector=":visible"/>
Expand Down