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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:36:36+00:00 2026-05-27T12:36:36+00:00

I noticed that some jQuery buttons inside a container don’t work when they are

  • 0

I noticed that some jQuery buttons inside a container don’t work when they are loaded after the initial page load has finished.

For example, see this

Those buttons on the bottom: today, tomorrow, some other day
work, but only at the beginning.

When you press a navigation button at the top, such as venues, and then click on events again, those buttons will no longer work. Neither do the buttons on the search page.

Here is the code I have, for example:

<a id="today_button" href="#" title="Click to show events for today"></a>



jQuery('#today_button').click(function() {   
    jQuery("#today_button").addClass("active");
    jQuery("#tomorrow_button").removeClass("active");
    jQuery("#some_other_day_button").removeClass("active");
});

Also, the choose buttons:

<a id="choose_button" href="#" title="Click to search for club events!"></a>

jQuery('#choose_button').click(function() {   

    $('#whole-ajax-content-one').load('search2.html');

});

Thanks everybody! 🙂

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

    dynamically added elements needs to be re-binded to the events

    use live (deprecated)

    $('#choose_button').live('click', function() { ...  });
    

    or delegate

    $(document).delegate("#choose_button","click",function(){...});
    

    or on (1.7+)

    $(document).on("click","#choose_button",function(){...});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed that some jquery effects requires that scripts are loaded in proper order..
I created some widgets with jQuery UI and I notice that buttons have a
I noticed that some of developers in our team are creating long jQuery selectors
I have a web app. that uses AJAX (via jQuery). I noticed that some
i have some jquery script which runs after the window has loaded $(window).load( function()
I recently noticed that some (not all) of my javascript and jQuery scripts wouldn't
I've noticed that some simple scripts in JavaScript that work perfectly on my local
I noticed that some enumerations have None as a enumeration member. For example what
I noticed that some stylesheets have something like this: body { font-size: 62.5%/1.2em; }
I've noticed that some sites (usually banks) suppress the ability to paste text into

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.