admin管理员组

文章数量:1022982

I´d like to focus on a div (#main.first), after clicking in wordpress pagination in my homepage. I need that because my header (with image slider) is too big, and it steals focus from my posts list. Could nor find nothing that helps. Any thoughts? Thanks!

I´d like to focus on a div (#main.first), after clicking in wordpress pagination in my homepage. I need that because my header (with image slider) is too big, and it steals focus from my posts list. Could nor find nothing that helps. Any thoughts? Thanks!

Share Improve this question asked Apr 29, 2019 at 17:14 OmniatomOmniatom 596 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I got it with this script! from: https://stackoverflow/questions/13362026/wordpress-pagination-adding-an-anchor-link

<script type="text/javascript">
$(document).ready(function() {
    $('.pagenavi a').each(function(i,a){$(a).attr('href',$(a).attr('href')+'#blog')});
});
</script>

I´d like to focus on a div (#main.first), after clicking in wordpress pagination in my homepage. I need that because my header (with image slider) is too big, and it steals focus from my posts list. Could nor find nothing that helps. Any thoughts? Thanks!

I´d like to focus on a div (#main.first), after clicking in wordpress pagination in my homepage. I need that because my header (with image slider) is too big, and it steals focus from my posts list. Could nor find nothing that helps. Any thoughts? Thanks!

Share Improve this question asked Apr 29, 2019 at 17:14 OmniatomOmniatom 596 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I got it with this script! from: https://stackoverflow/questions/13362026/wordpress-pagination-adding-an-anchor-link

<script type="text/javascript">
$(document).ready(function() {
    $('.pagenavi a').each(function(i,a){$(a).attr('href',$(a).attr('href')+'#blog')});
});
</script>

本文标签: paginate linksHow to focus to a specific div when page reloads by pagination