Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

click event using data attribute

keerthana_hn
Level 3
Level 3

Hi all,

 

keerthana_hn_0-1623677334328.png

<td class="cmp-modal-downloads__col--action" data-asset-share-id="download-archive" data-asset-share-download-id="61a36495-c979-4900-95a4-08d9a2e0f506">

 

<a href="page link" class="ui positive primary right labeled icon button">
Download
<i class="download icon"></i>
</a>
</td>

 

how to do click event using "data-asset-share-id" attribute of download button which is inside table tag so that I can use other values which is inside td tag?

 

1 Accepted Solution
Varun_Shakya
Correct answer by
Community Advisor
Community Advisor

Try this selector

$("[data-asset-share-id='download-archive']") to get the click event on attribute

View solution in original post

4 Replies
Varun_Shakya
Correct answer by
Community Advisor
Community Advisor

Try this selector

$("[data-asset-share-id='download-archive']") to get the click event on attribute

View solution in original post

keerthana_hn
Level 3
Level 3

@Varun_Shakya I have used this selector but still click event isn't happening.

Varun_Shakya
Community Advisor
Community Advisor
Try these selectors $("td[data-asset-share-id='download-archive']") or $("tr").on("click","td[data-asset-share-id='download-archive']")