I got a strange problem. I am working at my JS-only-lightbox to support multiple images ( https://github.com/felixhagspiel/jsOnlyLightbox for those who are interested ). So I am not using jQuery.
Now I want to add the possibility to add animations via CSS3-transitions.
What I do is to add the class jslghtbx-animating-next to the image inside the lightbox, once the next-arrow has been clicked. The image has an transition: all .6s ease-in-out; property, and the class jslghtbx-animating-next contains nothing but margin-left: -100%;. But the image isnt animated, it just pops to the new position. On the other hand, when I use opacity instead, it works. When I apply the margin-left-property via firebug, the animation also works. I thought maybe it is because the image has margin-left: auto; per default, but removing that didn`t do the trick.
Testingserver: http://testing.felixhagspiel.de/index.html
Zip-File: http://testing.felixhagspiel.de/jsOnlyLightbox.rar
You have to click on one of the images below the headline "Use groups to show multiple images" and then click on the right arrow (only next-function is in there so far). I also added a delay of 5sec for easier debugging.
Any help would be great!
.jslghtbx-contentwrapper > imgto something likemargin-left: 30%then the transition works properly. You can't animate from "auto" to a numeric value, I don't think.