here is my code
$(document).ready(function () {
var val1 = $("#Content_txtYorum").val();
function checkChanges() {
var val2 = $("#Content_txtYorum").val();
console.log(val1 + " " + val2); // for test
if (val1 != val2)
alert($("#Content_txtYorum").val());
setTimeout(function ()
{
checkChanges();
}, 3000);
}
checkChanges();
});
i try to write my textChange event.. but variable val2 never changes when i write something to textbox.
what is the problem ?
thanks..
you can just add a handler to the .change() event of your text box!
check out the fiddle:
http://jsfiddle.net/4QHZ7/
EDIT: as per your comment, keyup should work for you:
the fiddle is updated as well
http://jsfiddle.net/4QHZ7/1/
EDIT: as per your new comment, keyup should work for you:
EDIT: now that you’ve changed the question entirely… here’s another answer:
check out this question of stack overflow: it gives 2 different possible solutions:
detecting changes with ckeditor