[jquery-dev] Re: Webkit CSS animations for jQuery

2008-10-20 Thread Andrea Giammarchi
What about this? var isTransformSupported = "WebkitTransform" in document.documentElement.style || "MozTransform" in document.documentElement.style; On Mon, Oct 20, 2008 at 5:05 PM, kangax <[EMAIL PROTECTED]> wrote: > > On Oct 20, 10:19 am, weepy <[EMAIL PROTECTED]> wrote: > > This is a bit hack

[jquery-dev] Re: Webkit CSS animations for jQuery

2008-10-20 Thread kangax
On Oct 20, 10:19 am, weepy <[EMAIL PROTECTED]> wrote: > This is a bit hacky but works : > >   function transitionsAreSupported() { >     var stylesheet = document.styleSheets[0]; >     stylesheet.insertRule('div#ALongAndUnlikelyId { -webkit- > transition: opacity 1s linear; }', 1); >     var ret =

[jquery-dev] Re: Webkit CSS animations for jQuery

2008-10-20 Thread weepy
This is a bit hacky but works : function transitionsAreSupported() { var stylesheet = document.styleSheets[0]; stylesheet.insertRule('div#ALongAndUnlikelyId { -webkit- transition: opacity 1s linear; }', 1); var ret = stylesheet.cssRules[0].style.webkitTransitionDuration != null

[jquery-dev] Re: Webkit CSS animations for jQuery

2008-10-20 Thread Brandon Aaron
Remember also that we need to try and make this work without browser detection. I'm assuming we'll have to do a quick feature detection. -- Brandon Aaron On Mon, Oct 20, 2008 at 3:47 AM, Paul Bakaus <[EMAIL PROTECTED]>wrote: > > This is quite cool! > > I've been thinking about this for quite some

[jquery-dev] Re: Webkit CSS animations for jQuery

2008-10-20 Thread weepy
The easing functions are quite simple for webkit transition-timing-function default | linear | ease-in | ease-out | ease-in-out | cubic- bezier(x1, y1, x2, y2) As long as we can map the jquery easing to these it should be straight forward. Note that one thing my function doesn't do is that t

[jquery-dev] Re: Webkit CSS animations for jQuery

2008-10-20 Thread Paul Bakaus
This is quite cool! I've been thinking about this for quite some time, and it's nice to see someone else having the same idea. If we could land a solid version of that in the core, that'd be awesome. I'm thinking about how feasible it would be to port easing as well - CSS Transforms support easi