Re: [CSS 3] Transform on Complete Event

Ok. Got it.  Just sending a sample test for future purpose.

<html>
<head>
     <script>
var t=0;
function dosomething(){
if(t==0){
document.getElementById("test").style.border="solid 10px black";
t=1;
} else {
document.getElementById("test").style.border="solid 1px black";
t=0;
}
}

function pageLoad(){
document.getElementById("test").addEventListener('webkitTransitionEnd',
check);
}

function check(){
alert("hola");
}
     </script>
</head>

<body onload="pageLoad();">
<div id="test" style="width: 100px;height:100px;border: solid 1px black;
-webkit-transition: border 2s linear;" onClick="dosomething();">Hello</div>
</body>

</html>

On Mon, Feb 8, 2010 at 6:23 PM, Jaikishan Jalan <jai.ism@gmail.com> wrote:

> Thank You Simon. Yes, I missed that and I was looking exactly for the that.
> Is there any example that demonstrates how to use this ?
>
>
> On Mon, Feb 8, 2010 at 9:04 AM, Simon Fraser <smfr@me.com> wrote:
>
>> On Feb 7, 2010, at 1:40 PM, Jaikishan Jalan wrote:
>>
>> From my understanding of current draft of CSS 3, I believe that there is
>> no way to listen to the event when a particular transformation ( for
>> example, scale, rotate etc.. ) is completed? Is that correct ? And if yes, I
>> believe that it will be very useful if we can listen to such event.
>>
>>
>> I assume you mean that you would like an event when a *transition* of a
>> transform completes?
>>
>> The transitions spec does indeed provide an event for transition
>> completion:
>> <
>> http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
>> >
>>
>> WebKit implements this (with the 'webkit' prefix on the name).
>>
>> Simon
>>
>>
>
>
> --
> Thanks,
> Jaikishan
>



-- 
Thanks,
Jaikishan

Received on Tuesday, 9 February 2010 02:56:01 UTC