title: How to filter 2 jquery scripts that target hash links
body: <p>I have two jquery scripts on one page that both target on-site links via href="#example"..
  One is a content slider the other one is a "smooth scroll" for the "toTop" links..
  Now the problem is, every time I hit a link of the content slider navigation, the screen moves up to the top of the container of the slider. I want to avoid that. So I tried to to filter the smooth-scroll script via if-statements, but I had no success so far.. maybe you have any idea?
  Thank you very much in advance!</p>
  
  <p>Here is the smooth-scroll jquery:</p>
  
  <pre><code>$(document).ready(function() {
  $('a[href*=#]').bind("click", function(event) {
      event.preventDefault();
      var ziel = $(this).attr("href");
  
              if ($.browser.opera) {
                  var target = 'html';
              }else{
                  var target = 'html,body';
              }
  
      $(target).animate({
          scrollTop: $(ziel).offset().top
      }, 1000 , function (){location.hash = ziel;});
  });
  return false;
  });
  </code></pre>
  
  <p>and here the html of the content slider:</p>
  
  <pre><code>&lt;div id="Dienstleistungen"&gt;
                          &lt;div class="left_column"&gt;
                          &lt;h2&gt;Meine Dienstleistungen&lt;/h2&gt;
                          &lt;h3&gt;KOMPETENZEN&lt;/h3&gt;
                          &lt;ul id="AboutNav"&gt;
                              &lt;li&gt;&lt;h1&gt;&lt;a href="#Kompetenzen" class="button1 active noScroll" rel="1" title="Frontend Entwicklung | Sebastian B&amp;ouml;hme"&gt;&amp;Uuml;berblick&lt;/a&gt;&lt;/h1&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;h1&gt;&lt;a href="#Frontend" class="button2 noScroll" rel="2" title="Frontend Entwicklung | Sebastian B&amp;ouml;hme"&gt;Frontend Entwicklung&lt;/a&gt;&lt;/h1&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;h1&gt;&lt;a href="#CMS" class="button3 noScroll" rel="3" title="Content Management Systeme &amp;amp; Online Shops | Sebastian B&amp;ouml;hme"&gt;Content Management Systeme &amp;amp; Online Shops&lt;/a&gt;&lt;/h1&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;h1&gt;&lt;a href="#SEO" class="button4 noScroll" rel="4" title="Suchmaschinenoptimierung (SEO) | Sebastian B&amp;ouml;hme"&gt;Suchmaschinenoptimierung (SEO)&lt;/a&gt;&lt;/h1&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;h1&gt;&lt;a href="#ScreenDesign" class="button5 noScroll" rel="5" title="Screen Design | Sebastian B&amp;ouml;hme"&gt;Screen Design&lt;/a&gt;&lt;/h1&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;h1&gt;&lt;a href="#Hand" class="button6 noScroll" rel="6" title="Alles aus einer Hand | Sebastian B&amp;ouml;hme"&gt;Alles aus einer Hand&lt;/a&gt;&lt;/h1&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                          &lt;/div&gt;
  
                          &lt;div class="container"&gt;
  
                          &lt;div id="Kompetenzen" class="aboutContent right_columns"&gt;
                              &lt;h1&gt;&amp;Uuml;berblick&lt;/h1&gt;
                              &lt;p&gt;Phasellus..&lt;/p&gt;
                          &lt;/div&gt;
                      &lt;hr /&gt;
                          &lt;div id="Frontend" class="aboutContent right_column "&gt;
                              &lt;h1&gt;Frontend Entwicklung&lt;/h1&gt;
                              &lt;p&gt;Phasellus..&lt;/p&gt;
                          &lt;/div&gt;
                      &lt;hr /&gt;  
                          &lt;div id="CMS" class="aboutContent right_column "&gt;
                              &lt;h1&gt;Content Management Systeme &amp;amp; Online Shops&lt;/h1&gt;
                              &lt;p&gt;Phasellus..&lt;/p&gt;
                          &lt;/div&gt;
                      &lt;hr /&gt;
                          &lt;div id="SEO" class="aboutContent right_column "&gt;
                              &lt;h1&gt;Suchmaschinenoptimierung (SEO)&lt;/h1&gt;
                              &lt;p&gt;Phasellus..&lt;/p&gt;
                          &lt;/div&gt;
                      &lt;hr /&gt;
                          &lt;div id="ScreenDesign" class="aboutContent right_column "&gt;
                              &lt;h1&gt;Screen Design&lt;/h1&gt;
                              &lt;p&gt;Phasellus..&lt;/p&gt;
                          &lt;/div&gt;
                      &lt;hr /&gt;
                          &lt;div id="Hand" class="aboutContent right_column"&gt;
                              &lt;h1&gt;Alles aus einer Hand&lt;/h1&gt;
                              &lt;p&gt;Curabitur..&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;/div&gt;&lt;!-- AboutSlider --&gt;
                      &lt;/div&gt;&lt;!-- Dienstleistungen --&gt;
  </code></pre>