Jump to content

jquery fadeout issue in chrome


Drongo_III

Recommended Posts

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
Share on other sites

 

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.