It sounds simple, and there's a solution involving altering CSS classes, but I was wondering if there's an elegant, on the fly solution to the following issue.
This is a similar question, but it creates "too much recursion" for my scenario.
So I have 2 buttons that both go to the next tab; one at the top of the content, one below. And I want them both to show the state of hover when I hover over either one of them. They have the same html code;
<a href="#" class="button step-next" onclick="showStep(3); return false;">Next »</a>
and following the other post, I've tried the solution;
$('a.step-next').on('mousenter mouseleave', function(e) {
$('a.step-next').not(this).trigger(e.type);
});
But my initial logic of using the not() is wrong; it'll just fire the event back and forward between each of the 2 elements.
Clearly, I can alter the CSS to add a new class and remove it on hover/not, which is the route I'll go down. But is there a trigger-only solution?