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

  • Home
  • SEARCH
  • 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've build C++ program using Visual Studio 2008. Both release and debug version are
Both the jQuery and Prototpye JavaScript libraries refuse to allow me to use a
Both are mathematical values, however the float does have more precision. Is that the
Both DataSource and DataSourceID are defined on 'grdCommunication'. Remove one definition. I just got
Both of them are mbeans. Both are intended to setup Hibernate Session Factory and
Both Session.Clear() and Session.Abandon() get rid of session variables. As I understand it, Abandon()
Both ideas sound very similar to me, but there might be subtle differences or
Both of these appservers are at least in part OSGI based. One (Glassfish) is
Both about -a and -e options in Bash documentation is said: -a file True
Both: CLSID IID Having specified the above, and using: CoCreateInstance() To returning a single

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.