title: How to set Yes & No button actions on hyperlink in SweetAlert
body: <p>I have a hyperlink like this:</p>
  <pre><code>&lt;a href=&quot;{{ route('courseRegistration', $item-&gt;cor_id) }}&quot; class=&quot;btn btn-info&quot; id=&quot;custombtn&quot;&gt;
       Register
  &lt;/a&gt;
  </code></pre>
  <p>Then I added this to show a Sweetalert message with <strong>Yes</strong> and <strong>No</strong> buttons:</p>
  <pre><code>$(document).on('click', '#custombtn', function(e) {
      e.preventDefault();
      let form = $(this).parents('form');
      swal(
      {
          title: &quot;Alert!&quot;,
          text: &quot;You have an active Wallet, do you wish to pay the price with the active Wallet?&quot;,
          type: &quot;warning&quot;,
          allowEscapeKey: false,
          allowOutsideClick: false,
          showCancelButton: true,
          confirmButtonColor: &quot;#DD6B55&quot;,
          confirmButtonText: &quot;Yes&quot;,
          cancelButtonText: &quot;No&quot;,
          showLoaderOnConfirm: true,
          closeOnConfirm: false
      }).then((isConfirm) =&gt; {
          if (isConfirm.value === true) {
              // go to the href route
          }
          return false;
      });
  });
  </code></pre>
  <p>As you can see I want to say: if user clicked on the <strong>Yes</strong> button, goto href route and if not, stays on the page (<code>return false</code>).</p>
  <p>So the question is, how can I redirect user to <code>href=&quot;{{ route('courseRegistration', $item-&gt;cor_id) }}&quot;</code>, if he clicks on <strong>Yes</strong> button?</p>