@@ -227,7 +227,12 @@ <h2 id="customized">Customized dialog</h2>
227
227
{ button: {name: "button", value: "Open image", class: "btn btn-info", onclick: function() {
228
228
bootpopup({
229
229
title: $('#title').val(),
230
- content: [ { img: {src: $('#link').val()}} ]});
230
+ content: [ { img: {src: $('#link').val()}} ],
231
+ before: function(window) {
232
+ if($("#border").prop("checked"))
233
+ $("#image").attr("style", "border: 10px solid red");
234
+ }
235
+ });
231
236
}
232
237
}}],
233
238
cancel: function(data, array, event) { alert("Cancel"); },
@@ -296,7 +301,12 @@ <h2 id="customized">Customized dialog</h2>
296
301
{ button : { name : "button" , value : "Open image" , class : "btn btn-info" , onclick : function ( ) {
297
302
bootpopup ( {
298
303
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
+ } ) ;
300
310
}
301
311
} } ] ,
302
312
before : function ( window ) { alert ( "Before" ) ; } ,
0 commit comments