Skip to content

Commit 47b713c

Browse files
committed
pass button object in action callback as argument, pass button object in onAction callback as argument
1 parent e564260 commit 47b713c

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

index.html

+10-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
href="demo/libs/bundled.css">
5656
<script src="demo/libs/bundled.js"></script>
5757

58-
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
58+
<script async
59+
src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
5960

6061
<link rel="stylesheet"
6162
href="demo/demo.css">
@@ -899,7 +900,8 @@ <h2>Themes</h2>
899900
$('.example-pc-2').on('click', function () {
900901
$.confirm({
901902
title: 'Adding images',
902-
content: 'Images from flickr <br><img src="https://c2.staticflickr.com/4/3891/14354989289_2eec0ba724_b.jpg">',
903+
content: '<p>Images from flickr</p>' +
904+
'<img src="https://c2.staticflickr.com/4/3891/14354989289_2eec0ba724_b.jpg">',
903905
animation: 'scale',
904906
animationClose: 'top',
905907
buttons: {
@@ -973,7 +975,8 @@ <h2>Getting started</h2>
973975

974976
<div class="alert alert-info">
975977
Notes on migrating from v2 to v3. <br>
976-
<a href="https://github.com/craftpip/jquery-confirm/wiki/Migrate-from-v2-to-v3" target="_blank">https://github.com/craftpip/jquery-confirm/wiki/Migrate-from-v2-to-v3</a>
978+
<a href="https://github.com/craftpip/jquery-confirm/wiki/Migrate-from-v2-to-v3"
979+
target="_blank">https://github.com/craftpip/jquery-confirm/wiki/Migrate-from-v2-to-v3</a>
977980
</div>
978981

979982

@@ -2214,7 +2217,8 @@ <h2>Animations</h2>
22142217
This page has docs for animations for modal open/close and backgroundDismiss <br>
22152218
It also describes how to create custom animations.
22162219
</p>
2217-
<a class="btn btn-warning" href="animations.html">see Animations</a>
2220+
<a class="btn btn-warning"
2221+
href="animations.html">see Animations</a>
22182222
</div>
22192223
</section>
22202224

@@ -2225,7 +2229,8 @@ <h2>Themes</h2>
22252229
The themes section is moved to the themes.html page <br>
22262230
This page has docs for themes & how to create custom themes
22272231
</p>
2228-
<a class="btn btn-warning" href="themes.html">see Themes</a>
2232+
<a class="btn btn-warning"
2233+
href="themes.html">see Themes</a>
22292234
</div>
22302235
</section>
22312236

js/jquery-confirm.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,8 @@ var jconfirm, Jconfirm;
655655
.css('display', that.buttons[key].isHidden ? 'none' : '')
656656
.click(function (e) {
657657
e.preventDefault();
658-
var res = that.buttons[key].action.apply(that);
659-
that.onAction(key);
658+
var res = that.buttons[key].action.apply(that, that.buttons[key]);
659+
that.onAction.apply(that, key, that.buttons[key]);
660660
that._stopCountDown();
661661
if (typeof res === 'undefined' || res)
662662
that.close();

0 commit comments

Comments
 (0)