Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 27th, 2012  |  syntax: None  |  size: 0.29 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <!DOCTYPE html>
  2. <body>
  3.   <a id="js_button" class="no_event_fired">Click</a>
  4.   <a href="http://google.com">Link</a>
  5.   <script>
  6.     var el = document.getElementById( "js_button" );
  7.     el.addEventListener( "click", function() {
  8.       this.className = "addEventListener";
  9.     });
  10.   </script>
  11. </body>