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'.

http://jsfiddle.net/mdbgs/

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 

(updated fiddle)


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -