. Advertisement .
..3..
. Advertisement .
..4..
I would love to toggle button in java script with text change but I don’t know what is the best way to do it yet. Can you share with me more about the related knowledge?
Here is a suggestion from ITtutoria team for you$(function(){
$(".pushme").click(function () {
$(this).text(function(i, text){
return text === "PUSH ME" ? "DON'T PUSH ME" : "PUSH ME";
})
});
})
Have you ever tried this solution