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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:45:47+00:00 2026-05-27T22:45:47+00:00

The signature for jQuery’s delegate method is documented as such: .delegate( selector, eventType, handler

  • 0

The signature for jQuery’s delegate method is documented as such:

.delegate( selector, eventType, handler )

Are there any circumstances that would make the parameter order the following, swapping eventType and selector?

.delegate( eventType, selector, handler )

I have a project that no matter what I do, I have to put the eventType first. For example this is the only thing that works in my current project (this is just a test, not real code!):

$('body').delegate('click', 'input', function (e) {
            alert("Why is this the only way it will work for me in this project?");
        });

According to the documentation, this should work:

$('body').delegate('input', 'click', function (e) {
            alert("This will never get hit");
        });

I tested with small projects and it works like the documentation says it should (here’s an example js fiddle: http://jsfiddle.net/wmdYr/16/)

I’m using jQuery 1.7.1 from the Google CDN, and tried a few older versions with the same results.

Is there a reason that the Event needs to be the first parameter in some circumstances?

  • 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-27T22:45:48+00:00Added an answer on May 27, 2026 at 10:45 pm

    I resolved the issue and can now use the documented order of parameters for jQuery’s delegate method: .delegate( selector, eventType, handler(eventObject))

    The solution for us was to upgrade the jQuery Validate library to the latest version (1.9). The project I am working on used an older version of the jQuery validate library (1.5.5) that shipped with Asp.Net MVC. That version appears to have conflicts with jQuery’s delegate method.

    This conflict affects jQuery’s delegate method and Backbone.js view events since Backbone.js uses jQuery’s delegate method under the hood.

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

Sidebar

Related Questions

Given a method signature: public bool AreTheSame<T>(Expression<Func<T, object>> exp1, Expression<Func<T, object>> exp2) What would
I am a newbie in Coffeescript and would like to use the delegate() method
I have read the method signature: jQuery.getJSON( url, `[data,] [success(data, textStatus, jqXHR)]` ) I
asp.net 2.0 / jQuery / AJAX <script type=text/javascript> //updated to show proper method signature
Is there a way to call a Page Method in jQuery when the page
The signature of the hashCode() method is public int hashCode(){ return x; } in
The method signature of a Java main method is: public static void main(String[] args)
Consider the following signature in C#: double Divide(int numerator, int denominator); Is there a
The method signature for Date.TryParse is: Public Shared Function TryParseExact ( _ s As
I made a web page that uses jQuery: http://benmccormack.com/demo/MichaelMassPsalm/Psalm16Mode5.html When you change the selection

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.