Hello. I have the following piece of code
<a onclick="$('#result').load('codes/test.html');$('#result').show();" >XHTML code</a>
it loads perfectly the content of test.html in the result div and also make it visible. Until this point all are good. When I try to add a function prettyPrint()
which apply some modifications on the text and change the code to the following:
<a onclick="$('#result').load('codes/test.html');$('#result').show();prettyPrint();" >XHTML code</a>
I can't make the prettyPrint() to work, instead if I add onmouseout="prettyPrint();
it works when I take off my cursor. I don't have experience with javascript and jquery so I don't know what is the real problem, so I would appreciate any help on how to make prettyPrint to work onckick
.