thesmart/jquery-scrollspy — pull request #10 by Mithgol (2014-07-16 06:33:15+00:00)
Title: enable bubbling of the events `scrollSpy:enter` and `scrollSpy:exit`

Currently the events triggered by ScrollSpy **do not bubble** because they are triggered by the jQuery's `.triggerHandler` method which [(according to the docs)](http://api.jquery.com/triggerHandler/) is similar to `.trigger()` but one of the exceptions is the following:

> Events triggered with `.triggerHandler()` do not bubble up the DOM hierarchy; if they are not handled by the target element directly, they do nothing.

Unfortunately, for me it's an issue. Sometimes in my applications ([PhiDo](https://github.com/Mithgol/phido), for example) I have to initiate scrollspying on **hundreds** of elements. Installing a separate event handler on each of these elements (instead of **only one** handler on a parent element) seems superfluous.

Hence a pull request to replace `.triggerHandler` with a simple `.trigger`.

(Also fixes #8 because is based on its code branch.)