title: Javascript event listener fails because "undefined" is not a function
body: <p>I've been working with this for a few hours and it's driving me mad. I've got a modal window that pops up on click of a link. It's got a CSS transition so it fades in. I need to have a callback for when that transition completes. So I dug up this event listener:</p>
  
  <pre><code>$('#tagBox').addEventListener(
      'webkitTransitionEnd', 
      function(event) { 
          alert( "Finished transition!" ); }, 
      false );
  </code></pre>
  
  <p>I'm in Safari, but that code returns this error:</p>
  
  <p><code>TypeError: 'undefined' is not a function (evaluating '$('#tagBox').addEventListener( 'webkitTransitionEnd', function(){ alert( "Finished transition!" ) }, false )')</code></p>
  
  <p>Is my syntax correct? I can do <code>alert($('#tagBox'))</code> and it returns [object] so it's finding the modal element. Why does it say undefined is not a function?</p>
  
  <p>Thanks.</p>