JSFiddle - React, Tailwind, and code Playground
HTML
<a class="read-more" href="#" id="part-a">change buttons</a>
<div class="content_container">
<h2>Food</h2>
<p>New York City's food culture includes a variety of international cuisines influenced by the
city's immigrant history. Central European and Italian immigrants brought bagels, cheesecake,
and New York-style pizza into the city, while Chinese and other Asian restaurants, sandwich
joints, trattorias, diners, and coffeehouses have become ubiquitous. </p>
<div class="button_small">
<a class="read-more" href="#">Read more</a>
</div>
</div>
<div class="content_container">
<h2>Museums</h2>
<p>New York City is home to hundreds of cultural institutions and historic sites, many of which are
internationally known. Museum Mile is the name for a section of Fifth Avenue running from 82nd
to 105th streets on the Upper East Side of Manhattan, in an area sometimes called Upper
Carnegie Hill.</p>
<div class="button_small">
<a class="read-more" href="#">Read more</a>
</div>
</div>
CSS
.button_small {
font: normal 110% Arial, Helvetica, sans-serif;
height: 15px;
width: 80px;
padding: 5px 2px 7px 2px;
background: #1D1D1D;
background: -moz-linear-gradient(#676767, #1D1D1D);
background: -o-linear-gradient(#676767, #1D1D1D);
background: -webkit-linear-gradient(#676767, #1D1D1D);
border-radius: 15px 15px 15px 15px;
-moz-border-radius: 15px 15px 15px 15px;
-webkit-border: 15px 15px 15px 15px;
-webkit-box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 5px;
-moz-box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 5px;
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 5px;
}
JavaScript
document.getElementById('part-a').addEventListener("click", changeButtonStyles, false);
function changeButtonStyles() {
var actualButtons = document.getElementsByClassName("read-more");
for (var i = 0; i < actualButtons.length; i++) {
actualButtons[i].parentNode.className = "basic";
actualButtons[i].className = "btn btn-xs btn-default";
}
}