14
rated 0 times
[
15]
[
1]
/ answers: 1 / hits: 16308
/ 9 Years ago, wed, march 25, 2015, 12:00:00
Been trying for hours, but can't seem to figure out why adjusting the z-index does not affect the circles in realtime.
Javascript/Jquery:
var greenCircle = #greenCircle;
var blackCircle = #blackCircle;
$(greenCircle).css(z-index, 5);
$(blackCircle).css(z-index, 4);
$(greenCircle).animate({ width: '200%', height: '100%', left: '-50%', top: 0}, lockTime);
Here is the HTML layout:
<img class = clearCircle id = greenCircle src = Resources/Background/GreenCircle.png alt = Clear circle>
<img class = clearCircle id = blackCircle src = Resources/Background/BlackCircle.png alt = Clear circle>
Inital CSS
.clearCircle {
position: absolute;
height: 0;
width: 0;
}
No matter what I have tried, the blackCircle is always in front, and the code is throwing no errors.
Thanks in advance for any help
More From » jquery