title: Add string to url on page load (javascript/jquery)
body: <p>Looking to add a string to all urls in a particular div upon page load for marketing purposes, however my code does not appear to be working sadly:</p>
  
  <pre><code>$(document).ready(function() {
  var trail = '?cid=marketing-string';
  $("#sample-div").find('a').attr('href') + trail;
  });
  </code></pre>
  
  <p>Desired result would be turning:</p>
  
  <pre><code>&lt;div id="sample-div"&gt;
    &lt;a href="http://www.example.com"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Into</p>
  
  <pre><code>&lt;div id="sample-div"&gt;
    &lt;a href="http://www.example.com?cid=marketing-string"&gt;
  &lt;/div&gt;
  </code></pre>