jQuery on() method not working for appended elements
- by behz4d
I know I should use on() method for triggering appended elements and not use click(), so:
$('#change_profile_img').on('click', function(){
alert(1);
});
so the above code is working fine on any elements unless the appended elements, for example, I'm appending:
$('.companylogo:first').append('<a id="change_profile_img"…