I'm current using the solution provided in this answer jQuery scroll to element however, the problem I have is that the element I want to scroll to has been inserted into the dom via ajax so the function does not actually work. I'm assuming that jquery does not know the element exists yet as the page has not actually been reloaded.
I've used things like jquery .delegate in the past for click/onchange events but, I'm not sure if/how I can use something similar so that jquery can find the newly created element.
Any ideas on how I can do this? The code I'm currently using at the moment to do the scrolling is:
$('html, body').animate({ scrollTop: $("#comment_row_"+comment_id).offset().top }, 2000);