javascript - is it possible that by clicking, the class of the element change? -
i want put switch website when click language of page change. yesterday saw close live example in website.
here's link: http://iranfilm76.com/
the object on left side in header i'm trying achieve, instead of changing background want change language.
i have functions changing language, problem object, download image , css file.
i take close @ codes firebug , when click on tag class of tag changes class="changestyle"
.
how can this? suggestion.
your_element.addeventlistener("click", function(){ this.classlist.toggle("changestyle"); });
demo: http://jsfiddle.net/derekl/kpwkg/ | http://jsfiddle.net/wsgga
Comments
Post a Comment