Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blimpio/jquery.state
Simple query plugin to set/get element state via data attributes (data-state).
https://github.com/blimpio/jquery.state
Last synced: about 10 hours ago
JSON representation
Simple query plugin to set/get element state via data attributes (data-state).
- Host: GitHub
- URL: https://github.com/blimpio/jquery.state
- Owner: blimpio
- Created: 2012-12-03T14:56:12.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-03T15:01:03.000Z (almost 12 years ago)
- Last Synced: 2024-03-26T11:50:27.042Z (7 months ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jquery.sate
Simple query plugin to set/get element state via data attributes (data-state).
## Get current state
$('element').state(); // returns string or null
Returns the current state of the element or null if the element has no data-state attribute.
## Set current state
//
$('element').state('selected');
Sets a data-state attribute with the state specified.