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 7645123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:51:36+00:00 2026-05-31T09:51:36+00:00

I have dropdowns for a business to enter their hours. Each day has a

  • 0

I have dropdowns for a business to enter their hours. Each day has a drop down with the ID of hours_dayname_open and hours_dayname_closed. I also have a checkbox to mark it as closed. I am using the following jQuery to disable the drop down if it is checked:

$("#closed_monday").click( function(){
    if($(this).is(':checked')){
        $("#hours_monday_open").attr("disabled", true);
        $("#hours_monday_closed").attr("disabled", true);
    }else{
        $("#hours_monday_open").attr("disabled", false);
        $("#hours_monday_closed").attr("disabled", false);
    }
});

However, when the checkbox is selected only the open hours is disabled/enabled… The closed dropdown seems to be getting ignored.

  • 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-05-31T09:51:37+00:00Added an answer on May 31, 2026 at 9:51 am

    The proper attribute, strangely, is disabled, not true.

    $("#hours_monday_open").attr("disabled", "disabled");
    

    To enable it, remove the disabled attribute:

    $("#hours_monday_open").removeAttribute("disabled");
    

    Since jQuery 1.6, you can use the .prop() functionality to clear/set this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 dropdowns on my HTML page : The first drop down contains
I have a few cascading dropdowns on the bottom of my php page. Each
I have a navigation bar that has two dropdowns (as nested ul's). I'm trying
I have a set of drop down lists (8 in all). All drop downs
I have two dropdowns categories and subcategories on my page. Also I have an
I have multiple dropdowns that each call the following function (passing different arguments) If
I am trying to write an MVC webpage that has two drop down lists.
I have a page with the same drop down list in 3 or so
I have 3 dropdowns on a form for the user to choose their birthday.
I have 2 dropdowns 1 with weeknumbers 1 with years. I want to extract

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.