Problem with onchange and jQuery val() and text() -


I have a text area like this that I write it now I want to, when onchange to see textarea content in the past I used

  & lt; Textarea id = "content" onchange = "perview ();" & Gt; & Lt; / Textarea & gt; Function Query () {var code = $ ("textarea # content") Val (); . $ ('# Code-preview') HTML (code); }  

I think everything is fine

   

But while using Highlighter in the past, such as

  & lt; Pre id = "code-preview" class = "brush: php;" & gt; & Lt; / Pre & gt;  

Syntax Highlighter version 2.1.364 (15 October 2009)

You have tried,

  function perview () {var code = $ ("textarea # content"). Val (); . $ ('# Code-preview') HTML (code); SyntaxHighlighter.all () // & lt; --- It's calling again ...}  

That's it if we are using the same experiment. If that works, do not try inline events ..;) Cheers ...


Comments