Ticket #10928 (closed bug: invalid)
$(window).on() breaks in IE
| Reported by: | Joey Baker <joey@…> | Owned by: | Joey Baker <joey@…> |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I've got a set of code that uses the new .on(), which I'd like to bind to the window. However, the event fails to trigger in < IE9. Example code:
This works just fine in IE
$('body').on('click', '.class', function(e){ //this really should be window instead of 'body', but IE would break
// do stuff
}
This only works in FF, webkit:
$(window).on('click', '.class', function(e){
// do stuff
}
Change History
comment:1 Changed 18 months ago by dmethvin
- Owner set to Joey Baker <joey@…>
- Status changed from new to pending
comment:2 Changed 17 months ago by trac-o-bot
- Status changed from pending to closed
- Resolution set to invalid
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Why do you want to bind a delegated event to window? Read the description of event delegation in the API docs for .on(), it doesn't make sense to do that.