Click here to Skip to main content
15,882,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to add button text to click event.but i don't know how can i do !!

What I have tried:

<button class="btn btn-success user" data-bind="attr: { 'data-cid': ConnectionId, 'title': Username }">Video Call</button>

<button class="btn btn-success user" data-bind="attr: { 'data-cid': ConnectionId, 'title': Username }">Audio Call</button>

and i have click evnet

$('.user').live('click', function () {
             //Here i required button click text
              // Find the target user's SignalR client id
              var targetConnectionId = $(this).attr('data-cid');

}
Posted

1 solution

try this: using jquery:

$(this).val(): or
$(this).text();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900