Can anyone tell me why this code would not be working?
$(\'body\').on(\'test\', function() { alert(\'test\'); }); $(\'body\').trigger(\'test\');
Try delegation:
$(document).on('test', 'body', function() { alert('test'); }); $('body').trigger('test');
This works like live() used to. http://api.jquery.com/live/