title: How to find element from html with jQuery
body: <p>I have a table with checkbox option for each row.</p>
  <p>For each row I have href (dedicated link) handled by HTML file.</p>
  <p>I have created a button called: &quot;download&quot; by JS, and I want to define this button to save all the links for the rows which have selected in the checkboxes, and save it in one variable, selectedLinks = []</p>
  <p>Any idea how can i fix my JS function.</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>//function download button
  
  $(document).on("click", "#downloadBtn", function() {
  console.log("download button click")
  var selectedLinks = []
  $('.last')
      .checkSingel("checkSingle")
      .forEach(function(record) {
          if (record.checked) {
              //selectedLinks.push(record.href)
              alert($(this).attr("href"));
          }
      })
  console.log(selectedLinks)
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;/td&gt;
  &lt;td class="last"&gt;&lt;a style="font-weight:bold;text-decoration:underline;" href="/download/{{ elements.EvidencePath }}"&gt;Click here to download Evidence&lt;/a&gt;
  &lt;/td&gt;</code></pre>
  </div>
  </div>
  </p>