Prevent navigation-click jump to top of page and set different anchor

Home Forums Calendar Products Events Calendar PRO Prevent navigation-click jump to top of page and set different anchor

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1434361
    Frank
    Participant

    I’m using Photo-View on the start page including a slider appearing before the calendar. Therefor the calendar isn’t visible before scroll. Problem is, that on clicking the previous and next navigation, the page jumps to the top, hiding the freshly loaded calendar page until the user scrolls down again.

    Goal is, preventing the jump to the top and if possible setting an anchor so that on clicking navigation the page only jumps up to #tribe-events-content

    I tried already editing nav.php and changing the href, but it doesn’t work. Seems that there is a .js deeper down.
    Could you help me out there? You can check the site on deltakosmos.de

    Best,
    Frank

    #1435159
    Andras
    Keymaster

    Hello Frank,

    Thanks for reaching out to us.

    At the moment we are experiencing high traffic in our forums. Our response time might be a bit longer than usual, our apologies for this.

    One of our support members will help you out as soon as possible.

    Please also note that support for customizations is limited as stated in our support policy.

    Thank you for your patience!

    Cheers,
    Andras

    #1435401
    Cliff
    Member

    Hi, Frank.

    I understand your issue, but such customization is outsideĀ our Scope of Support / Terms.

    That being said, my guess is that Line 133 (or one like it) of /wp-content/plugins/events-calendar-pro/src/resources/js/tribe-events-photo-view.js is at play here:

    $( '#tribe-events' ).on( 'click', 'li.tribe-events-nav-next a',function( e ) {

    Note that the minified version of this file will load unless you have define( 'SCRIPT_DEBUG', true ); in your wp-config.php file.

    Even still, I’m not sure how to advise you to customize this as you’re wanting.

    Please let me know what you find out.

    #1436709
    Frank
    Participant

    Hi Cliff,

    thanks for pointing me towards the js file. Seeing the js code I realized that out of the box there shouldn’t be a jump to top of the page when clicking the next/previous buttons above the calendar in the first place. What caused my problem was a messed up div in content.php. Now everything works nice!

    Best,
    Frank

    #1437625
    Cliff
    Member

    Okay, great! Thanks for letting me know. Have a great weekend.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Prevent navigation-click jump to top of page and set different anchor’ is closed to new replies.