jQuery deprecated toggle() method. It was way to easy to toggle classes, While searching stackoverflow I found various other methods to accomplish the same task( Alternative to jQuery's .toggle() method that supports eventData? ). Which jQuery snippet should be ideal to switch classes for this markup?
Thanks
Markup:
<a href="#">Toggle Class</a>
<div class="a"></div>
CSS:
.a{
background: #f2f2f2;
}
.b{
background: #ededed;
}