Erik Hellman

developing with passion

Never Write hasClass Again

1
$('.navigation').hasClass('collapsed');

The code above can be easily refactored into the both shorter and easier to read:

1
$('.navigation').is('.collapsed');

Comments