I currently have a functional accordion implemented as shown below
<accordion-group is-open="open.first">
<accordion-heading>
My Title
</accordion-heading>
</accordion-group>
The "Accordion-heading" directive transforms into the following structure
<h4 class="panel-title">
<a class="accordion-toggle"
accordion-transclude="heading" ng-click="toggleOpen()" href="">
My Title
</h4>
Now, my goal is to toggle a class on the h4 element whenever a user clicks on the accordion option/title. The equivalent jQuery code for achieving this functionality would be:
$('.panel-heading .panel-title').on('click', function () {
$(this).toggleClass('actives');
});
I believe I need to create a directive to accomplish this task, but I am unsure about the exact approach. Any guidance on how to proceed with creating the directive would be greatly appreciated.