117
rated 0 times
[
119]
[
2]
/ answers: 1 / hits: 37754
/ 10 Years ago, sun, may 11, 2014, 12:00:00
I have the follwing link:
<a href=edit/2 class=popup data-toggle=modal data-target=#productVariantModal> <span class=glyphicon glyphicon-edit></span></a>
I would like to get the data-target dynamically so I could reuse my javescript code.
I have tried something like this:
var target = $(this).closest('[data-target]');
But this does't work.
Any Suggestions are welcome.
Thanks.
More From » jquery