title: I've added an li to my ul, while it works, it's causing an error
body: <p>I've used a template which has some nice scrolling effects (<a href="https://www.freshdesignweb.com/demo/template/ubusina/#carouselHacked" rel="nofollow">https://www.freshdesignweb.com/demo/template/ubusina/#carouselHacked</a>), however, I've added an external link to the end of the <code>ul</code> and it seems to work – but it's causing errors!</p>
  
  <p>when I scroll I get this error:</p>
  
  <blockquote>
    <p>Uncaught Error: Syntax error, unrecognized expression: <a href="http://mylink.com/blog/" rel="nofollow">http://mylink.com/blog/</a></p>
  </blockquote>
  
  <p>I believe the first section of JavaScipt code below is where it's breaking, but I'm unsure of how to fix it:</p>
  
  <pre><code> function onScroll(event){
            var scrollPos = $(document).scrollTop();
            $('.navbar-default .navbar-nav&gt;li&gt;a').each(function () {
                var currLink = $(this);
                var refElement = $(currLink.attr("href"));
                if (refElement.position().top &lt;= scrollPos &amp;&amp; refElement.position().top + refElement.height() &gt; scrollPos) {
                    $('.navbar-default .navbar-nav&gt;li&gt;a').removeClass("active");
                    currLink.addClass("active");
                }
                else{
                    currLink.removeClass("active");
                }
            });
        }
  
  
  
        &lt;div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"&gt;
            &lt;ul class="nav navbar-nav navbar-right"&gt;
              &lt;li&gt;&lt;a class="menu active" href="#home" title="Home" &gt;Home&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="menu" href="#about"&gt;about &lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="menu" href="#team" title="Portfolio"&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="menu" href="#contact" title="Contact"&gt;contact&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="www.google.com" target="_blank" &gt;google&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
        &lt;/div&gt;
  </code></pre>