jquery simpledialog2按钮事件

时间:2013-12-20 06:40:11

标签: jquery jquery-plugins simpledialog

我使用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中我们有一个按钮,我想在按钮上添加一个事件。如何添加事件?

1 个答案:

答案 0 :(得分:0)

我可以通过live来解决。

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

我将这段代码放在对话框下面。