add toggleclass method in javascript code example Example: toggle class <div class="tumble">Some text.</div>