Need to use jQuery.find to find element with specific style
You may be able to use the attribute selectors, and the ‘contains’ option $(‘#adminMenu li ul[style*=”display:block”]’).hide() This essentially says ‘any ul who’s style attribute contains the text display:block’