title: jQuery - Simple Text Rotator with click event
body: <p>I am using Simple <a href="https://github.com/peachananr/simple-text-rotator" rel="nofollow">Text Rotator</a> and its fantastic, my only issue I have with it is a click event I have is not working with it:</p>
  
  <pre><code>$(function() {
          $('a[href*=#]:not([href=#])').click(function() {
          if(!$(this).hasClass('carousel-control')){
                  if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') &amp;&amp; location.hostname == this.hostname) {
                      var target = $(this.hash);
                      target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
                      if (target.length) {
                              $('html,body').animate({
                                  scrollTop: target.offset().top - topSize
                              }, 2000);
                              return false;
                      }
                  }   
          }
          });
      });
  </code></pre>
  
  <p>When I click on the link in text rotator it does not scroll, just goes to the id section (for #link-1 &amp; #link-2) ( link-3.php and link-4.php work fine because they going to another page)</p>
  
  <pre><code> &lt;h1 class="sliding-text"&gt;
          &lt;span class="rotate"&gt;
              &lt;a href="#link-1"&gt;Link 1&lt;/a&gt;, 
              &lt;a href="#link-2"&gt;Link 2&lt;/a&gt;,
              &lt;a href="link-3.php"&gt;Link 3&lt;/a&gt;,
              &lt;a href="link-4.php"&gt;Link 4&lt;/a&gt;
          &lt;/span&gt;
      &lt;/h1&gt;
  
      $(".sliding-text .rotate").textrotator({
          animation: "fade",
          speed: 1000
      });
  </code></pre>
  
  <p>and here is the jquery code for the library:</p>
  
  <pre><code>!function ($) {
  
      var defaults = {
          animation: "fade",
          separator: ",",
          speed: 2000
      };
  
      $.fx.step.textShadowBlur = function (fx) {
          $(fx.elem).prop('textShadowBlur', fx.now).css({ textShadow: '0 0 ' + Math.floor(fx.now) + 'px black' });
      };
  
      $.fn.textrotator = function (options) {
          var settings = $.extend({}, defaults, options);
  
          return this.each(function () {
              var el = $(this)
              var array = [];
              $.each(el.html().split(settings.separator), function (key, value) {
                  array.push(value);
              });
              el.html(array[0]);
  
              // animation option
              var rotate = function () {
                  switch (settings.animation) {
  
                      case 'fade':
                          el.fadeOut(500, function () {
                              index = $.inArray(el.html(), array)
                              if ((index + 1) == array.length) index = -1
                              el.text(array[index + 1]).fadeIn(settings.speed);
                          });
                          break;
                  }
              };
              setInterval(rotate, 8000);
          });
      }
  
  }(window.jQuery);
  </code></pre>
  
  <p>How do I get my click event to work with my text rotator </p>