Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#8119 closed bug (invalid)

Live event sometimes causes error

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

Description

Adding the following lines to my page

        $("#cboxWrapper a.close").live(function () {
            // any code
        });

causes the following error

(types || "").split is not a function
[Break On This Error] types = (types || "").split(" "); 

This is after the successful addition of other live events immediately preceding these lines

On further investigation, firebug tells me that types is a function, not a string.

I can email a copy of the entire page if needed (NB the name of the jQuery file included is 1.4.4-min, but the code is 1.5 - just haven't got round to renaming yet)

Change History (3)

comment:1 Changed 8 years ago by anonymous

Just realised it was a stupid mistake of my own - please close this bug

comment:2 Changed 8 years ago by jitter

Component: unfiledevent
Priority: undecidedhigh
Resolution: invalid
Status: newclosed

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

After checking your bug report I came to the conclusion that this isn't a bug. If you check the .live() documentation for the supported method signatures you will see that in every signature there is a mandatory eventType parameter of type string as the first parameter.

So your sample is simply invalid, as it's missing the first eventType parameter.

comment:3 Changed 8 years ago by jitter

Priority: highlow
Note: See TracTickets for help on using tickets.