On click of fa-eye icon I want to focus/highlight only that div.
Html:
<i style="float: right; margin: 8px; cursor: pointer;" class="fa fa-eye" ng-click="focus()"></i>
JS:
$scope.focus = function($element) {
$('#focus-overlay').toggleClass("focus-overlay");
$('#last').toggleClass("widget-focus-enabled");
};
In place of id="last"
I have to find the id on click of icon and then need to add class..
I tried : $($event.target).parent()
but not able to get the result.
Demo : http://plnkr.co/edit/HvTRdjNVdmHjnyG41O4F?p=preview
Please help.