you can use toggleClass http://api.jquery.com/toggleclass/