inherit
169267
0
Nov 23, 2024 18:59:51 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Apr 27, 2022 6:04:44 GMT -8
I'm wracking my brain about this problem. I made a flip card plugin which on one side shows an image or a gradient on the front card. my problem is when I hide the image the broken image icon shows over the gradient div. How can I get rid of that broken image icon? If you want to look at it: My test siteThanks in advance
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Apr 27, 2022 9:05:18 GMT -8
I'm wracking my brain about this problem. I made a flip card plugin which on one side shows an image or a gradient on the front card. my problem is when I hide the image the broken image icon shows over the gradient div. How can I get rid of that broken image icon? If you want to look at it: My test siteThanks in advance
How are you hiding the image? It sounds like you are removing the image URL, or changing it in some way to stop it linking to the picture..
Either way will end up displaying the broken image graphic, as the IMG tag is still there, but with a link to nowhere.
To hide the image change the CSS visibility attribute..
your image tag { visibility: hidden; }
And to re-enable it..
your image tag { visibility: visible; }
|
|
inherit
169267
0
Nov 23, 2024 18:59:51 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Apr 27, 2022 10:21:55 GMT -8
TodgeI actually found away to do it. I will post it here when it get home. Thanks for your reply
|
|
inherit
169267
0
Nov 23, 2024 18:59:51 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Apr 27, 2022 10:29:49 GMT -8
Todge$("#ask").error(function(){ $(this).hide(); });
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Apr 28, 2022 9:09:45 GMT -8
Todge $("#ask").error(function(){ $(this).hide(); });
Yup, that will work too.
Do note that the .error() function is now deprecated, and while this shouldn't cause you a problem, it is possible that the function will be removed from some future iteration of JQuery.
|
|
inherit
169267
0
Nov 23, 2024 18:59:51 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Apr 28, 2022 10:42:50 GMT -8
TodgeWill there be a work around in jquery For .error()
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Apr 28, 2022 12:16:22 GMT -8
Todge Will there be a work around in jquery For .error()
There's not a work-around per se, but it has been replaced.
Instead of .error( handler ), you should use .on( "error", handler )
.error() | jQuery API Documentation
|
|
inherit
169267
0
Nov 23, 2024 18:59:51 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Apr 28, 2022 12:38:05 GMT -8
Ok just in case someone runs into this problem. Code change up: $('#any').on("error",function(){ $(this).hide(); }); Big thanks to Todge
|
|