How to tell when an HTML textarea has been changed by Javascript

Posted by at on Stack Overflow See other posts from Stack Overflow or by at
Published on 2011-01-12T20:50:18Z Indexed on 2011/01/12 20:54 UTC
Read the original article Hit count: 278

A widget I'm using modifies an HTML textarea element. I need to know when that element has been modified and preferably I'd like to actually hide that element as well. I'm using jQuery, so I naturally tried the $('#textarea_id').change() event. But it's never triggered because I guess the textarea never loses focus.

What's the best way to monitor that textarea, preferably hidden (css has display:none)? Please don't tell me setInterval...

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery