title: jQuery scroll action only on Wordpress homepage
body: <p>I have created code to add fixed class <code>.menu-bar</code> to my menu on scroll. My site is on Wordpress and I need fixed menu only on my homepage. I have tried some ways I have found to use this code only on homepage, but I'm a beginner and these didn't work the way I want. Can you help me with this problem?</p>
  
  <p>My code:</p>
  
  <pre><code>$(window).scroll(function(){
  var menu = $('.menu'),
    scroll = $(window).scrollTop();
  
    if (scroll &gt;= 100) menu.addClass('menu-bar');
    else menu.removeClass('menu-bar');
  });
  </code></pre>
  
  <p>Thanks!</p>