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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:21:32+00:00 2026-05-27T15:21:32+00:00

Trying to update some old code from live() to use on() and something is

  • 0

Trying to update some old code from live() to use on() and something is failing miserably.

$('#accordion').on('click','.EditModeDetails', function(event){
    alert('yay');
});

where .EditModeDetails is a class on injected HTML like so:

<li class="instructionText">
    <input value="EditModeDetails" class="EditModeDetails" name="EditModeDetails" type="checkbox">
    <label for="EditModeDetails">Edited text replaces existing text.  To add new text, check this box </label>
</li>

…and #accordion is an accordion control that is loaded at page load.

If I remove the filter, thus:

$('#accordion').on('click', function(event){
    alert('yay');
});

….I get alerts all over the place.

Have looked all over for a sample that uses a class instead of an element selector and having no luck.

EDIT: Many thanks for the suggestions, guys, but nothing is working thus far The version of JQuery that is loaded is ver–1.7.1. Here is the link to the actual development:

http://esc.toypizza.com/sysalert

To see the problem, in the datatable click on http://esc.toypizza.com/_img/details_open.png followed by clicking on the http://esc.toypizza.com/_img/up_arrow.png that appears. Next, click on the accordion section “Details” (above the “Current Issues” section that opens as the default). You will see the offending checkbox to the right of the “Clear” button.

  • 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-27T15:21:33+00:00Added an answer on May 27, 2026 at 3:21 pm

    I think you have an open div that is messing everything up.

    <!--Accordian-->
    
    <div id="accordion" class="invis">
    
        <h3><a href="#">Categories</a></h3>
    
    <div><!--Accordian- panel OPEN-->
    

    The div#accordion is closed several lines below, but the div that has the comment, Accordian- panel OPEN is not closed. This is causing the accordion to be misrendered and some elements are on top of the checkbox, that’s why the event doesn’t get to the check box.

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

Sidebar

Related Questions

Hi I am trying to update a div with some html from another div.
I am trying to change some old code which uses onclick so that I
I have been asked to update some old code I worked on years ago.
I'm trying to update some properties with KVC. The properties have been synthesized. This
I am trying to update a field in a table with data from another
As you aware, in .NET code-behind style, we already use a lot of function
I am stuck with this error: while trying to use an old DLL in
I'm trying to grab some JSON data from a web service using JSON.Net. The
I am new to jquery, with some basic understanding. I am trying to use
I am trying update my version of sqlite3 on mac os x 10.5.7 I

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.