jquery - Javascript function doesn't do a transition -


i want make list in nav have transition applied.


the call

animate(0,"mainnav",.04,0.03);   

the function

function animate(num, element, transitionunit, delayunit){         var transition = 0;         var delay = 0;         var x = document.queryselectorall('nav > ul > li');         (i=0; i<x.length; i++){                 x[i].style.webkittransform = "translate3d("+num+"px,0px,0)";                 x[i].style.opacity = "1";                 x[i].style.transition = transition + "s " + delay +"s !important";                 delay += delayunit;                 transition += transitionunit;             }         } 

this function applies changes except misses x[i].style.transition = ""; , x[i].innerhtml = "";

what problem? i've tried changing including queryselector, i've had found work except 2 have mentioned above.

p.s. works

animate(0,"viewnav",.04,0.03);   

i need work mainnav


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -