You should include the following jquery.js, Bgiframe.js, Weebox.js, wee.css files before use
The basic usage examples are as follows: $.weeboxs.open (' #testbox ', {title: ' Hello World ', width:400, height:200});
$.weeboxs.open (' The operation failed. '), {
Onopen:function () {alert (' opened! ');},
Onclose:function () {alert (' closed! ');}, Onok:function () {alert (' OK ');
$.weeboxs.close ();} });
$.weeboxs.open ('/modules/test/testsession.php ', {contentType: ' Ajax '});
$.weeboxs.open (' Hello World ');
$.weeboxs.open (' The operation failed ', {type: ' ERROR '});
$.weeboxs.open (' The operation failed ', {type: ' Wee '});
$.weeboxs.open (' The operation failed ', {type: ' success '});
$.weeboxs.open (' The operation failed ', {type: ' warning '});
$.weeboxs.open (' autoclosing in 5 seconds. ', {timeout:5});
The following are the default options:
Boxid:null,//Set this value only later, when opening the same Boxid window, the previous one will be automatically closed
Boxclass:null,//to the window to set other styles, with this can change the style of the window
Type: ' dialog ',//window types, currently has dialog,error,warning,success,wee,prompt,box six species
Title: ",//Window titles
width:0,//window width, when not set, will automatically change size according to the content
height:0,//Window height (note is the height of the content, not the height of the window)
timeout:0,//automatically shut down the number of seconds, after setting this value, the window will automatically close
Whether draggable:true,//can drag
Modal:true,//whether to display a mask
overlay:75,//Matte transparency
Focus:null,///When the window is open, the focus moves to the element, and the default moves to the Cancel button to
Position: ' Center ',//The window open after the default for the middle, when set to element, you need to set the Trager option,
Trigger:null,//display the reference element for the location, an element ID
showtitle:true,//whether the caption is displayed
showbutton:true,//whether buttons are displayed, including identifying and canceling
Showcancel:true,//whether to show the Cancel button
Showok:true,//whether to show the OK button
Okbtnname: ' OK ',//' OK ' button name
Cancelbtnname: ' Cancel ',//' Cancel ' button name
ContentType: ' text ',//Content acquisition method, there are currently three kinds of text,selector,ajax
When contentchange:false,//is selector
Clickclose:false,//Click to close the window when not on the bomb window
zindex:999,//the layer of the default pinball window
animate:false,//Effect Display
Onclose:null,//The function that triggers when the window is closed
Onopen:null,//The function that is triggered before the window is displayed, the content has been put into the window, but it hasn't been shown yet.
Onok:null//Click OK button to trigger the function