Last active
August 29, 2015 14:18
-
-
Save maxrice/b7cbc2ab0f8649e061e0 to your computer and use it in GitHub Desktop.
WooCommerce Tab Manager - Force Tab Resize
This file contains 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
<?php | |
/** | |
* Plugin Name: WooCommerce Tab Manager Force Resize | |
* Plugin URI: http://www.skyverge.com/contact | |
* Description: Forces the product page tabs to resize when clicked | |
* Author: SkyVerge | |
* Author URI: http://www.skyverge.com | |
* Version: 1.0.0 | |
* | |
* Copyright: (c) 2015 SkyVerge, Inc. (info@skyverge.com) | |
* | |
* License: GNU General Public License v3.0 | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
function wc_tab_manager_force_tab_resize() { | |
wc_enqueue_js( ' | |
$( ".woocommerce-tabs [class$=\'_tab\'] a" ).click( function() { | |
var selector = $( this ).attr( "href" ); | |
$( selector ).resize() | |
} ); | |
' ); | |
} | |
add_action( 'woocommerce_after_single_product_summary', 'wc_tab_manager_force_tab_resize' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment