opacity and zIndex not getting set when hovered
Posted
by Catfish
on Stack Overflow
See other posts from Stack Overflow
or by Catfish
Published on 2010-03-23T03:27:21Z
Indexed on
2010/03/23
3:31 UTC
Read the original article
Hit count: 483
I'm messing around with a jquery carousel script and i'm trying to get it so when you hover over an image, the size will be doubled(which i have working) and the opacity will be 100.
The script is here http://steph.net23.net/ImageCarousel/
This is the part i've added to double the width and height but the opacity is not taking effect.
The original script came from here http://www.devirtuoso.com/2009/08/how-to-create-a-3d-tag-cloud-in-jquery/
$('#list a img').hover(
function() {
clearInterval(go);
$(this).css('height', '200px');
$(this).css('width', '400px');
$(this).css('margin-left', '-100px');
$(this).css('opacity', '100');
var opac = $(this).css('opacity');
$(this).css('zIndex', '0');
var z = $(this).css('zIndex');
console.log("opacity = "+opac);
console.log("zindex = "+z);
},
function() {
go = setInterval(render, 20);
$(this).css('height', '100px');
$(this).css('width', '200px');
$(this).css('margin-left', '0');
});
© Stack Overflow or respective owner