I would like to use the custom code of Data Elements in Adobe Launch to get a text value for the parent element of the clicked element.
I used $('h2.cmp-teaser__title.wow.animated').text(); method,
When i click the button:("a.cmp-teaser__action-link") it should get the value of the title("cmp-teaser__title.wow.animated") but when I checked with debug tool, the text value is not collected properly. Custom Code of Data Elements in Adobe Launch
My Code for reference:
<div class="cmp-teaser__content">
<div class="cmp-teaser__pretitle">Feature Title</div>
<div class="cmp-teaser__title wow animated" style="visibility: visible;">
<h2>Broclux Title</h2>
</div>
<div class="cmp-teaser__description">
<p>Sample text Sample text Sample text Sample text</p>
</div>
<div class="cmp-teaser__action-container">
<a class="cmp-teaser__action-link" href="#.html" target="_self" title="">View Collection</a>
</div>