JavaScript to Check if Div is in viewport

MarPlo
Posts: 88

JavaScript to Check if Div is in viewport

Hello,
How can I check if a Div is in viewport and detect when it exits viewport.
Has anyone a code example or JS script that works in all browsers, on desktop and mobile devices?

Admin
Try the JavaScript script and example from this page:
http://coursesweb.net/javascript/positi ... wport-html

- It can be used to check if a html element is in viewport, and to get its size and top/left position in page.

Similar Topics