istesequi
Version:
Lightweight and intuitive javascript library
35 lines (22 loc) • 617 B
Markdown
Calls an event on all of the matched nodes
```js
.trigger('submit')
.trigger(new Event('submit', {}));
```
The only parameter that it accepts is either an event name such as `click`, `submit`, `change`, etc or an event itself.
Umbrella instance
An auto-save feature that submits the form through ajax every 10 seconds
```js
// Make the form to submit through ajax
u('form.edit').ajax();
// Submit it every 10s
setInterval(function(){
u('form.edit').trigger('submit');
}, 10000);
```
[.on()](