css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv
CodePen probably won't work great in this browser. We generally only support the major desktop browsers like Chrome, Firefox, Safari, and Edge. Use this one at your own risk! If you're looking to test things, try looking at Pens/Projects in Debug View.
user profile image

A fairly straightforward way of checking to see if an element or object is in the viewport. You can pass an ID or CLASS to the function as an argument, and the function returns "Yes" or "No" to let you know if it's in the viewport. Of course I borrowed a few things here and there. The general idea came from a script a found in the book "jQuery Cookbook" by O'Reilly books. It's a great book BTW.


  1. No comments yet.

Leave a Comment Markdown supported. Click @usernames to add to comment.

You must be logged in to comment.