Reputation: 523
How can I change text of button inside data tables default content.I want to change the text when that button is clicked. ie, view to viewed .How can I do that?
Upvotes: 2
Views: 2039
Reputation: 23816
This can be done by giving save class to each button and add click listener:
class
$('.view-btn').click(function(){ $(this).text("Viewed"); /* Place your custom code here like Ajax request */ });
DEMO
Upvotes: 1