javascript - Event listener only for a variable -


i have following code:

var right = document.getelementsbyclassname("dreapta")[0];  function scaletext(){     right.style.backgroundcolor = "#111";     right.style.color = "white"; } right.addeventlistener('click', scaletext, false); 

can explain me why event not working?

the problem html,i had audio tag had removed. working :).ty guys , sorry bothering.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -