默認(rèn)的
new Dialog('這是一個默認(rèn)對話框').show();
非模態(tài)對話框
new Dialog('非模態(tài)對話框,可以打開多個!',{modal:false}).show();
自動關(guān)閉
new Dialog('5秒后自動關(guān)閉',{time:5000}).show();
非fixed模式
new Dialog('對話框不隨滾動條移動',{fixed:false}).show();
顯示指定ID的內(nèi)容
// 將顯示本標(biāo)簽內(nèi)的內(nèi)容。
new Dialog({type:'id',value:'content-type-id'}).show();
加載一張圖片
new Dialog({type:'img',value:'http://www.caixw.com/public/uploads/demo/images/300x125.gif'}).show();
加載一URL地址
new Dialog({type:'url',value:'http://www.caixw.com/public/uploads/demo/jquery/dialog/test.html'}).show();
加載一URL到iframe
new Dialog({type:'iframe',value:'http://www.caixw.com'}).show();

自定義CSS

自定義背景遮蓋層
#dialog1-overlay
{
  background
:blue;
  opacity
:0.8;
  filter
:alpha(opacity=80);
}
new Dialog('自定義背景遮蓋層',{id:'dialog1'}).show();
自定義內(nèi)容部分背景
#dialog2 .content
{
  width
:250px;
  height
:80px;
  background
-image:url(http://www.caixw.com/public/uploads/demo/images/300x125.gif);
}
new Dialog('自定義內(nèi)容部分背景',{id:'dialog2'}).show();

回調(diào)函數(shù)

show()函數(shù)
new Dialog('show()回調(diào)函數(shù)'
   
{beforeShow:function(){alert('before show'),return true},afterShow:function(){alert('after show');}})
   
.show();
hide()函數(shù)
dlg = new Dialog('hide()回調(diào)函數(shù)'
   
{beforeHide:function(){alert('before hide'),return true},afterHide:function(){alert('after hide');}})
   
.show();
dlg
.hide();
    

close()函數(shù)
new Dialog('close()回調(diào)函數(shù)'
   
{beforeClose:function(){alert('before close'),return true},afterClose:function(){alert('after close');}})
   
.show();