SyntaxFix
Write A Post
Hire A Developer
Questions
You have a javascript object
$1 and $2 are jquery objects, maybe use alert($1.text()); to get text or alert($1.attr('id'); etc...
$1
$2
alert($1.text());
alert($1.attr('id');
you have to treat $1 and $2 like jQuery objects.