I have 3 buttons inside div's tages as below.
<div id="make_larger">
<button type="button">Large</button>
</div>
<div id="make_small">
<button type="button">Smaller</button>
</div>
<div id="make_normal">
<button type="button">Normal</button>
</div>
I want when i will click on "Large" button its color should be change to blue(using .selected class of css for it) .Jquery code is as below.
$('#make_larger').bind('click', function () {
$('body').addClass('large');
$('body').removeClass('normal');
$('body').removeClass('smaller');
$(this).addClass('selected');
});
But it is not working.Color is not being change. Why?
Any help please.