Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sean-hill/elemental-window
Helper functions for jQuery to get the length from the edge of an element to the edge of the window.
https://github.com/sean-hill/elemental-window
Last synced: 20 days ago
JSON representation
Helper functions for jQuery to get the length from the edge of an element to the edge of the window.
- Host: GitHub
- URL: https://github.com/sean-hill/elemental-window
- Owner: sean-hill
- Created: 2013-09-03T14:58:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-04T01:13:43.000Z (over 11 years ago)
- Last Synced: 2024-11-08T08:46:09.513Z (2 months ago)
- Homepage:
- Size: 121 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# elemental-window
## Description:
elemental-window is a simple jQuery plugin to help find the length from the edge of an element to the edge of the window.
It basically expands on jQuery's .offset() function by adding on the properties .right and .bottom.## Usage:
1. Insert the necessary elements in your document's `` section, e.g.:
Remember to include jquery.elemental-window.js *after* including the main jQuery library.
2. Initialise elemental-window in your document.onload, e.g.:
$(document).ready(function() {
var edges $('#element').windowOffsets();
var top = edges.top;
var right = edges.right;
var bottom = edges.bottom;
var left = edges.left;
});