title: How do you set an Href value using JQuery
body: <p>I am having trouble changing the href attribute of my HTML code using Jquery</p>
  
  <p>My HTML code is</p>
  
  <pre><code>      &lt;div id="main-logo"&gt;&lt;a href="http://local.winemag.com"&gt;&lt;/a&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I am using the following JQuery code to change my link but for some reason it's not working.</p>
  
  <pre><code>      $("#main-logo a[href]").attr('href', 'http://www.test.com/');
  </code></pre>