I have a table where users that are awaiting approval are listed, an administrator can click on a table row and once he did so the information of the user will be displayed below in a box, I've did this before but I did a mistake, I used ID on the row and I was doing a loop to show all the rows, well, ID can be used only once so it worked only with the first row, I now changed the ID of the row to a CLASS and my jQuery isn't working anymore, the box is not showing at the bottom along with the user info.
Here is the table row:
<tr data-id="<?php echo $datum['ID']; ?>" class="rowID" href="#">
And here is my script:
$(".rowID").click(function() {
var User = $("#userID");
var Box = $("#userBox");
Box.show();
$("#userBox").animate({
maxHeight: '+=1000px'
}, 1000);
$("html, body").animate({
scrollTop: $(document).height()
}, 1000);
$("#thisHR").show();
$("#thisHR").animate({
maxWidth: '+=1000px'
}, 1000);
});
EDIT
I've tried this
$(document).on('click','body.rowID',function(){
but it still doesn't work.