JavaScript Change CSS Class Style className Toggle Tutorial




Lesson Code: http://www.developphp.com/video/JavaScript/Change-CSS-Class-Style-className-Toggle-Tutorial
Learn to change, toggle and swap CSS classes using JavaScript event handling.

Original source


20 responses to “JavaScript Change CSS Class Style className Toggle Tutorial”

  1. Awesome! This is EXACTLY what I need. I only had one problem: I need many different buttons. Not several like one, but several that are each individual. I tried copying all of the coding and changing "class1" to "class3" and "class2" to "class4" but when I load my site and click the original (class1) it disappears. But my class3 works normal…?

  2. What about if you wanted to change the property of another element
    ie: in the first example, click the first box and the third box changes (or any other element). Which selector would I use instead of "this"

  3. … and once again thx Adam for making us better coders.

    To me there is no one out there more inspiration to do a better job and move forward then you are.

    And I don't know HOW you do it, but you are bringing up every time something that I need right in that moment when you publish a tutorial 😀

Leave a Reply