title: How to fetch href links of the same class in Nightmare with jQuery
body: <p>I am trying to fetch all <code>href links</code> which are inside a separate divs with the  same <code>class name</code> using nightmare js... here is my code below....</p>
  
  <pre><code>var Nightmare = require('nightmare');
  var vo = require('vo');
  
  vo(function* () {
      var nightmare = Nightmare();
      var title = yield nightmare
      .goto('https://example.com')
      .type('input[name="q"]', 'search term')
      .click('input[value="some title"]')
      .evaluate(function () {
          //return $('.myclass').find('a').attr('href');
          $('.myclass').find('a').each(function() {
              return $(this).attr('href');
          });
  
      });
        console.log(title);
      yield nightmare.end();
  
  })(function (err, result) {
      if (err) return console.log(err);
  });
  </code></pre>
  
  <p>below is my div contents...</p>
  
  <pre><code>&lt;div class="myclass"&gt;&lt;a href="example1.com"&gt;ex1&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div class="myclass"&gt;&lt;a href="example2.com"&gt;ex2&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div class="myclass"&gt;&lt;a href="example3.com"&gt;ex3&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It can fetch one link when i use <code>return $('.myclass').find('a').attr('href');</code> but the each function does not work(<code>returns null</code>).. any suggestion to fix this issue?</p>