Q:

How to change text of an  once clicked?

I have this custom anchor button on my WordPress website:
 <a class="add-to-cart-button">Buy Now</a>

I'd like it to change its text on click event. Is it possible to do with javascript/php? 

A:

You can change the innerHTML via JavaScript after the click 
with jQuery:
$(".add-to-cart-button").click(function () {
  $(this).html('New Text');
});

