I have three tabs. If a user chooses a certain option, I would like to disable one or two. I’ve tried:
$w ( '#membershipQtyDropdown' ). onChange (( event )=>{
**let** numberOfMemberships = event . target . value ;
console . log ( "qty of members: " + numberOfMemberships );
**if** ( parseInt ( numberOfMemberships ) == 1 ){
myTabs [ 0 ]. enable ();
myTabs [ 1 ]. disable ();
myTabs [ 2 ]. disable ();
}
**else if** ( parseInt ( numberOfMemberships ) == 2 ){
myTabs [ 0 ]. enable ();
myTabs [ 1 ]. enable ();
myTabs [ 2 ]. disable ();
}
**else** {
myTabs [ 0 ]. enable ();
myTabs [ 1 ]. enable ();
myTabs [ 2 ]. enable ();
}
});