You can simply with the below function, you can also change the type element.
$ ("Input[type=hidden]"). Bind ("change", function () { alert (this). Val ()); });
in value to hidden elements Don't automatically fire the. Change () event. So, wherever it's that's you'
<div id="message"></div><input type="hidden" id="testchange" value="0" />
Javascript
var$message = $ ('#message');var$testChange = $ ('#testChange');vari =1; function Updatechange () {$message. html ($message. HTML ()+'<p>changed to'+ $testChange. val () +'</p>');} $testChange. On (' Change', Updatechange); SetInterval (function () {$testChange. val (++i). Trigger (' Change');; Console.log ("value changed"+$testChange. Val ());}, the); Updatechange ();
should work as expected.
http://jsfiddle.net/7CM6k/3/
Reprint: Http://stackoverflow.com/questions/6533087/jquery-detect-value-change-on-hidden-input-field
Jquery-detect value change on hidden input field