viewport is a simple but handy jQuery plugin that adds methods and CSS selectors to check if the element is in a certain viewport. Furthermore - you will be able to check the position relation of two separate elements even if the are not kin. The plugin uses getBoundingClientRect() to determine element positions so be sure it meets your browser support requirements. ] version 1. x.x uses different detection principles, which will work in almost any browser but work 10-30 times slower.
Features
- jQuery 3+ (written and tested with 3.3.1)
- Download it from GitHub, or install via NPM
- viewport.jquery provides you two different way of relation detection: CSS pseudo-selectors and jQuery methods
- CSS pseudo-selectors
- Plugin uses getBoundingClientRect() to determine elements positions so be sure it meets your browser support the requirements
- Include it in your JS code or link it in html page
Categories
LibrariesLicense
MIT LicenseFollow viewport.jquery
Other Useful Business Software
AI-generated apps that pass security review
Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of viewport.jquery!