7. Toggling Classes


This is the error message: Oops, try again. Did you replace your .addClass() with a .toggleClass()?

Another thing I've noticed is that .toggleClass doesn't change colors like .addClass did, and I think there may be a problem that I'm not seeing

$(document).ready(function() {
    $('#text').click(function() {



you should use #text or this instead of div .

we don't want .toggleClass for all the div elements .


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.