Reducing event logic

Changed an if/else block which either removed or added a class to an
element to a single statement which called .toggleClass.