Console.log not working at all

I feel a bit stupid on this but let this be a lesson to everyone…Make sure you target the right selector!

Basically the console wasn’t logging anything because this particular code snippet was attempting to grab the scrolling area of my window, when in fact my code was setup differently to scroll an entire DIV instead. As soon as I changed:

$(window).scroll(function() {

to this:

$('#scroller').scroll(function() {

The console started logging the correct messages.

Leave a Comment