Drongo_III Posted June 5, 2012 Share Posted June 5, 2012 Hi Guys I am trying to use the jquery fadeOut() function on images as part of a slideshow. The only issue is that chrome refuses to fadeout any image. I was wondering if: a) i am doing something wrong? b) this is a bug in chrome, or chrome doesn't allow images to be faded and instead require perhaps opacity change? The stripped back code is as follows: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <style> div {border: 10px solid #000; width: 380px; height: 128px; margin-bottom: 10px;} #special {float: left; margin-left: 30px;} #img_container {position: relative;} #img_container img {position: absolute; left: 0px; top: 0px;} .showme {z-index: 50; display: block;} .hideme {z-index:1;} </style> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".showme").fadeOut(); }); </script> </head> <body> <div id="img_container"> <img src="images/picture0.jpg" class="showme" id="tester" /> <img src="images/picture1.jpg" class="eee"/> <img src="images/picture2.jpg" class="rfffgg" /> </div> </body> </html> Link to comment https://forums.phpfreaks.com/topic/263733-jquery-fadeout-issue-in-chrome/ Share on other sites More sharing options...
Drongo_III Posted June 5, 2012 Author Share Posted June 5, 2012 I seem to have a solution now - i.e. use animate() and change the opacity to 0, which seems to work cross browser. Still intersted to know whether i was doing something wrong in using fadeout on images or whether it's a chrome bug though... Thanks, Drongo Link to comment https://forums.phpfreaks.com/topic/263733-jquery-fadeout-issue-in-chrome/#findComment-1351510 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.