Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1489523

    Dear support,
    i tried this solution to avoid the scroll to top, when clicking the next page button. But it does not work. Is there any other solution which works?
    Thanks and Regards

    //avoid scroll to top when clickin next page
    
    function add_custom_script(){
    ?>
    <script type="text/javascript">
    (function($){
    function b(id) {
    		$('.pagination .inactive').click(function(e) {
    			e.preventDefault();
    
    			var section = $(id),
    				link = $(this).attr('href'),
    				anchor = $(section ).attr('id');
    
    				if(!section.length) return;
    
    				var link = link + '#' + anchor;
    				window.location.href = link;
    		});
    	}
            
            $(document).ready( function() {
                b('#referenzen');
            });
    })(jQuery);
    </script>
    <?php 
    }
    add_action('wp_footer', 'add_custom_script');
    #1489534

    Dear support,
    now it works – it was my fault – a caching problem…

    #1489550

    Hi,

    Glad to know this has been resolved! Let us know if you have more questions. Have a nice day.

    Best regards,
    Ismael

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Portfolio Grid Pagination goes to top of page’ is closed to new replies.