Jorge Chamorro wrote:
> Is there a way to attach a callback for -webkit-transform: translate3d
> () without creating an animation?
>   
> I've tried it with both addEventListener("webkitAnimationEnd",  
> callback, false); and "webkitTransitionEnd", but nothing !
>   
There is.  iUI does it:
http://code.google.com/p/iui/source/browse/iui/iui.js?r=REL-0.30

See slidePages (lines 358-381) and slide2 (lines 426-443)  Note that the 
same callback used by CSS Transitions is also used by the fallback 
timer-based animation.

> Also, I see a small glitch on the screen (but only once), when the on- 
> screen "ul" gets (for the first time) the .style.webkitTransform=  
> "translate3d("+ distancia+ "px, 0px, 0px)";.
>   

Making sure glitches don't happen is tricky as the behavior is timing 
dependent and can be different in different places (Desktop Safari, 
Simulator, actual iPhone) and may also be dependent upon software versions.

In the slide2 function you'll see that I'm turning off transitions 
before setting up some of the parameters.  Also be aware that unless the 
"selected" attribute is set to "true" the div/ul will be set to 
"display: none" by iui.css.

To get everything perfect takes time and testing in different places.

I hope this helps,

Sean


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to