If I have class .A and class .B and want to switch in between on button click, what's a nice solution for that in jQuery? I still don't understand how toggleClass() works.
Is there an inline solution to put it in onclick="" event?
If I have class .A and class .B and want to switch in between on button click, what's a nice solution for that in jQuery? I still don't understand how toggleClass() works.
Is there an inline solution to put it in onclick="" event?
Toggle between two classes 'A' and 'B' with Jquery.
$('#selecor_id').toggleClass("A B");