# \[JS\] switch css style for element

**URL:** <https://forum.kirupa.com/t/js-switch-css-style-for-element/202891>\
**Category:** web dev\
**Created:** [October 5, 2006, 5:04pm UTC](https://forum.kirupa.com/t/js-switch-css-style-for-element/202891 "2006-10-05T17:04:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superjohn](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@superjohn](https://forum.kirupa.com/u/superjohn)\
**Post date:** [October 5, 2006, 5:04pm UTC](https://forum.kirupa.com/t/js-switch-css-style-for-element/202891/1 "2006-10-05T17:04:36Z")

</div>

I am trying to find a way to dynamically change the of a certain element. The tutorials i’ve found however all focus on changing one aspect of the style like \*thing.style.left = “100px”;.  
\*What i want to do is switch between styles which are defined in my css. Is this even possible? Thanks.
