I have several buttons. When a user clicks any button I want to give him the impression that the button is clicked .
This is the code:
<table>
<thead>
<tr>
<th><button class="btn btn-danger" >Today</button></th>
<th><button class="btn btn-danger" >Tomorrow</button></th>
<th><button class="btn btn-danger" >DayAfterTomorrow</button></th>
</tr>
</thead>
</table>
And this works when I have a single button:
<button class="btn" data-toggle="button">Today</button>
If the user clicks on tomorrow, the data-toggle attribute still remains for the today button. Instead, I want to disable the data-toggle attribute when another button is clicked.
You can use the bootstraps radio button functionality to achieve that effect. Try this:
Demo: http://jsfiddle.net/u7Lg8/