From e8dface5456e456bb1d83783cfa7ae798f565209 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Tue, 9 May 2017 11:38:07 -0400 Subject: [PATCH] Instead of removing the href of the product links on the shop page, they're now replaced by the image source, so they don't disappear momentarily when clicked --- js/app.js | 2 +- js/custom/pageSetup.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 63c0707..ae5e99d 100644 --- a/js/app.js +++ b/js/app.js @@ -21,7 +21,7 @@ $(document).ready(function () { $(".woocommerce-LoopProduct-link").each(function() { // Removing all the anchors from the products so that you won't // navigate away when clicking in one, allowing fancybox to display - $(this).attr("href", ""); + $(this).attr("href", $(this).children("img").attr("src")); }); $(".woocommerce-LoopProduct-link").fancybox({ diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index c21df91..8d07586 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -12,7 +12,7 @@ $(document).ready(function () { $(".woocommerce-LoopProduct-link").each(function() { // Removing all the anchors from the products so that you won't // navigate away when clicking in one, allowing fancybox to display - $(this).attr("href", ""); + $(this).attr("href", $(this).children("img").attr("src")); }); $(".woocommerce-LoopProduct-link").fancybox({ -- 2.17.1