Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
183
rated 0 times [  190] [ 7]  / answers: 1 / hits: 39119  / 15 Years ago, tue, december 8, 2009, 12:00:00

This javascript produces an error:




missing ) after argument list




In firebug with the code:



<script type=text/javascript>
function add( answer )
{
$.post('../page.php?cmd=view&id=3523',
{user_id: 3523, other_user_id: 2343}, function(d)
$(answer).after(<span>Done!</span>).remove();
});
}
}
</script>


What am I doing wrong?


More From » jquery

 Answers
8

function d misses an opening bracket, {



$(answer).after( should not be escaped , just a regular quote will do


[#98122] Friday, December 4, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
makaylahk

Total Points: 166
Total Questions: 94
Total Answers: 117

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago
;