Cross browser support

see: http://stackoverflow.com/questions/871399/cross-browser-method-for-detecting-the-scrolltop-of-the-browser-window

Maybe there's a better way to do this with angular's jqLite.

Furthermore, for some unknown reason element.data('target') did not work with dynamic ids (id="{{...}}"), but accessing element.attr('data-target') did work. There should be a better way to handle this (with cross-browser support)...