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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:17:29+00:00 2026-06-06T19:17:29+00:00

Okay, I’ve managed to get .on working on a different site, but for some

  • 0

Okay, I’ve managed to get .on working on a different site, but for some reason it is just being a pain in this one.

here is my code:

$("#tabSection").on("click", "a.tab", function () {
    alert('bob');
});

and the HTML (which will be loaded via jQuery .load():

<div id="tabSection">
    <table border=0 width="750px" cellspacing=0 cellpadding=0>
    <tr><td class="tab"><a href="javascript:void();" rel="details" class="tab selected">Details</a></td>

Obviously I close the table and the tabsection div. It was all working fine before I got it loading via ajax. Now, i cant get it work at all. Any suggestions as to why it wouldnt be? Am i missing something here?

  • 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-06-06T19:17:30+00:00Added an answer on June 6, 2026 at 7:17 pm

    You are loading the #tabSection element, which means that it doesn’t exist when you try to hook up the event.

    The element that you hook up the event to have to exist when you hook it up. Use the element where you load the HTML.

    $("#customerForm").on("click", "#tabSection a.tab", function () {
      alert('bob');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay so im working on this php image upload system but for some reason
Okay, this is probably a very basic question; but, I'm just getting back in
Okay, I feel a bit foolish for having to ask this but I guess
Okay, so this is a long long shot but here it goes... When IE
Okay, this one is pretty obvious to everyone who use Django and frequently asked
Okay, I have setup up a handler for a div click but for some
Okay I am having some problems with being able to change bitmaps when a
OKay, this is probably pretty noob, but I couldn't find how to solve it.
Okay So this doesnt make sense to me.... maybe someone can shed some light.
Okay, I haven't used Interface Builder since Xcode 3.x but I remember there being

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.