I have django project and I can't make jquery script to run in google chrome.
Simple code for checking if scroll is at bottom:
<script language="JavaScript" type="text/JavaScript">
window.onload = function () {
$('#scrolling').on('scroll', chk_scroll);
};
function chk_scroll(e) {
var elem = $(e.currentTarget);
if (elem[0].scrollHeight - elem.scrollTop() == elem.outerHeight()) {
alert("bottom")
}
}
</script>
It works in Opera, Explorer, Firefox, Chrome (As single html file, not part of project), jsfiddle.
P.s jquery loads correctly and other scripts works.