Clicking JS Tabs Causes Browser to Scroll Up
<p><strong>EDIT: I found why it is doing this, but a question has now arisen from this.
Scroll down to where I said "edit" at the bottom to help me with the new issue that has come up.</strong></p>

<p>The page can be seen here: <a href="http://www.remodeling-buffalo.com/bathroom/swanstone-bath-and-alcove-walls.php" rel="nofollow">http://www.remodeling-buffalo.com/bathroom/swanstone-bath-and-alcove-walls.php</a></p>

<p>If you scroll down to the bottom and click one of the tabs underneath the section "video" it jumps up the page.  It only happens if you scroll down so the video is above the bottom of your browser.</p>

<p>Here is the page code that I have for the tabs:</p>

<pre><code>        &lt;ul id="tabs" class="filter-nav option-set"&gt;
          &lt;li&gt;&lt;a class="selected" href="#"&gt;Acetone Test&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Impact Test&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Heat Test&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
        &lt;div id="tab-items" class="margin_top_55 textcenter"&gt;
          &lt;hr class="dashed margin_bottom_15"&gt;
          &lt;section&gt;
            &lt;div&gt;
              &lt;p&gt;
                &lt;video id="sublime" class="sublime center" poster="/resource/video/bathroom/tub-and-shower/modular/swanstone/swanstone-chemical-test.jpg" width="640" height="320" data-name="Swanstone - Chemical (Acetone) Test" data-uid="56410b5b" preload="auto"&gt;
                &lt;source src="/resource/video/bathroom/tub-and-shower/modular/swanstone/swanstone-chemical-test.mov" /&gt;
                &lt;/video&gt;
              &lt;/p&gt;
              &lt;h3&gt;Acetone Test&lt;/h3&gt;
              &lt;h5 class="grey"&gt;Impervious To Chemicals&lt;/h5&gt;
            &lt;/div&gt;
          &lt;/section&gt;
          &lt;section&gt;
            &lt;div&gt;
              &lt;p&gt;
                &lt;video id="sublime2" class="sublime center" poster="/resource/video/bathroom/tub-and-shower/modular/swanstone/swanstone-impact-test.jpg" width="640" height="320" data-name="Swanstone - Impact Test" data-uid="12be3c75" preload="auto"&gt;
                &lt;source src="/resource/video/bathroom/tub-and-shower/modular/swanstone/swanstone-impact-test.mov" /&gt;
                &lt;/video&gt;
              &lt;/p&gt;
              &lt;h3&gt;Impact Test&lt;/h3&gt;
              &lt;h5 class="grey"&gt;Impact Resistant!&lt;/h5&gt;
            &lt;/div&gt;
          &lt;/section&gt;
          &lt;section&gt;
            &lt;div&gt;
              &lt;p&gt;
                &lt;video id="sublime3" class="sublime center" poster="/resource/video/bathroom/tub-and-shower/modular/swanstone/swanstone-heat-test.jpg" width="640" height="320" data-name="Swanstone - Heat Test" data-uid="403140c8" preload="auto"&gt;
                &lt;source src="/resource/video/bathroom/tub-and-shower/modular/swanstone/swanstone-heat-test.mov" /&gt;
                &lt;/video&gt;
              &lt;/p&gt;
              &lt;h3&gt;Heat Test&lt;/h3&gt;
              &lt;h5 class="grey"&gt;Withstands Heat!&lt;/h5&gt;
            &lt;/div&gt;
          &lt;/section&gt;
</code></pre>

<p>and here is the JS code that I have</p>

<pre><code>$(function() { 
    $("#tabs").tabs("#tab-items section", { effect: 'fade', fadeOutSpeed: 0, fadeInSpeed: 400 }); 
    $(".option-set").on("click", "a", function(e) { 
    $(this).addClass('selected') .parent().siblings().find("a").removeClass('selected'); }); 
});
</code></pre>

<p>It calls out to jquery.tools.min.js which is just the "tabs" of the jqueryUI.  That file can be seen here: <a href="http://www.remodeling-buffalo.com/resource/js/jquery.tools.min.js" rel="nofollow">http://www.remodeling-buffalo.com/resource/js/jquery.tools.min.js</a></p>

<p><strong>EDIT: Fixed Issue on my own, but have a question now for best method</strong></p>

<p>It seems to be a problem with the div going hidden instantly, and the other fading in, so this code right here:</p>

<pre><code>{ effect: 'fade', fadeOutSpeed: 0, fadeInSpeed: 400 });
</code></pre>

<p>So the issue is that even though it's impossible to see, both sections go invisible for like .0000 MS but it is forced to push the page up there is nothing there (if you know what I mean).</p>

<p>So I can fix this by changing the "fadeOutSpeed" from 0 to 1, and it no longer does this, although it does look a little goofy.  Is there a better effect to use which would stop this from happening?  It appears as if having a fade does this problem.</p>

<p>Thanks for the help guys! :)</p>
