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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:08:38+00:00 2026-05-21T02:08:38+00:00

I have some tabs in header and use Xajax to load big modules –

  • 0

I have some tabs in header and use Xajax to load big modules – almost whole page. There are some class inside that I use to call by jQuery (like anchor with some class and then click event…).
But when I load a new module and assign new content (with new classes and id’s) jQuery selectors seem don’t work – i.e after click anchor nothing is happen.

Quite similar situation appear when you forget $(document).ready(…) using jQuery.
Is there any solution to tell jQuery about new content, new class and id’s, that wasn’t available when page was loaded?

  • 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-21T02:08:39+00:00Added an answer on May 21, 2026 at 2:08 am

    This is because you’re event binding only works for DOM elements that exist when the binding is called. Since your modules are loaded after the binding ($('#sel').click(..)) is called, those DOM elements will not be bound to the event handler.

    To work around this, you can use the jQuery .live() method to bind elements that will be loaded later. jQuery will keep track of all the new DOM items being created and will call the binding on the new elements as well.

    http://api.jquery.com/live/

    LIVE DEMO

     <div class="clickme">
        Click here
      </div>
    
    $('.clickme').click(function(){
        alert('click event from normal binding!');
        $(this).parent().append('<div class="clickme">Click here - won\'t trigger for normal bind</div>');
    })
    
    
    $('.clickme').live('click', function(){
        alert('click event from live binding!');
    })    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some ten html pages with same header ,footer ,left and right navigation
So I'm working on some HTML5 code using HAML and SASS. I currently have
I’m starting to plan an architecture for a big web application, and I wanted
I'm nearly finished with this project but I have been beating my head against
I have 3 tab items to implement. When the program executes, I would like
[Python 3.1] Edit: mistake in the original code. I need to print a table.
So, I'm a script monkey at the core. Lately I seem to get stuffed
This is a novice question. Hopefully this example can educate myself and others As
This is a novice question. Hopefully this example can educate myself and others As
I created link in the grid panel, so that when I click on the

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.