You need to add preventDefault() to your click handler. This will stop the browser executing it's own link handler, and will only run the code you specify. Example: $("#myID").click(function(e) { e.preventDefault(); // Do your stuff });
Month: October 2015
In order to add the “Add to wishlist” button into your custom built content-single-product.php you must add this line to the top of your file: global $wishlists; Then add this code where you want the button to appear: $wishlists -> add_wishlist_form(); If you need it without the quantity field just use this instead for the … Continue reading Woocommerce Wishlist Button on Product Detail Page