When my page is first loaded, I register the event for all my checkboxes:
$(":checkbox").change(function () {
var $this = $(this);
if ($this.is(':checked')) { }...
}
The HTML template I am modifying uses bootstrap-tree to load new content. Demo (UI Features -> Tree View -> Data Sources [The right tree]).
I want to register event handlers for the checkboxes loaded in the new branches, so I want to catch the event when the ajax content is loaded. I have searched related questions in SO and tried the following methods:
//$(document).on('click', '.ajax', function () {
//$(document).ready(function() {
//$('a.ajax').live('click', function() {
//$(document).ajaxComplete(function() {
But none of them work...