How to SmoothScroll This on Click
<p>I am trying to make it so whenever you click one of the sorting buttons, it smooth scrolls down to #filter (so the sorting buttons are at the top of the page).</p>

<p>I was able to put location.href='#filter' at the end of my function here:</p>

<pre><code>$("#advfilter ul").hide();
  $('.option-set a').on('click', function() {
  $("#advfilter ul").hide();
  $("#" + $(this).attr('data-subid')).show();
  location.href='#filter'
});
</code></pre>

<p>And it works how I want it to, on click of the button, it jumps down to the id #filter, but I can't seem to get it to smooth scroll down there.</p>

<p>If I instead make all of the buttons have a [href="#filter"] then it smooth scrolls down as I set the property to href's, but then it doesn't perform the sorting javascript.</p>

<p>And here is the smoothscroll function that I have which works on all href's otherwise:</p>

<pre><code>$('.navbar a, .scroll a, .smoothscroll a').bind('click',function(event){
    var $anchor = $(this);

    $('html, body').stop().animate({
        scrollTop: $($anchor.attr('href')).offset().top
    }, 850,'easeInOutExpo');
    event.preventDefault();
});
</code></pre>

<p>Site: <a href="http://cyberbytesdesign.com/WIP2/bathroom/" rel="nofollow">http://cyberbytesdesign.com/WIP2/bathroom/</a></p>

<p>Thanks!</p>
