Posted By

javifr on 10/29/10


Tagged

jquery


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


Respond to all event data


 / Published in: JavaScript
 

  1. $(function() {
  2. //We can get X/Y coordinates on click events:
  3. $("a").click(function(<em>e</em>){
  4. var clickX = e.pageX;
  5. var clickY = e.pageX;
  6. });
  7.  
  8. //Or detect which key was pressed:
  9. $("window").keypress(function(<em>e</em>){
  10. var keyPressed = e.which;
  11. });
  12. });
  13. j

Report this snippet  

You need to login to post a comment.