I have the following function:
function go_to(sec,name) {
$("#lib_nav td:nth-child(2)").append('<span> > <a style="cursor:pointer" OnClick="$(\'.content\')
.html(\'<p>Loading</p>\')
.load(\'_library_q.php?\',\'sec='+sec+'\')>'+name+'</a></span>');
$('.content').html('<p>Loading</p>')
.load('_library_q.php?','sec='+sec);
}
Which is called by a script like
<div class="darkbox" style="cursor:pointer" OnClick="go_to(2,'Hello World');">
The problem is that, in the .append line, it only append a <span> > </span> and it completely skips over the <a>. The second .load function works, however. Any thoughts?
I think you are missing a closing double quote for your onclick handler:
}