Since jQuery 1.3.2, an element is displayed if its offset-width or offsetHeight specified in the browser is greater than 0. What does this change mean? This means that if your CSS element is displayed as "none", or any of its parent / ancestor display elements are "none", or if the width of the elements is 0 and the height of the elements is 0, then the element will be reported as hidden.
Example:
This means that the .galleryitem element is recognized as hidden only if the parrent parameter has display: none style:
var elementId = $(".parent .galleryitem:hidden").attr("id");
or
var elementId = $(".galleryitem:hidden").attr("id");
You can choose the example that suits you best.
Liviu Dragulin
source share