https://github.com/remy/libraries
Dumping ground for my little libraries
https://github.com/remy/libraries
Last synced: 7 months ago
JSON representation
Dumping ground for my little libraries
- Host: GitHub
- URL: https://github.com/remy/libraries
- Owner: remy
- Created: 2010-03-12T21:28:19.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2013-06-08T13:27:13.000Z (over 12 years ago)
- Last Synced: 2025-03-19T02:00:03.710Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 117 KB
- Stars: 65
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# Remy's Libraries
This is a dumping ground for little libraries that I've written that serve a specific purpose, but don't weigh in big enough (in my eyes) to warrant an entire github repo.
The aim will be to include documentation for each either here or in a [library].md file.
# events.js / Events
Only tested in Chrome & IE7, but I have a simple event "on", "fire" system that works but also supports custom events and bubbling.
## Example
```javascript
var links = document.getElementsByTagName('a');ev(links).on('click', function () {
alert('clicked!');
ev(this).fire('remy');
});ev(links).on('remy', function (event) {
alert('a custom event fired: ' + event.type);
});
```
# bind.js / Data Bindingbind.js used to live here, but I've moved it to it's own repo: [https://github.com/remy/bind](https://github.com/remy/bind).
# xhr.js / XHR
Basic XHR with JSON and error handling.
## Example
```javascript
var xhr = get('/status', function (err, status) {
if (err) {
// something went wrong
return;
}
console.log('The current status is: ' + status);
});
```