jquery if element visible on screen code example
Example 1: jquery visible
$(":visible");
//or
$().is(":visible");
Example 2: javascript check if element is visible on screen
// Where el is the DOM element you'd like to test for visibility
<script>
function isHidden(el) {
return (el.offsetParent === null);
}
var el = document.getElementById('el');
alert(isHidden(el));
</script>
// if true then element "el" is visible otherwise not visible