Within GTM, I am attempting to retrieve the inner text of a sibling element when the clicked element is triggered.
<div class="repair-item-n ">
<div class="repair-slide--54894d33-6c88-488f-95d7-3ec9b6a3ade4">
<div class="restoration_wrap text-center">
<img class="restoration-image">
</div>
<p class="title">Bags</p>
</div>
</div>
For instance, upon clicking on the "restoration-image" class, I want to retrieve the value "Bags".
Since there are multiple instances of this HTML structure on the page with variations like "Shoes", "Hats", etc., I aim to identify and return the respective text of the "title" class upon each click event.