# Code not running only on home - sage 8

**URL:** https://discourse.roots.io/t/code-not-running-only-on-home-sage-8/10187
**Category:** sage
**Created:** 2017-08-10T07:31:25Z
**Posts:** 1

## Post 1 by @dakiriki — 2017-08-10T07:31:26Z

is there any reason so this code is works on all pages except home?

> jQuery(window).scroll(function() {  
> var scroll = jQuery(this).scrollTop();
> 
> if (scroll \>= 400 ) {  
> jQuery(‘body’).addClass(‘at\_\_body\_menu–scrolled’);  
> } else {  
> jQuery(‘body’).removeClass(‘at\_\_body\_menu–scrolled’);  
> }  
> });

There is no error I can see
