Last active
January 30, 2017 05:55
-
-
Save jmabbas/4b0045e08fe2a2367e3d2505c8936956 to your computer and use it in GitHub Desktop.
Unicase Tooltip add for Wishlist/Compare
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
.woocommerce .shop_table tbody tr td.product-remove a { | |
display: inline-block; | |
} | |
.woocommerce .shop_table tbody tr td.product-remove a { | |
width: 18px; | |
} |
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
if ( ! function_exists( 'unicase_child_scripts' ) ) { | |
/** | |
* Enqueue scripts and styles. | |
* @since 1.0.0 | |
*/ | |
function unicase_child_scripts() { | |
wp_enqueue_script( 'unicase-child-js', get_stylesheet_directory_uri() . '/scripts.js', array( 'jquery' ), '1.0.0', true ); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'unicase_child_scripts', 100 ); |
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
(function($) { | |
'use strict'; | |
$(document).ready(function() { | |
/*===================================================================================*/ | |
/* YITH WISHLIST | |
/*===================================================================================*/ | |
$( '.product-item .add_to_wishlist, .product-item .yith-wcwl-wishlistaddedbrowse > a, .product-item .yith-wcwl-wishlistexistsbrowse > a, .product-item a.compare' ).each( function() { | |
$( this ).attr( 'data-toggle', 'tooltip' ); | |
$( this ).attr( 'title', $( this ).text().trim() ); | |
$( this ).tooltip( { placement: 'bottom' } ); | |
}); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment