I've implemented this JQuery script to modify elements in my header as the user scrolls. Is there a way to limit these modifications based on the screen size?
Here's the code snippet:
$(window).scroll(function() {
// Once the user has scrolled 100px from the top...
if ( $(window).scrollTop() >= 10 ) {
$('#scrollthing').css('display', 'none');
$('#ticket-amount').css('margin-bottom', '15px');
// Otherwise, remove any inline styles to revert back to the original design
} else {
$('#scrollthing').attr('style', '');
}
});
Appreciate your help!