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.

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

Open in new window

Who is Participating?
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

Chad SmithSoftware EngineerCommented:


Open in new window

stargateatlantisAuthor Commented:
Would this disable all the other buttons so when a user clicks on them it will return nothing
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.