<div class="js-show-more">
<p class="app-light-text">
The factors of a number are all the numbers that divide into it. The highest common factor, HCF, of two
or more numbers is the highest factor that divides into all the numbers. For example, what is the highest
common factor of 24 and 36? The answer is 12. 12 is a factor of both 24 and 36 and it is the highest
factor that they have in factors of a number are all the numbers that divide into it. The highest common factor, HCF, of two
or more numbers is the highest factor that divides into all the numbers. For example, what is the highest
common factor of 24 and 36? The answer is 12. 12 is a factor of both 24 and 36 and it is the highest
factor that they have in common
</p>
<a ng-click="toggle($event)" class="js-show-more-toggle"></a>
</div>
// JS
scope.toggle = function (e) {
console.log(scope);
// $(e).parents('.js-show-more').toggleClass('open');
};
I'm trying to get the current class so I can then get the class above to add the class open to it.
What is the best way to do this?
So .js-show-more
has the class .open
when class .js-show-more-toggle
is clicked. I need this to work for duplicates of this code.