Reputation: 33
I have 2 pages,the first one containing a list of questions and the next page containing a list of answers.What i need is when i click on the nth question in the first page,it should go to the next page and scroll to the answer of that nth question.This is how i have loaded the answer page.Could someone tell me a possible solution to scroll to the particular content using jquery.
$('.question').live('click',function(){
//some code
$.ajax({
success: function(data){
//some code
window.location.replace("target_url");
}
});
Upvotes: 0
Views: 44
Reputation: 742
You can use anchors in the second page. Which can be on the question id or answer I'd. And make the logic work on it.
Upvotes: 2