From 02a9c1c94e052463d8df59cfadc280c6a0484c90 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 28 Jun 2016 13:02:30 -0400 Subject: [PATCH] removing src with jquery to prevent alt text from showing over image --- assets/Transparent.gif | Bin 0 -> 42 bytes js/app.js | 3 ++- js/custom/pageSetup.js | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 assets/Transparent.gif diff --git a/assets/Transparent.gif b/assets/Transparent.gif new file mode 100644 index 0000000000000000000000000000000000000000..f191b280ce91e6cb8c387735c10ef9bc5da6c83b GIT binary patch literal 42 ocmZ?wbhEHbWMp7uXkY+=|Ns9h{$ybUF?B!$NQQxl(S^Yp0J!f4_W%F@ literal 0 HcmV?d00001 diff --git a/js/app.js b/js/app.js index 396cf9f..1d99849 100644 --- a/js/app.js +++ b/js/app.js @@ -87,9 +87,10 @@ $(document).ready(function () { // changing the img tag for category view from a source to having a background to make the sizes uniform $(".attachment-shop_catalog").each( function () { var img_src = $(this).attr("src"); + console.debug(img_src); $(this).css("height", 175).css("width", 'auto'); $(this).css("background", 'url(' + img_src + ') no-repeat center center').css("background-size", "cover"); - $(this).attr("src", "blank").attr("srcset", "blank"); + $(this).removeAttr("src"); }); }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 470eb3d..1a1e334 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -78,9 +78,10 @@ $(document).ready(function () { // changing the img tag for category view from a source to having a background to make the sizes uniform $(".attachment-shop_catalog").each( function () { var img_src = $(this).attr("src"); + console.debug(img_src); $(this).css("height", 175).css("width", 'auto'); $(this).css("background", 'url(' + img_src + ') no-repeat center center').css("background-size", "cover"); - $(this).attr("src", "blank").attr("srcset", "blank"); + $(this).removeAttr("src"); }); }); -- 2.17.1