Need to select element that is not followed by the same class, last-of-type is not good because it selects only the last element, but I need to select all elements that are not followed by the same, here is the example:
<div class ="the_class"> A </div>
<div class ="the_class"> B </div>
<div class ="the_class"> C </div>
<div class ="other_class"> D </div>
<div class ="the_class"> E </div>
<div class ="the_class"> F </div>
<div class ="the_class"> G </div>
I need to select C, and G.