Kill the annoying bug in Webkit browsers where CSS transitions don't start if you change the float property. Here's a script for a demo: http://jsfiddle.net/patrickmarabeas/RxeWc/
Essentially, if you look at the transition when changing the width of an element, but also change float: left; on float: none; , the transition simply does not work. This causes additional problems when you intend to invoke some JS during the transition phase:
$('#element').one('transitionend webkitTransitionEnd oTransitionEnd otransitionend', function(){ ... }
I apply a class that changes the float property of elements before changing the width, and tried both:
$(this).toggleClass('removeFloat widthChange'); //and $(this).toggleClass('removeFloat'); $(this).toggleClass('widthChange');
I ran into this problem due to the need to use white-space: nowrap; in one specific instance of the layout - which does not work with floating elements.
source share