Skip to main content

jQuery visibility pseudo-selectors

Tags:
Reading time: 1 minute Suggest an edit

To help me with a project at work, I've written two jQuery pseudo-selectors which will help determine if an element is currently in the viewport or if it has been reached during scroll. This can be incredibly powerful if you're looking to only display certain items (like a "back to top" link) after you've reached a certain point on the page, or only while some other element is within the viewport.

Check them out: