-
AuthorPosts
-
January 15, 2015 at 1:09 pm #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.
January 15, 2015 at 9:04 pm #380428Hi 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!
ElliottJanuary 16, 2015 at 4:46 am #380590Yup that fixed it!
Is there a way to do this so it wont be overwritten when the theme is updated?
January 16, 2015 at 5:58 pm #380930Hey!
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,
YigitJanuary 29, 2015 at 12:21 pm #387650Thanks 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?
January 29, 2015 at 3:11 pm #387710 -
AuthorPosts
- The topic ‘Anchor links jumping up too far with bootstrap tabs’ is closed to new replies.
