Skip to content

Commit fcae718

Browse files
committed
Make border option to work in examples
1 parent daab7c8 commit fcae718

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

index.html

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,12 @@ <h2 id="customized">Customized dialog</h2>
227227
{ button: {name: &quot;button&quot;, value: &quot;Open image&quot;, class: &quot;btn btn-info&quot;, onclick: function() {
228228
bootpopup({
229229
title: $(&apos;#title&apos;).val(),
230-
content: [ { img: {src: $(&apos;#link&apos;).val()}} ]});
230+
content: [ { img: {src: $(&apos;#link&apos;).val()}} ],
231+
before: function(window) {
232+
if($(&quot;#border&quot;).prop(&quot;checked&quot;))
233+
$(&quot;#image&quot;).attr(&quot;style&quot;, &quot;border: 10px solid red&quot;);
234+
}
235+
});
231236
}
232237
}}],
233238
cancel: function(data, array, event) { alert(&quot;Cancel&quot;); },
@@ -296,7 +301,12 @@ <h2 id="customized">Customized dialog</h2>
296301
{ button: {name: "button", value: "Open image", class: "btn btn-info", onclick: function() {
297302
bootpopup({
298303
title: $('#title').val(),
299-
content: [ { img: {src: $('#link').val()}} ]});
304+
content: [ { img: {src: $('#link').val(), id: "image"}} ],
305+
before: function(window) {
306+
if($('#border').prop('checked'))
307+
$('#image').attr('style', 'border: 10px solid red');
308+
}
309+
});
300310
}
301311
}}],
302312
before: function(window) { alert("Before"); },

0 commit comments

Comments
 (0)