I am fairly new to js but I am trying to get this to fire so that my nav div will stick to the top of the screen I am not sure if my window on scroll function is firing correctly.
$(document).ready(function(){
"use strict";
$('#commons').window.onscroll(function(direction) {
$('.main-nav').toggleClass('fixed-nav', direction == 'down');
$('.main-nav a').removeClass('active');
$('.main-nav a.commons-btn').addClass('active');
}, { offset:'90px' });
});