Skip to content

Instantly share code, notes, and snippets.

@EdwardIII
Created March 4, 2013 19:12
Show Gist options
  • Save EdwardIII/5084604 to your computer and use it in GitHub Desktop.
Save EdwardIII/5084604 to your computer and use it in GitHub Desktop.
$.post($form.prop('action'), $form.serialize(), function(data){
var $booking_dialog = $('<div class="dialog-wrap">' + data + '</div>'); /* first instance needs to be wrappe
$dialog_header = $booking_dialog.find('.dialog-header');
$dialog_header.hide();
var $submit = $booking_dialog.find('input[type="submit"]');
var submit_text = $submit.prop('value');
$submit.hide();
if($booking_dialog.is(':data(dialog)')){
console.log('nope');
$booking_dialog.dialog('show');
;
}else{
$booking_dialog.dialog({
'modal': true,
'width': '690px',
'title': false,
'open': function(){
$('.ui-widget-header').append($dialog_header.contents());
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment