multiple external link buttons with jquery simpleModal box
<p>I learned how to pass the argument with a simpler javascript confirm box, but now I'm working with this SimpleModal script, and I'm a bit lost.</p>

<p>I have a page with several buttons that will link to different external pages.  When I click any button, the confirm box will pop up and when user clicks ok, then they are taken to that specific external link.  Right now, it's hard coded for one link, but I'm not sure how to set the link for each button.  </p>

<p>The link is currently set on this line: 
window.location.href = 'https://www.sandbox.paypal.com/xxx';</p>

<p>The function:</p>

<pre><code>$(document).ready(function () {
    $('#confirm-dialog input.confirm, #confirm-dialog a.confirm').click(function (e) {
        e.preventDefault();

        // example of calling the confirm function
        // you must use a callback function to perform the "yes" action
        confirm("&lt;h3 class='register'&gt;Please read and understand the Terms of these lessons before purchasing...this is important.&lt;br /&gt;&lt;br /&gt;By purchasing these lessons, you agree that:&lt;/h2&gt;&lt;ul class='popup'&gt;&lt;li class='lessonslist'&gt;&lt;img class='imgpad' src='/images/bullet.png' alt='bullet' /&gt;You may reteach any material you have learned here, but you may NOT use the materials provided in the lessons to do so.  In other words, you can do the lessons, learn the material, and teach your friend.  You CAN NOT print out the transcriptions or download the videos and give them to a friend.&lt;/li&gt;&lt;li class='lessonslist'&gt;&lt;img class='imgpad' src='/images/bullet.png' alt='bullet' /&gt;Derivative works are ok to produce, but you can not directly copy the musical examples and profit off them without the written consent of Joel Laviolette.&lt;/li&gt;&lt;/ul&gt;", function () {
            window.location.href = 'https://www.sandbox.paypal.com/xxx';
        });
    });
});

function confirm(message, callback) {
    $('#confirm').modal({
        closeHTML:"&lt;a href='#' title='Close' class='modal-close'&gt;x&lt;/a&gt;",
        position: ["20%",],
        overlayId:'confirm-overlay',
        containerId:'confirm-container', 
        onShow: function (dialog) {
            $('.message', dialog.data[0]).append(message);

            // if the user clicks "yes"
            $('.yes', dialog.data[0]).click(function () {
                // call the callback
                if ($.isFunction(callback)) {
                    callback.apply();
                }
                // close the dialog
                $.modal.close();
            });
        }
    });
} 
</code></pre>

<p>html:</p>

<pre><code>&lt;div id='confirm-dialog'&gt;&lt;h2&gt;Confirm Override&lt;/h2&gt;
  &lt;p&gt;A modal dialog override of the JavaScript confirm function. Demonstrates the use of &lt;code&gt;onShow&lt;/code&gt; as well as how to display a modal dialog confirmation instead of the default JavaScript confirm dialog.&lt;/p&gt;
    &lt;input type='button' name='confirm' class='confirm' value='Demo'/&gt;

  &lt;/form&gt;
&lt;/div&gt;
&lt;div id='confirm'&gt;
  &lt;div class='header'&gt;&lt;span&gt;Confirm&lt;/span&gt;&lt;/div&gt;
  &lt;p class='message'&gt;&lt;/p&gt;
  &lt;div class='buttons'&gt;
    &lt;div class='no simplemodal-close'&gt;No&lt;/div&gt;&lt;div class='yes'&gt;OK
                  &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>There is also the jquery.simplemodal.js which is probably too big to post here.</p>
