117
rated 0 times
[
122]
[
5]
/ answers: 1 / hits: 33319
/ 8 Years ago, fri, june 17, 2016, 12:00:00
I'm using Clipboard.js and am trying to get the text in a <td>
node using the following:
$('.clipboard').click(function(evt) {
clipboard.copy(evt.target.val()).then(
function(){console.log(success);},
function(err){console.log(failure, err);}
);
});
Obviously .val()
is not a valid method on evt.target
. What's the correct way of getting the nodes text value using evt
here?
More From » jquery