click event using data attribute

Avatar

Avatar
Boost 5
Level 2
keerthana_hn
Level 2

Likes

6 likes

Total Posts

31 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Validate 1
View profile

Avatar
Boost 5
Level 2
keerthana_hn
Level 2

Likes

6 likes

Total Posts

31 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Validate 1
View profile
keerthana_hn
Level 2

14-06-2021

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?

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 10
MVP
Varun_Shakya
MVP

Likes

124 likes

Total Posts

97 posts

Correct reply

24 solutions
Top badges earned
Give Back 10
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Give Back 10
MVP
Varun_Shakya
MVP

Likes

124 likes

Total Posts

97 posts

Correct reply

24 solutions
Top badges earned
Give Back 10
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
Varun_Shakya
MVP

14-06-2021

Try this selector

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

Answers (1)

Answers (1)

Avatar

Avatar
Boost 5
Level 2
keerthana_hn
Level 2

Likes

6 likes

Total Posts

31 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Validate 1
View profile

Avatar
Boost 5
Level 2
keerthana_hn
Level 2

Likes

6 likes

Total Posts

31 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Validate 1
View profile
keerthana_hn
Level 2

14-06-2021

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