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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:23:55+00:00 2026-06-09T12:23:55+00:00

I have a div I want to show and hide with a check box:

  • 0

I have a div I want to show and hide with a check box:

      <li>             
        <label for="">Fixed-term package:</label>               
        <ul>                  
          <li><input id="" type="checkbox" name="package-fixed-term" /></li>               
        </ul>                       
      </li>
      <div id="package-fixed-term-options" class="hidden">

my class “hidden”:

.hidden {display: none !important;}

When I check my input control it won’t slide down. I can get it to work by adding .removeClass(‘hidden’) tot he line but this is not supposed to be required (e.g. slideUp doesn’t need to add back my hidden class) Adding the remove class also kills the delay and slideDown animation. The slideUp works beautifully. Here is the function:

$('input[name="package-fixed-term"]').change(function(){
if ($('input[name="package-fixed-term"]:checked').val() !== undefined) {     
  $('div#package-fixed-term-options').delay(300).slideDown(500);
  return false;
  } else {
  $('div#package-fixed-term-options').delay(300).slideUp(500);
  return false;
  }
});
  • 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-09T12:23:56+00:00Added an answer on June 9, 2026 at 12:23 pm

    It’s the !important that is causing this issue.

    See this fiddle: http://jsfiddle.net/4JYeq/2/

    Remove it from the css, and it will work:

    .hidden {display: none;}​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this setup: <style>.selectit{display:none;}</style> <div id=foo> <label class=selectit> <input type=checkbox name=one id=one checked>
I have a div that I want to show/hide when clicking a button. The
I have a div and I want to show and hide on a link
I have repeatable elements <input style=display:inline class=chkClass type=checkbox value=1/> <div class=other> //something </div> <input
I want to hide and show a div element when a checkbox is selected
PHP: <input type='checkbox' onChange='DoTheSwitch(1);'><div id='Hide1'>Hide</div> 1 <input type='checkbox' onChange='DoTheSwitch(2);'><div id='Hide2'>Hide</div> 2 <input type='checkbox' onChange='DoTheSwitch(3);'><div
I have a div to show a message, I want the message to appear
I have six checkboxes. Shown as like this Checkbox1 <input type=checkbox id=check1> Checkbox2 <input
I am trying to have append and show methods if a check box is
I got multiple checkboxes generated from a PHP script. <input type=checkbox class=checkbox name=item[] value=1

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.