Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harryfinn/isonscreen
jQuery isOnScreen plugin
https://github.com/harryfinn/isonscreen
Last synced: about 1 month ago
JSON representation
jQuery isOnScreen plugin
- Host: GitHub
- URL: https://github.com/harryfinn/isonscreen
- Owner: harryfinn
- License: mit
- Created: 2016-07-20T10:12:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-15T23:26:08.000Z (about 2 years ago)
- Last Synced: 2024-10-14T20:43:39.382Z (3 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Usage
To use, simple call on the required element i.e.
```js
if($('.contact-form').isOnScreen()) {
// Display contact form/animate in/change user focus etc...
}
```You can pass `x` & `y` offsets if you want the check to return true based on a
percent/factor amount of the element on screen i.e.```js
$('.contact-form').isOnScreen(0.2, 0.2)
```This would return true if 20% of the element was visible on the `x` and `y`
axises