0
I have the following function, which works to change the arrow of an accordon when it is active (open), arrow down to reverse up, and then return to the original state, but all arrows are affected, and not only the one I am clicking at the moment, How can I fix this? I tried to use this but it didn’t work for this situation:
function controlAccordeon() {
var accordeonTitle = $('.accordeon-open-title');
var angleDown = $('.fa-angle-down');
var angleUp = $('.fa-angle-up');
accordeonTitle.click(function() {
$(this).toggleClass('active');
angleUp.toggleClass('hide');
angleDown.toggleClass('hide');
});
}
angleUp.toggleClass('hide');
andangleDown.toggleClass('hide');
has to be done by navigating in html and not in this way but it hits all. Showing the corresponding html helps to get the correct answer– Isac
Put an id on the element you want to move and call it id instead of class
– guijob