title: Javascript Popup Redirect
body: <p>So I have a image, the Apple Music badge. Once a user clicks on the badge I'd like a popup asking the user if they'd like to go the Explicit version of song or the Clean version and the corresponding button would do the action.</p>
  
  <p>Currently I have a javascript popup, which should allow the user to press "OK" to get redirected to the explicit version and press "Cancel" to get redirected to the Clean version. This option works fine for me however the buttons do not do what I expected them to do, both buttons redirect to the explicit version.</p>
  
  <p>Here is my HTML and JavaScript so far..</p>
  
  <pre><code>&lt;a class="AppleMusic" 
     href="**explicit-link**" 
     style="display:inline-block;
            overflow:hidden;
    background:url(https://linkmaker.itunes.apple.com/assets/shared/badges/en-us/music-lrg.svg) no-repeat;
            width:150px;
            height:55px;
            background-size:contain;"&gt;
  &lt;/a&gt;
  
  &lt;script type='text/javascript'&gt;
      $(window).on('load', function () {
          $(".AppleMusic").on("click", function (event) {
              if (confirm("This will redirect to the explict version of the song. Press 'Cancel' If you'd like to be redirected to the Clean version.")) {
                  return true;
              }
              else {
                  window.location = "**clean-link**";
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>The problem is no matter what they click, it redirects to the explicit (geo.itunes.apple.com) url.</p>
  
  <p>I'd like to NOT use a UI Dialog, if possible.</p>