use jQuery toggle function http://docs.jquery.com/Effects/toggle