Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #379989

    I had to create a custom tabbing that the built in tabbing system couldnt handle, so I used bootstraps js for that.

    However, now my tab links mindlessly scroll up to no where in particular.

    Its probably smoothscroll that is causing the scroll up?

    How can I deactivate smoothscroll for those links, or otherwise fix this issue?

    Example in private content.

    #380428

    Hi Tom!

    Not sure what would be going on there. This is bordering on custom work though since your using a lot of external coding, etc etc.

    You think it is smoothscroll? Not sure if this is correct but you could try changing line 88 in the /enfold/js/avia.js file from this.

    $('a[href*=#]', container).avia_smoothscroll(container);
    

    To this.

    $('a[href*=#]:not(.custom_class)', container).avia_smoothscroll(container);
    

    And then add a class of “custom_class” to your links.

    Cheers!
    Elliott

    #380590

    Yup that fixed it!

    Is there a way to do this so it wont be overwritten when the theme is updated?

    #380930

    Hey!

    Please use a child theme and move your modified avia.js file inside your child theme into js folder and then add following code to Functions.php file of your child theme

    function wp_change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_print_scripts', 'wp_change_aviajs', 100 );

    Please see – http://kriesi.at/documentation/enfold/using-a-child-theme/
    You can download pre-built child theme here – http://kriesi.at/documentation/enfold/downloads/

    Regards,
    Yigit

    #387650

    Thanks a bunch Yigit! I was wondering what the best solution for that would be.

    Perhaps there is a way to override that specific line instead of the entire file?

    #387710

    Hi!

    That would be the optimum way of overriding the changes.

    Best regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Anchor links jumping up too far with bootstrap tabs’ is closed to new replies.