I have implemented a script in my JavaScript code that changes the color of the navigation bar when scrolling. The navigation bar transitions to a white color as you scroll down. However, I am facing an issue with responsiveness and would like to deactivate this script for screen sizes between 768px and 991px.
$(document).ready(function(){
var scroll_start = 0;
var startchange = $('.change-col-nav');
var offset = startchange.offset();
if (startchange.length){
$(document).scroll(function() {
scroll_start = $(this).scrollTop();
if(scroll_start > offset.top) {
$(".navbar-inverse").css({
"background-color": "#fff",
"border-bottom": "1px solid #febe10",
"transition": "all 0.4s cubic-bezier(0.000, 0.000, 0.580, 1.000)"
});
}
else
{
$('.navbar-inverse').css({
'background-color': 'transparent',
"border-bottom": "0",
});
}
});
}
});
Could someone guide me on how to disable this script specifically for screen sizes between 768px and 991px?