Fixing js error in IE9 where no transition is supported