Using a single dynamic selector I have no problems:
var answer_id = <?php echo $answer_id; ?>;
$('#a_flag_' + answer_id).click(function(e) {
e.preventDefault();
//Ajax etc...
But if I add several dynamic selectors they do not work (ie, no errors on Firebug console, but also no action when clicked):
var answer_id = <?php echo $answer_id; ?>;
$('#a_flag_' + answer_id,'#a_comments_link_' + answer_id,'#a_best_answer_' + answer_id).click(function(e) {
e.preventDefault();
//Ajax etc...
Any ideas what I am doing wrong?