javascript - understanding transition function by ALEX MACCAW -
hey guys new js , reading article provided referance in bootstrap.js transitions :
now if go part says programmatic transitions, thats part tried implementing .
but somehow code famious article does't work .
why ?
code below :
$(document).ready(function () { var defaults = { duration: 4000, easing: '' }; $.fn.transition = function (properties, options) { options = $.extend({}, defaults, options); properties['webkittransition'] = 'all ' + options.duration + 'ms ' + options.easing; console.log(properties); $(this).css(properties); }; $('.element').transition({ background: 'red' }); });
found solution in transition.js
i need have code below :
var transendeventnames = { webkittransition : 'webkittransitionend', moztransition : 'transitionend', otransition : 'otransitionend otransitionend', transition : 'transitionend' } (var name in transendeventnames) { if (el.style[name] !== undefined) { return { end: transendeventnames[name] } } }
my code working in chrome , while testing in mozilla .
thanks time guys .
Comments
Post a Comment