Prevent scroll to top --Issue
<p>Ok, I am trying to prevent the page from scrolling to the top of the page when I click on an anchor. </p>

<p>I have done this many times before, but I am not understanding what I am missing this time. </p>

<p>Please have a look at this code:</p>

<pre><code>$('#regionMapNav a').click(function(event){

    event.preventDefault();

        var i = $(this).attr("class");
        var name = $(this).attr("id");
        name = name.replace(/\s+/g, '');
        if(i != 'active'){
                $('.active').removeClass('active');
                $(this).addClass('active');
                $('.map').hide();

                $('#' + name + 'Map').fadeIn(3000);
                return false;   
            }

});
</code></pre>

<p>thanks for any help. </p>

<p><strong>EDIT</strong>
I went ahead and create a hack to just scroll to bottom since nothing that should work is working....I know it is not the best, but it works...Here is the code just in case someone ever has the same issue. Keep in mind that this item I am creating is at the bottom of the page. Also, that there is a dynamically loaded large header on this page. I think my issue has something to do with that, but I just don't have the energy today to trace back my mistake. </p>

<pre><code>$('#regionMapNav a').click(function(event){

    event.preventDefault();

        var i = $(this).attr("class");
        var name = $(this).attr("id");
        name = name.replace(/\s+/g, '');
        if(i != 'active'){
                $('.active').removeClass('active');
                $(this).addClass('active');
                $('.map').hide();

                $('#' + name + 'Map').fadeIn(3000);
                window.scrollTo(0, document.body.scrollHeight);
                return false;   
            }

});
</code></pre>
