Check if a transition will be applied to an element

wbhrevaktrc122

New Member
I am using CSS transitions to animate the removal of an element from the screen. In FireFox I use the "transitionend" event to detect when the transition is complete and then remove it from the DOM. This only works however if an transition actually occurs.How can I tell, from JavaScript, whether the change in a property will ultimately result in a "transitionend" event being sent? If there is no transition then I must remove the element directly.For clarity, I wish to know whether a change in property will trigger an event or not (FireFox is fine for now). This is because I need to trigger an action at the end of the transition, and if there will be no transition I need to trigger it immediately.
 
Back
Top