removing src with jquery to prevent alt text from showing over image
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 28 Jun 2016 17:02:30 +0000 (13:02 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 28 Jun 2016 17:02:30 +0000 (13:02 -0400)
assets/Transparent.gif [new file with mode: 0644]
js/app.js
js/custom/pageSetup.js

diff --git a/assets/Transparent.gif b/assets/Transparent.gif
new file mode 100644 (file)
index 0000000..f191b28
Binary files /dev/null and b/assets/Transparent.gif differ
index 396cf9f..1d99849 100644 (file)
--- 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");
     });
     
 });
index 470eb3d..1a1e334 100644 (file)
@@ -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");
     });
     
 });