title: JQuery links to open new window
body: <p>I'm trying to improve a music player i've created for my website by moving in from in-browser to a separate pop-up window, i've created/manipulated code i've found to make the jQuery take the href value and send it to a new window, only issue is on clicking the <code>&lt;a&gt;</code> tag, it performs the href click and jQuery action (as it would do). I'm trying to find an efficient way to make it so that if a user has JavaScript disabled, they can at least use the music player in a new tab rather than not being able to listen at all, but i'm unsure of how to go about this. Would setting the elements href into a var, then removing the href attribute work? Or would this cause errors?</p>
  
  <p><strong>Example HTML:</strong></p>
  
  <pre><code>&lt;a href="this_page.cfm?song=1" target="_blank" class="playSong" id="#artist# - #song#"&gt;Play Track&lt;/a&gt;
  </code></pre>
  
  <p><strong>Example jQuery:</strong>
      </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $(".playSong").click(function(){
              var url = $(this).attr('href');
              var windowName = $(this).attr('id');
  
              window.open(url, windowName, "height=300,width=400");
          });
      });
  &lt;/script&gt;
  </code></pre>