There is a code:
<span class="word" data-wv="Able"> Able </span> <span class="word" data-wv="apple"> apple </span> <span class="word" data-wv="and"> and </span> How do you click on one of the words to transfer its value data-wv in get request?
Able There is a code: How do you click on one of the words to transfer its value data-wv in get request? Source: https://ru.stackoverflow.com/questions/602219/<span class="word" data-wv="Able"> Able </span> <span class="word" data-wv="apple"> apple </span> <span class="word" data-wv="and"> and </span> 1 answer
$('span').click(function() { var e = this; $.ajax({ url: 'url', type: "GET", data: {wv: $(e).attr('data-wv')}, // или $(e).data('wv'), или $(e).data().wv success: function() { } }); });
All Articles