Im trying to do a dialog box with jquery. In this dialog box Im going to have terms and conditions. The problem is that the dialog box is only displayed for the FIRST TIME.<
Even I faced similar issues. This is how I was able to solve the same
$("#lnkDetails").live('click', function (e) {
//Create dynamic element after the element that raised the event. In my case a
$(this).after('');
//Optional : Load data from an external URL. The attr('href') is the href of the tag.
$('#dialog-confirm').load($(this).attr('href'));
//Copied from jQueryUI site . Do we need this?
$("#dialog:ui-dialog").dialog("destroy");
//Transform the dynamic DOM element into a dialog
$('#dialog-confirm').dialog({
modal: true,
title: 'Details'
});
//Prevent Bubbling up to other elements.
return false;
});