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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T02:05:06+00:00 2026-05-13T02:05:06+00:00

Both of the below functions (which are identical except for when they should run)

  • 0

Both of the below functions (which are identical except for when they should run) are in $(document).ready. The .live version works as expected, hiding 2 divs when the selector is checked and showing them when it is unchecked. The .ready version does nothing but it is supposed to hide the specified divs when the page is loaded. The checkbox ‘allday’ is checked by default (for testing purposes).

What is wrong with the .ready version?

$("input[name='allday']").ready(function(){ //OnLoad verify if allday is checked to disallow time entry
    if($(this).is(":checked")){ //There is a check
        $("#evst").hide(); //hide time entry
        $("#evet").hide();
    } else {
        $("#evst").show(); 
        $("#evet").show();
    }; 
}); 

$("input[name='allday']").live("click", function(){ //OnClick verify if allday is checked to disallow time entry
    if($(this).is(":checked")){ //There is a check
        $("#evst").slideUp(); //hide time entry
        $("#evet").slideUp();
    } else {
        $("#evst").slideDown(); 
        $("#evet").slideDown();
    }; 
});
  • 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-13T02:05:06+00:00Added an answer on May 13, 2026 at 2:05 am

    When you use .ready $(this) won’t refer to the right element – change it to $("input[name='allday']")

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

Sidebar

Related Questions

I have a mapreduce issue with couchdb (both functions shown below): when I run
I have two CSS tranistions as below (they both cover the page and then
So I'm using both xml files listed below with no luck. They both exist
I ran http://developers.facebook.com/tools/debug on the 2 URL's below. Both debug test results returned identical
I have two Haskell functions, both of which seem very similar to me. But
The query below returns rows that have both loginid and ip2 in the bumps
in the code below, bdate and edate are both datetime.datetime() objects: pylab.barh(ypos, edate -
I will post my code below as a quick note I define both of
Why am I receiving the exception below if the type of both entities is
In the code below, when both _uiChkTestAction and _uiChkTestItem JCheckBox are unselected, clicking bu1

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.