dialog not working
dialog not working
- $('#complete_dialog').dialog({
- height: 140,
- modal: true,
- resizable: false,
- buttons: {
- 'Mark Complete' : function() {
- $('input#mark_complete').val('on');
- $('input#mark_complete').attr('checked', true)
- $(this).dialog('close');
- return true;
- },
- Cancel : function() {
- $('input#mark_complete').val('off');
- $('input#mark_complete').attr('checked', false);
- return false;
- $(this).dialog('close');
- }
- }
- });
- $('#mark_complete').click(function() {
- $('#complete_dialog').dialog('open');
- });
- <div id="dialog_complete" title="ML Complete Warning">
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>
Once you have marked this ML complete, you will be unable to change materials within. You will be required to create a supplement to add materials.<br />Please confirm the Ship To address before continuing. Are you sure you want to mark this complete?</p>
</div>
Why does the <div> with the dialog info appear on the top of the page instead of waiting for the dialog box to be opened? And the click bind does not open it.