I broke my head trying to disable the following javascript for mobile devices. I'm a dummy in javascript so would appreciate any help.
$(window).scroll(function() {
if($(this).scrollTop() > 50) /*height in pixels when the navbar becomes non opaque*/
{
$('.navbar-sticky').addClass('sticky');
} else {
$('.navbar-sticky').removeClass('sticky');
}
});