javascript - understanding transition function by ALEX MACCAW -


hey guys new js , reading article provided referance in bootstrap.js transitions :

css transitions using jquery

now if go part says programmatic transitions, thats part tried implementing .

fiddle here.

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

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -