Created
June 25, 2014 19:18
-
-
Save jomasero/5f3f1e410e9d216e366c to your computer and use it in GitHub Desktop.
Eventos personalizados con jQuery.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function holaEvento(datosE) { | |
| alert("Número = " + datosE.numero + ", palabra: " + datosE.palabra); | |
| } | |
| $(document).on("nombreEvento", function(evento) { | |
| holaEvento(evento.datosEvento); | |
| }); | |
| $.event.trigger({ | |
| type: "nombreEvento", | |
| datosEvento: { | |
| numero: 2, | |
| palabra: "Hola" | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment