2013-12-20 24 views
0

我正在使用simpledialog2來顯示移動對話框。jquery simpledialog2按鈕事件

defaultDialogConfig: { 
    mode: 'blank', 
    dialogForce: false, 
    showModal: true, 
    headerText: '', 
    headerClose: true, 
    animate: false, 
    zindex: 9999, 
    blankContent: '', 
    themeDialog: 'b', 
    themeInput: 'e', 
    themeButtonDefault: false, 
    themeHeader: 'a', 
    callbackOpen: lockScreen, 
    callbackClose: unlockScreen 
}, 

調用此simpledialog2

var config = defaultDialogConfig; 
       $.extend(config, {blankContent: response.address}); 
       var dialog = $(document.createElement('div')); 
       dialog.simpledialog2(config); 
我repsone

我們有一個按鈕,我想將事件添加到button.How我可以添加一個事件?

+0

遵循這個:http://dev.jtsage.com/jQM-SimpleDialog/demos2/button.html –

+0

我看到this.It是靜態按鈕,因爲我的按鈕將響應。 – sree

+0

你有沒有嘗試過事件代表團?就像使用jQuery一樣 –

回答

0

我可以通過live來解決。

$('#button').live("click",function() { 
    alert("hi"); 
}) 

我把這段代碼放在dialog對話框下面。