You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 2, 2025. It is now read-only.
Arthur Guiot edited this page Jul 5, 2017
·
1 revision
How it works?
The $.onEvent() makes possible to manage a lot of different event through HTML attributes/tags. It's super simple and intuitive, you simply need to add the attributes on="" and action="" to an HTML element and to run this function, and you're done.
⚠️This function doesn't support the "push" method, so you can only use it once.
How to use it?
As I said, it's super simple and intuitive, so let's take an example to make sure it's clear.
Let's say you have a button and when you click on it, there is an alert poping up.
HTML:
<buttonon="click" action="alert('You clicked on me!')">Click on me!</button>
JS:
$.onEvent();
⚠️ Questions?
Don't hesitate to ask your questions ⁉️ in the issue part 😁