title: CSS Can I make a div with fixed background attachment scroll slower?
body: <p>I am trying to create some cool parallax effects and was windering if I can make a div with a bg image that has the property <code>background-attachement: fixed</code> scroll a bit (slower than normal scroll) instead of having it stand still?</p>
  
  <p>this is what my css looks like:</p>
  
  <pre><code>.parallax{
      height: 400px !important;
      width: 100%;
      background-size: cover;
      background-attachment: fixed;
  }
  </code></pre>
  
  <p>this is my div</p>
  
  <pre><code>&lt;div class="parallax" style="background-image: url('img/image.jpg'); "&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I've tried this:</p>
  
  <pre><code>$('div.parallax').each(function(){
          $scroll_speed = 10;
          $this = $(this);
          $(window).scroll(function() {
              $bgScroll = -(($win.scrollTop() - $this.offset().top)/ $scroll_speed);
              $bgPosition = 'center '+ $bgScroll + 'px';
              $this.css({ backgroundPosition: $bgPosition });
          });
  });
  </code></pre>
  
  <p>Seems to be working, only I cant increase the scroll_speed even though I change the variable anyone can help me out?</p>