I currently have three buttons enclosed in div tags, as shown below.
<div id="make_bigger">
<button type="button">Bigger</button>
</div>
<div id="make_smaller">
<button type="button">Smaller</button>
</div>
<div id="make_normal_size">
<button type="button">Normal Size</button>
</div>
My goal is to change the color of the "Bigger" button to blue when clicked (using a .selected CSS class). The jQuery code I am using is as follows:
$('#make_bigger').bind('click', function () {
$('body').addClass('bigger');
$('body').removeClass('normal-size');
$('body').removeClass('smaller');
$(this).addClass('selected');
});
Unfortunately, this code is not working and the color is not changing. What could be the reason behind this issue?
Any assistance would be greatly appreciated.