Let’s say that I have some HTML content in which I have some textareas. This HTML content is loaded through Ajax after performing some kind of action (like a button click or something). The problem that I have is that I lose all kinds of jQuery events that were bond to my textareas (like the .change event or something, so if I do something like:
$('.my_textarea').change(function(){
alert('TEST');
});
My alert does not display because my textarea has been loaded with Ajax. Does anybody have any idea why this problem happens and how I can fix this?
Thanks in advance for any suggestions
Just replace
documentwith the closest static ( not loaded via Ajax ) parent of your textarea