Просто напишите function
, который изменяет состояние .disabled
кнопок вкладок в соответствии с активной кнопкой:
// gather the tab buttons
var tabButtons = document.querySelectorAll('#options > button');
function enableTabButton(buttonId) {
// iterate over them and enable all of them,
// except the one with the given id
tabButtons.forEach(function(btn) {
btn.disabled = btn.id === buttonId;
});
}