The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I want to put a click function on an element and it’s siblings, how would I do that.
Putting it on an element is easy, but how to target both it AND it’s siblings is lost on me.
This simple function will solve all your problems =) : andSelf()
$('#example').siblings().andSelf().css('border', '3px solid red');
How the heck was I not aware of .andSelf() ?
I never even noticed it in the jQuery API
Yeah, this solves my problem just fine, thank you