Like check below "demo div"
<div class="call" style="margin-top:100px;">
hi
</div>
<div class="call" style="margin-top:900px;">
hello
</div>
If any above div on screen return true using class name,while scrolling I'm use below script which is always return me to true,how to fix it?
<script>
jQuery.expr.filters.offscreen = function(el) {
return (
(el.offsetLeft + el.offsetWidth) < 0
|| (el.offsetTop + el.offsetHeight) < 0
|| (el.offsetLeft > window.innerWidth || el.offsetTop > window.innerHeight)
);
};
$(window).scroll(function () {
alert($('.call').is(':offscreen'))
});
</script>