Forked from andrea-sdl/disable-scrolling-wc-tabs.js
Last active
July 2, 2021 04:31
-
-
Save kriskratz/b8539f7bc330046bc8cb64f67d84cf14 to your computer and use it in GitHub Desktop.
disable scrolling on woocommerce-tabs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Original Source: https://gist.github.com/andrea-sdl/e3beaa8e2e3256cc4efa0f8527b627aa | |
| // Add to Footer: wp_enqueue_script('wc-disable-tab-scrolling', get_stylesheet_directory_uri() . '/scripts/disable-scrolling-wc-tabs.js', array(), false, true); | |
| jQuery(document).ready(function() { | |
| jQuery(".wc-tabs li a").click( function(e) { | |
| e.preventDefault(); | |
| jQuery(".wc-tabs li").removeClass("active"); | |
| jQuery(this).parent().addClass("active"); | |
| jQuery(".woocommerce-Tabs-panel:visible").hide(); | |
| jQuery(jQuery(this).attr("href")).show(); | |
| return false; | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment