How to get button text inside a tag?
HTML example:
<button type="button" class="btn btn-danger" id="dislikes" value="notThisValue">DISLIKES<span class="glyphicon glyphicon-thumbs-down"></span></button>
My jQuery:
$(document).ready(function(){ $('#dislikes').click(function() { $("#dislikes").val('Hello World'); }) });
I need to change the text of DISLIKES to YOU DISCLAIMER . My jQuery should change the inner text of the button, not the value of "notThisValue".
source share