Check with Javascript or jquery if the parent div of a div contains a specific class name
I have a text in a set of divs. If somebody clicks on that text I have to know if the 4th parent div with the class "div1" holds the class name "exampleclass". My HTML: <div class="div1 exampleclass"> <div class="div2">…