title: My jQuery map snippet fails in 3.0 but works in 2.0?
body: <p>I'm trying to get to the bottom of an error I'm getting with a jQuery map snippet. This works under jQuery 2, but upgrading to 3 it breaks and I'm not sure why. Stuck :/</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var menuItems = $("#topNav a");
  
  var scrollItems = menuItems.map(function() {
    var item = $($(this).attr("href")); // &lt;= this is the culprit ??
    if (item.length) {
      return item;
    }
  });
  
  // Expecting an object containing  the page sections
  console.log(scrollItems);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!-- THIS FAILS (jQuery 3) --&gt;
  &lt;script src="https://code.jquery.com/jquery-3.0.0.js"&gt;&lt;/script&gt;
  
  &lt;!-- THIS WORKS HOWEVER (JQuery 2) --&gt;
  &lt;!-- &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; --&gt;
  
  &lt;!-- My navigation --&gt;
  &lt;nav id="topNav"&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#about"&gt;About&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#services"&gt;Services&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#contact"&gt;Contact&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/nav&gt;
  
  &lt;-- My Page sections --&gt;
  &lt;div id="page"&gt;
    &lt;div id="about"&gt;
      &lt;h2&gt;About Us&lt;/h2&gt;
    &lt;/div&gt;
    &lt;div id="services"&gt;
      &lt;h2&gt;Services&lt;/h2&gt;
    &lt;/div&gt;
    &lt;div id="contact"&gt;
      &lt;h2&gt;Contact Us&lt;/h2&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>