The previous change assumed jQuery was in use (angular.element uses jQuery Lite by default which does NOT support class names with .find() - https://docs.angularjs.org/api/ng/function/angular.element). This change works without wrapping angular.element() around the selectors but I did it to keep it AngularJS-ish (don't really know if there are benefits to making it into a jqLite or jQuery object again).