Upon clicking a link within an element, the following CSS is applied:
<a class="vehicleinfo avai-vehicle-info-anc-tag" ng-click="vehicleInfo($event)">Vehicle Info
<span class="s-icon red-down-arrow"> </span>
</a>
$scope.vehicleInfo = function(event) {
var el = jQuery(event.currentTarget),
featuredcarbox = el.closest(".avilablecar.available-car-box");
featuredcarbox.find(".avlcarimagetab img").toggleClass("slide-left");
featuredcarbox.toggleClass("bg-grey");
el.toggleClass("icon-remove");
featuredcarbox.find(".available-car-fac").toggleClass("hidden");
}
I am interested in removing all the toggled classes applied to each element (vehicle) by calling a single function.
Any suggestions on how I can achieve this?