ajax-live-search
ajax-live-search copied to clipboard
How to animate to the selected record
Hello,
Is it possible to achieve the following?
I use the tool in a search field of a table (filled from a mysql db) with usernames and the points they have gained. When they click on the user they want to see on which place he has ended, the template.php file wil do the same query and show the results.
But I want to autoscroll to the desired row in this table.
I try this one:
` success: function(data){ // If the success function is execute, then the Ajax request was successful. // Add the data we received in our Ajax request to the "content" div. $('.table_with_results').html(data);
$('#tableID').animate({
scrollTop: $("#userID").offset().top
}, 1000);
},`
But the scroll doesn't work.
Any idea how to achieve this?