From: Anthony Talarico Date: Tue, 28 Jun 2016 17:02:30 +0000 (-0400) Subject: removing src with jquery to prevent alt text from showing over image X-Git-Tag: v1.0.0^2~119 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=02a9c1c94e052463d8df59cfadc280c6a0484c90;p=WP-Themes%2Ffrancejourneys.git removing src with jquery to prevent alt text from showing over image --- diff --git a/assets/Transparent.gif b/assets/Transparent.gif new file mode 100644 index 0000000..f191b28 Binary files /dev/null and b/assets/Transparent.gif differ 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"); }); });