Skip to content

Commit

Permalink
Updating demo.html to resolve null ref issue and resolve bootstrap st…
Browse files Browse the repository at this point in the history
…yling.
  • Loading branch information
TimFerrell committed Mar 9, 2015
2 parents 29d1f68 + 729cdfe commit 7e3b92d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ <h2>Links</h2>

var getMessageWithClearButton = function (msg) {
msg = msg ? msg : 'Clear itself?';
msg += '<br /><br /><button type="btn button" class="clear">Yes</button>';
msg += '<br /><br /><button type="button" class="btn clear">Yes</button>';
return msg;
};

Expand Down Expand Up @@ -287,6 +287,11 @@ <h2>Links</h2>

var $toast = toastr[shortCutFunction](msg, title); // Wire up an event handler to a button in the toast, if it exists
$toastlast = $toast;

if(typeof $toast === 'undefined'){
return;
}

if ($toast.find('#okBtn').length) {
$toast.delegate('#okBtn', 'click', function () {
alert('you clicked me. i was toast #' + toastIndex + '. goodbye!');
Expand Down

0 comments on commit 7e3b92d

Please sign in to comment.