I have been trying to target a .parents() a tag
I am using this code –
$('#nav li li:has(a.current)').parents('li').find('a').addClass('current');
It does target the parents a tag and add the correct class but it also adds the class to all its siblings.
Any tips on why I am also getting siblings?
It sounds like you only want the
Athat is the child of the parent, switchfind()tochildren()