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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:54:42+00:00 2026-05-20T16:54:42+00:00

I have an live event on all link or multiple selector on the page

  • 0

I have an live event on all link or multiple selector on the page and i have multiple selector i don’t want active the event. Normally, when the first live function is executed on all link, the e.preventDefault() is activate. But if one of the selector is in my exclude list, i want execute the link normally. I have tried this code :

$(selectorListA).live('click',function(e) {
    // stop all event
});

$(selectorListB).live('click',function(e) {
    e.preventDefault();
    // do action
});

I have tried this to :

$(selectorListA).not(selectorListB).live('click',function(e) {
    e.preventDefault();
    // do action
});

All of this solutions don’t work, the only way i have is this code, it work but in chrome an error is showed before the click event is execute, hmmm i’m not sure is good :

$(selectorListB).live('click',function(e) {
    die();
});

$(selectorListA).live('click',function(e) {
    e.preventDefault();
    // do action
});

I don’t know what i can take for execute all selectorListA with exclude all selectorListB. Can you help me please, thank you!

  • 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-20T16:54:43+00:00Added an answer on May 20, 2026 at 4:54 pm

    What is the error you get in Chrome? Seems that the problem is not with your selectors.

    Either way, something like this should work:

    $(selectorListA).live('click',function(e) {
        if ($(this).is(selectorListB)) }{
            // stuff for b group only
        }
    
        // stuff for both groups
    });
    

    The version using .not() won’t work because live attaches a document-level handler and uses the original selector to test whether the event should apply. So actually selecting and filtering before calling live won’t work as it would with click().

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

Sidebar

Related Questions

I have a live search on my help page that searches our help database
I know that the live() event handles event bubbling different than all other jQuery
We have a live MySQL database that is 99% INSERTs, around 100 per second.
I have an application which has to live as a service, I create an
I have a test web service replicating a live web service that hasn't been
I have a program that captures live data from a piece of hardware on
I have a project where I am taking some particularly ugly live HTML and
I have a backup server that automatically backs up my live site, both files
I have created a PHP-script to update a web server that is live inside
I have an ASP.net MVC2 application. In wich I'm using JQuery to alter all

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.