jquery disable all buttons enable button in jquery

lets say i have 7 buttons that are li tags but when a tab is selected the class becomes current how would i disable all the other buttons on click to return false.


<ul>
<li><a href="#" class="current"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
</ul>

Open in new window

stargateatlantisAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Chad SmithConnect With a Mentor Software EngineerCommented:
Yes this would disable all LI elements that do not have the class "current"
$('li').not(".current").attr('disabled', 'disabled');

Open in new window

0
 
Chad SmithSoftware EngineerCommented:

$('li').not(".current")

Open in new window

0
 
stargateatlantisAuthor Commented:
Would this disable all the other buttons so when a user clicks on them it will return nothing
0
All Courses

From novice to tech pro — start learning today.