• Resolved xbrandes

    (@xbrandes)


    Hi!
    If you use the sort, the page reloads and you get back to the top of the page. In my case, the properties are not displayed at the top of the page, but further down, so you have to scroll down again after sorting. Is there a way to make the page jump to the appropriate place at the bottom after sorting?

    Thanks a lot in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Estatik

    (@estatik)

    Hello,
    Please try to add the following piece of code to the theme js file:

    const queryString = window.location.search;
    const urlParams = new URLSearchParams( queryString );
    const viewSort = urlParams.get( 'view_sort-1' )
    if ( viewSort ) {
        var listings = document.getElementsByClassName( "es-listing" )[0].offsetTop;
        console.log(listings);
        window.scrollTo({ top: listings, behavior: 'smooth'});
    }

    It should work as an anchor on the page.
    Thank.

    Thread Starter xbrandes

    (@xbrandes)

    This already looks good, but the desired content starts just below the window and not above. Do you know what I mean?
    You have to scroll down until the sorting is at the top of the window.

    Plugin Author Estatik

    (@estatik)

    You can use any html class from the page for the scrolldown instead of es-listing in our code snippet. If you want the sorting drop-down also to appear after the scroll, please use the es-dropdown-container class.
    If our assistance is required, please contact us>> directly.
    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Sorting: Jump mark after reload’ is closed to new replies.