Jquery difference between $(document).on() and $(element).on for ajax and non-ajax
<p>Consider the following three statements in my page. The elements #not_ajax_element and #ajax_element are buttons. The element #ajax_element is loaded into the page by a previous ajax call (not shown).</p>

<pre><code>// #not_ajax is 'static' element. THIS WORKS
$("#not_ajax_element").on("click", "button", function() {
   alert('Not ajax');
});

// #ajax_element is loaded by a previous ajax call. THIS DOES NOT WORK.
$("#ajax_element").on("click", "button", function() {
   alert('Not ajax');
});

// #ajax_element is loaded by a previous ajax call. THIS WORKS.    
$(document).on("click", "#ajax_element", function () {
   alert('Not ajax');
});
</code></pre>

<p>As can be determined by the comments, the on() syntax seems to be different for static and dynamic elements.</p>

<p>Is this documented behaviour, or am I missing something important in the implementation.</p>
