Ticket #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: | ||
| Blocking: | Blocked by: |
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
comment:2 Changed 2 years ago by jitter
- Priority changed from undecided to high
- Resolution set to invalid
- Status changed from new to closed
- Component changed from unfiled to event
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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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