How to use an anchor link and scroll at the same time?
<p>Here for some help again :)</p>

<p>I've got this site: sharemyplaylists.com</p>

<p>that uses this scrolling plugin to smoothly bring the user to an anchor when clicked, here is the code:</p>

<pre><code>// Smooth anchor link script
$(document).ready(function() 
{
   $('a[href*=#]').click(function() 
   {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
         &amp;&amp; location.hostname == this.hostname) 
      {
         var $target = $(this.hash);
         $target = $target.length &amp;&amp; $target 
            || $('[name=' + this.hash.slice(1) +']');

         if ($target.length) 
         {
            var targetOffset = $target.offset().top;
            $('html,body')
               .animate({scrollTop: targetOffset}, 1000);
            return false;
         }
      }
   });
}); 

// open panel on click script
$(".btn-slide").click(function()
{
   $("#panel").slideToggle("slow");
   $(this).toggleClass("active"); return false;
});
</code></pre>

<p>Anyway, I also have a button "Submit your playlist" that opens the top panel to reveal a form in the sidebar and when I click this, it just opens the panel (meaning I am not brought up to the top anchor also). It's like the 2 bits of code are conflicting  and only one script will work. Any ideas on how to Click the "Submit your playlist" in the sidebar, bring the user to the top header anchor and open the panel also in one click?</p>

<p>Cheers,
Keith</p>
