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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:58:07+00:00 2026-06-06T20:58:07+00:00

I have recently collapsed my site into one big .JS file and one big

  • 0

I have recently collapsed my site into one big .JS file and one big .CSS file (while i was building it I had all the JS and CSS on seperate pages to make it easier.)

Now I have them all together the CSS is working great, but the .JS isnt. And it’s to do with this damn .ON statement. The .JS works fine before I ajax load a page inside the “main” div, but once I load I cant get anything out of it.

currently I have the html set up:

<div id="main">
<div id="customerForm" class="Admin">
<div id="tabSection">
<a class="tab selected"></a>
</div>
</div>
</div>

And I am trying to get the .ON statement working with the a.tab with:

$("#customerForm.Admin").on("click", "a.tab", function () {
alert('hello');
});

But it is not giving me any response. Any ideas? Is there a surefire way of knowing what will respond and what won’t respond with .ON? How can I tell? :S

  • 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-06T20:58:09+00:00Added an answer on June 6, 2026 at 8:58 pm

    The problem is because you are binding the .on statement to #customerForm.Admin which if what you say is correct is being replaced after your AJAX call. You need to change the binding to be higher up in the DOM tree, above the point of the replacement.

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

Sidebar

Related Questions

I have recently merged together 5 of my stand-alone projects into one project to
I have recently started looking into MQs and I had some very basic questions,
I have recently had a linux server compromised from bots uploading .php scripts and
I have recently been working on implementing an ajax based file uploader for my
I have recently upgraded my MVC 3 project to MVC 4. After all the
I have recently downloaded the FFmpeg-PHP extension (extracted from ffmpeg-php53-win32-vc9-all.zip) for PHP and I
We have recently started to see this exception while running the play framework in
i have recently created a test paypal account, and also verified all the details,
I have recently done some website work for a charity. The site I have
I have recently installed all of the X11 packages in the cygwin setup and

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.