Using jQuery, how would you test if an element #elem is visible or hidden?
Explanation
$('#elem').is('visible'); - wrong syntax; $('#elem:hidden'); - only select hidden elements; $('#elem').attr('visible'); - wrong attribute; $('#elem').is(':hidden'); - correct way, according to jQuery refference; The is() method checks if one of the selected elements matches the selectorElement.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback