Add a class to a parent element with JavaScript


[code language=”javascript”]
$(‘parent-element-to-add-class-to’).parent().addClass("class-you-want-to-add");
[/code]

Tags: , , ,