Is it possible to override Javascript in a plugin with a child theme?
Specifically I'm trying to override a portion of a WooCommerce product page - I would like to get rid of the tabbed content areas, and instead have all of the content visible with the "tabs" then being anchor links down the page.
I've figured out how to do that on a local install by deleting a portion of Javascript within the WooCommerce plugin files - but that's obviously not a workable solution longterm.
I would like to essentially dequeue the Javascript in the plugin, and enqueue my own file with the unneeded portion removed.
This is the bit of code I need to be rid of, if there's another way to go about overriding it?
.on( 'click', '.wc-tabs li a, ul.tabs li a', function( e ) {
e.preventDefault();
var $tab = $( this );
var $tabs_wrapper = $tab.closest( '.wc-tabs-wrapper, .woocommerce-tabs' );
var $tabs = $tabs_wrapper.find( '.wc-tabs, ul.tabs' );
$tabs.find( 'li' ).removeClass( 'active' );
$tabs_wrapper.find( '.wc-tab, .panel:not(.panel .panel)' ).hide();
$tab.closest( 'li' ).addClass( 'active' );
$tabs_wrapper.find( $tab.attr( 'href' ) ).show();
})