So I have a jquery function that does something when class \'ajaxsubnote\' is clicked
$(\'.ajaxsubnote\').click(function(){
//do something....
})
You should use delegated event method to handle dynamic elements. See below,
// v--- replace document with closest parent container that exist in DOM
$(document).on('click', '.ajaxsubnote', function(){
//do something....
})
For older versions use delegate,
// v--- replace document with closest parent container that exist in DOM
$(document).delegate('.ajaxsubnote', 'click', function(){
//do something....
})