Here is the API for the .toggleClass() method of the Jquery library. I am unsure about how to implement the switch portion. Is the switch portion supposed to result in boolean value, and if it is, then it is either implemented or not?
So if the code was :
`$('selector').toggleClass('class-to-be-toggled' , ($(this).hasClass('white')))`
and the ($(this).hasClass('white'))
evaluated to true, then the .toggleClass()
would execute, and if it evaluate to false, then the .toggleClass()
would not execute?
Or am i misunderstanding the purpose of switch
.