css - Change Webkit properties through Javascript? -


please me, might cause i'm new css animations , javascript using code suppose change properties of , when run code else in code except change properties in css of desired div. i've tried 4 of these , none of them seem work, out of date? there new way of doing or what? none of them work @ all.

document.getelementbyid('playbar').style.webkitanimationduration = 20 + "s"; document.getelementbyid('playbar').style.animationduration = 20 + "s"; document.getelementbyid('playbar').style['-webkit-transition-duration'] = '50s';  value = math.floor((100 / duration) * currenttime); document.getelementbyid('playbar').setattribute("style","-webkit-filter:grayscale(" + value + "%)") 

css code

#playbar { width: 1px; height: 12px; background: white; float:left; -webkit-animation: mymove infinite; /* chrome, safari, opera */ -webkit-animation-duration: 10s; /* chrome, safari, opera */ animation: mymove infinite; animation-duration: 0s; }  /* chrome, safari, opera */ -webkit-keyframes mymove { {width: 0%;} {width: 100%;} }  @keyframes mymove { {width: 0%;} {width: 100%;} } 

instead of

this.style['-webkit-transition-duration'] = '50s' 

use

this.style.webkittransitionduration="50s" 

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 -