title: jQuery delegated event binding not working?
body: <p>I am using jQuery 2.2.4. I have three <code>.note_edit</code> elements in my page, added dynamically after page load (they are part of CartoDB infowindows).</p>
  
  <p>I am using the following code in the console to check that the elements exist, which they do:</p>
  
  <pre><code>$("body .note_edit");
  </code></pre>
  
  <p>Then I am trying to add a dynamic event in the console as follows:</p>
  
  <pre><code>$('body').on('click', '.note_edit', function(e) { e.preventDefault(); console.log('whatever'); });
  </code></pre>
  
  <p>But when I click on the elements, nothing happens - no console output. </p>
  
  <p>What might be going wrong here? There aren't any other JS errors in the console, the elements definitely exist... what could it be?</p>
  
  <p><a href="https://i.stack.imgur.com/PHsC5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PHsC5.png" alt="enter image description here"></a></p>