jquery/jquery — pull request #756 by imsky (2012-04-29 05:25:48+00:00)
Title: Patch .on to throw an exception when handler is undefined in (types, selector, fn) mode

If an event handler is undefined whenever ``on`` is used with a selector, the selector gets substituted for the handler. For example:

```js
$("body").on("click", "div", null);
//"div" is passed in as handler to jQuery.event.add
```
The bug occurs in ``dispatch`` when ``apply`` is called on ``handler``. Since the handler is a string, ``apply`` fails.

The patch throws an exception using ``jQuery.error`` and specifies both the element and the selector in the exception message.

Test case: http://jsfiddle.net/qhjJ4/