jQuery on() method not working for appended elements
<p>I know I should use on() method for triggering appended elements and not use click(), so:</p>

<pre><code>$('#change_profile_img').on('click', function(){
alert(1);           
});
</code></pre>

<p>so the above code is working fine on any elements unless the appended elements, for example, I'm appending:</p>

<pre><code>$('.companylogo:first').append('&lt;a id="change_profile_img" class="ic_change"&gt;CHANGE IMAGE&lt;/a&gt;');    
</code></pre>

<p>after it's appended, it's not working, but after a page refresh it works just fine.
Another thing that I should mention, I'm doing the append from a modal page, it appends the button and everything but I could not trigger it anymore...</p>

<p>I would appreciate any kind of help.
Thanks</p>
