Friday 15 February 2013

javascript - How do I pass the event handler to a custom trigger handler -


I would like to know how I would like the event handler keydown and custom trigger handler (< Code event ( e ) for code> start and pause ). I need this for the function to move. WordStart and leftwing step will be able to get its value.

  $ (window) .keydown (function (e) {$ (document) .trigger ('start');}) keyboard (function (e) {$ (document). Trigger ( ' Stop ');}); $ (Document) .on ('Start', move World Start); $ (Document) .on ('stop', hillwirestop); Function Hillwald Start (E) {//e.which || E.keycode ==? } Hillwirestop (e) function {//e.which || E.keycode ==? }   

I tried to insert e , but to be a franc, I have not found any clue what I am doing. Can anyone push me in the right direction? Tyvm :)

like this:

  $ (window) keydown (Function (e) {$ (document). Trigger ({type: "start", user eate: e});}); Take a look at JSFDial:  

Take a look at the documentation: / div>

No comments:

Post a Comment