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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:43:29+00:00 2026-05-20T12:43:29+00:00

I had this working to spec, until the specs changed. This function is now

  • 0

I had this working to spec, until the specs changed. This function is now brought in via ajax .load. Easy enough to bring it in and I have all my other functions on the page that is brought in working in the parent page except this one:

$("#CME").hide();
    $(function() {
        $("#CME1, #CMEQL, #CBT1, #CBTQL, #NYM1, #CMX1").live("change", function(){
            var checkBoxes =  $("#CME1, #CMEQL, #CBT1, #CBTQL, #NYM1, #CMX1").filter(":not(:checked)");
            if(checkBoxes.length == 0){
                $("#CME").slideDown("fast");
                } else {
                $("#CME").slideUp("fast");
                }
    });
});

the div “#CME” is not hidden and the .live(‘change’, function () { isn’t working. I have other similar .live functions that are working and structured the same. How do I bind the initial $(function() with .live and why isn’t the .hide() working?

Here is the code that brings in this content

$(function() {
        $("#subscribe").click(function () {
            $("#singleContent").load('purchaseForm.php #formContent', function()
            {
                $('[class^=toggle-item]').hide();
                $('[class^=link]').click(function(e) {
                    $('.toggle-item-' + this.className).slideToggle("fast");
                    $('span',this).text(function(i,txt) {
                        return txt === "Learn More..." ? "Close" : "Learn More...";
                        e.preventDefault();
                    });
                });//toggle

                $(function() {
                   var $add = $('input.add');
                   $add.click(function() {
                       $add.removeAttr('checked');
                       $(this).attr('checked', true);
                   });//$add
                });//function
            });//load
        });//#subscribe

I think I may have just answered my own question

EDIT – I got it working by binding it (placing it in) to the .load function

  • 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-20T12:43:30+00:00Added an answer on May 20, 2026 at 12:43 pm

    $("#CME").hide(); is not working because it is probably being run before the DOM is ready. Try placing that inside the $(function() {}); block.

    .live() doesn’t need to be inside the $(function() {}); block. live will bind an event whenever it appears in the DOM even if it doesn’t exist when it’s called.

    Make sure your functions are closed. You seem to be missing a }); at the end of the code.

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

Sidebar

Related Questions

I've had this working before, but now it's not working and I've been tearing
Had this working well in Emacs 23.1.x but it appears to have broke in
I had this working previously, but I didn't understand how, so I'm attempting to
Here's the deal, I had this app working since iPhone OS 3.0 came out,
I had this simple modal contact form working fine but must have broke it
I had this question earlier and it was concluded it was a bug in
I had this answer on another post I asked: I believe the VS designer
I had this idea of creating a count down timer, like 01:02, on the
I've had this long term issue in not quite understanding how to implement a
This might seem obvious but I've had this error when trying to use LINQ

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.