Html
<form style='display: none'>
<input id='name' type='text' style='display: inline-block' />
</form>
jQuery code
if( $("input#name").is(":visible") ) {
/* do something, selector is not hidden */
}
This will select the input field and then test correctly whether it is visible in the DOM. This check will make sure all parent elements are visible too, as well as the original CSS display attribute.