Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

overlaying divs with onclick in slideshow -> onclick doesnt change

overlaying divs with onclick in slideshow -> onclick doesnt change

Problem

what I mean in the title is, no matter which container is on top (is visible) in the fade-style animation, the href in the "onclick" is always the same.

here is the html

here is the css

#teaserslider{
   height: 100px;
   margin-bottom: 6px;
}

#teaserslider li {

   position: absolute;

   list-style: none;
   -webkit-transition: opacity 1s ease-in-out; 
}

@-webkit-keyframes fadeout{

0% {
    opacity:1;
}
45% {
    opacity:1;
}
55% {
    opacity:0;
}
100% {
    opacity:0;
}
}

#teaserslider li.animation {
   -webkit-animation-name: fadeout;
   -webkit-animation-timing-function: ease-in-out;
   -webkit-animation-iteration-count: infinite;
   -webkit-animation-duration: 5s;
   -webkit-animation-direction: alternate;
   -webkit-transform: translateZ(0);//hardware acceleration

}

you may have noticed, I only use the webkit engine because this code runs inside a Phonegap Application for iOS. No matter which container is showed currently, when I click the container I always get to "container2_detail.html". Anyone know how to solve this? thanks.

Problem courtesy of: dan

Solution

I tried this and it seems to work

@-webkit-keyframes fadeout{

0% {
    opacity:1;
    z-index: 1;
    display: block;
}
45% {
    z-index: 1;
    display: block;
    opacity:1;
}
55% {
    z-index: -1;
    display: none;
    opacity:0;
}
100% {
    z-index: -1;
    display: none;
    opacity:0;
}

}

Solution courtesy of: dan

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

overlaying divs with onclick in slideshow -> onclick doesnt change

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×