In HEAD of my document, I load jQuery.js, as well as the blockUI jQuery plugin.
In PHP, I use regular AJAX to load other PHP content into a DIV. In the original PHP module, jQuery and blockUI works fine, but in any of the ajax loaded divs, jQuery and blockUI both do absolutely nothing. There is no error in the console, no warning - nothing.
I'm starting jQuery, and none of the other articles I found on this topic could put me on the verge of solving this, so I am helping someone else. In my code below you will see that I did some hits in live () ...
This is at the top of my PHP file, which loads in a DIV
<script type="text/javascript"> $(document).ready(function() { $('#crazy').live('click',function() { $.blockUI({ message: $('#question'), css: { width: '275px' } }); }); $('#yes').live('click',function() { </script>
Here is the HTML from this PHP file (loaded in the DIV):
<input id="crazy" type="submit" value="Show Dialog" /> <div id="question" style="display:none; cursor: default"> <h1>Would you like to contine?.</h1> <input type="button" id="yes" value="Yes" /> <input type="button" id="no" value="No" /> </div>
source share