Guest User

Untitled

a guest
Sep 18th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. Checking inherited visibility of DOM element with jQuery
  2. <div style="display:none;">
  3. <span id="hello">Hey</span>
  4. </div>
  5.  
  6. if ($('#myitem').is(':visible')){
  7.  
  8. /*Do some sort of stuff in here */
  9.  
  10. }
  11.  
  12. if($("#hello").is(":visible")) {
  13. //It's visible!
  14. }
  15.  
  16. $('#hello').is(':hidden')
Add Comment
Please, Sign In to add comment