I have this code :
$('.more_results').click(function() {
var userid = $('#userid').text();
var more = $(this).attr('id');
$.post('myquests.php', {userid:userid, more:more}, function(html) {
$(more+".more_results").remove();
$("#tab1").append(html);
});
});
my issue is trying to select by the class and the stored id. So it would be like .more_results#1, .more_results#2, etc
You need a “#” if you want to select by id: