jquery simpledialog2 button event

380 views Asked by At

I am using simpledialog2 to show the dialog in mobile.

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
},

calling this simpledialog2

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

in my repsone we have a button and I want to add a event to the button.How Can I add an event?

1

There are 1 answers

0
sree On BEST ANSWER

I am able to resolve by live.

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

I placed this piece of code below the dialog show.