title: Change all Anchor href link inside a div
body: <p>I'm try to change all html anchor href link using jQuery but it's not work properly. When I click the button it's select the first link and replace everywhere.</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 link = $('#content a[href]');
  
  $("button").click(function() {
    var lin = $("#content a").attr('href');
    var rep = "http://example.com/?redirect=";
    $("#content a[href]").attr("href", rep + "" + $("#content a").attr('href'));
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="content"&gt;
    &lt;a href="http://google.com"&gt;Google&lt;/a&gt;
    &lt;a href="http://fb.com"&gt;Facebook&lt;/a&gt;
  &lt;/div&gt;
  &lt;button&gt;Click&lt;/button&gt;
  &lt;div class="p"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>