Tagged: anchor, pagination
Hello,
I really hope that this has not been answered else where as I have done some extensive digging to find and answer. I am using the pagination on the display blog on the home page (under Postings) of the following URL:
The issue that I am having is in the URL’s that the pagination links too. As it stands, when someone goes from page one to page two it takes the user back to the top of the screen. I have inspected the element and found that all I need to do is amend the URL to include the anchor at the end, in this case /#postings. What is the best way to go about this?
Thank you in advance and have a great day,
-Brandon
Hi Brandon,
Try adding this at the end of js/avia.js:
jQuery(function() {
jQuery(".pagination-slider a").each(function(){
var theLink = jQuery(this).attr("href");
jQuery(this).attr("href", theLink+"#postings");
});
});
Regards,
Josue
Thank you Josue for the answer!
It worked like a charm. Need to learn me some javascript.
You guys are the best and the theme is rock star awesome!
-Brandon
You are welcome, glad we could help :)
Regards,
Josue