Bug Tracker

Modify

Ticket #9516 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

Delegate does not support element or jquery object

Reported by: vdyy4fun@… Owned by:
Priority: low Milestone: 1.next
Component: event Version: 1.6.1
Keywords: Cc:
Blocking: Blocked by:

Description

Everytime I pass jquery object or element to the first delegate parameter, it gives me an error

Uncaught TypeError: Object [object Object] has no method 'replace'

var $div = $('#innerDiv');

$('#outerDiv').delegate($div, 'click', function () {

});

Change History

comment:1 Changed 2 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

The first argument to .delegate() is a selector string.

 http://api.jquery.com/delegate/

comment:2 Changed 2 years ago by rwaldron

  • Priority changed from undecided to low
  • Component changed from unfiled to event

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.