javascript - Jquery text change event -


i need fire event anytime content of textbox has changed.

i cant use keyup nor can use keypress.

keyup , keydown doesn't work if hold down on key.

keypress triggers before text has changed. doesn't recognize backspace or delete either.

so i'm assuming i'm going have build custom logic or download plugin. there plugins out there? or if should build one, constraints should out for?

for eg. facebook search @ top. can press , hold.

another example writing stackoverflow question. right below editor, contents copied in real time, backspace , everythng works. how it?

i took @ so's source. looks lot this:

function updatepreview(){     $('div').text($('textarea').val()); }  $('textarea').bind('keypress', function(){         settimeout(updatepreview, 1);     } );​ 

they stuff make html tags bold , italics , links , such , time it. increase delay 1 longer if takes long generate html.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -