Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9175601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:56:32+00:00 2026-06-17T16:56:32+00:00

I want to disable click event on two buttons for a while when another

  • 0

I want to disable click event on two buttons for a while when another event is going and then reenable it.
.off method can block it, but using after .on can’t make click event on buttons available again.

$('#button-block-1').click(function () {
    $('#block-1, #block-1-expansion-button').stop().fadeToggle('slow');
    if ($('#block-1, #block-1-expansion-button').is(':visible')) {$('#block-2').fadeOut('slow')}
});
$('#button-block-2').click(function () {
    $('#block-2').stop().fadeToggle('slow');
    if ($('#block-2').is(':visible')) {$('#block-1, #block-1-expansion-button').fadeOut('slow')}
});

$('#block-1-expansion-button').toggle(function () {
    $('#body-wrapper').animate({
        'top': '20px'
    }, 450);
    $('#button-block-1, #button-block-2').off('click');
    },
    function () {
    $('#body-wrapper').animate({
        'top': '0'
    }, 450);
    $('#button-block-1, #button-block-2').on('click');
});

JsFiddle example

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:56:33+00:00Added an answer on June 17, 2026 at 4:56 pm

    You should use prop() instead:

    $('#button-block-1, #button-block-2').prop('disabled',true);//disabled buttons
    $('#button-block-1, #button-block-2').prop('disabled',false);//enabled buttons
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When i press $('.walk-previous-button') i want to disable the click event until the animation
How can I disable the header click for jQuery tabs. I only want to
I want to disable the click event on all day places and want the
Possible Duplicate: jquery - disable click How can I prevent a click event of
I have button i want to disable the click event on it when app
I want to disable the 'click' event until an animation is completed. Mark Up
I'm hacking a gallery plugin where I want to disable the click event for
I want to disable click on a certain <div> so that when you select
I am trying to basically disable the click event on a <div> temporarily. I
I disable a jQuery click event with: $(#button).click( function () { return false;} How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.