jquery - Is it possible to get the target css property value during a css3 transition in Javascript? -
i've 2 divs positioned absolutly , position them relative each other. when width
of 1 change, recalculate , set positions. while use css3 transition on 'width
' property, when try 'width
' of animated one, gives me current value on dom. want target value of transition set positions correctly on begin of transition effect. possible target value via javascript or other ways?
edit
below jsfiddle demonstrates issue. alerts '100px' need '300px'.
thanks.
that's because .css('width')
calling getcomputedstyle
on element, return transitioning value. if did directly access style, had set:
document.getelementbyid('transition_div').style.width $('#transition_div').prop('style').width $('#transition_div')[0].style.width
Comments
Post a Comment