Skip to content

Instantly share code, notes, and snippets.

@jmabbas
Last active January 30, 2017 05:55
Show Gist options
  • Save jmabbas/4b0045e08fe2a2367e3d2505c8936956 to your computer and use it in GitHub Desktop.
Save jmabbas/4b0045e08fe2a2367e3d2505c8936956 to your computer and use it in GitHub Desktop.
Unicase Tooltip add for Wishlist/Compare
.woocommerce .shop_table tbody tr td.product-remove a {
display: inline-block;
}
.woocommerce .shop_table tbody tr td.product-remove a {
width: 18px;
}
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 );
(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