Skip to content

Instantly share code, notes, and snippets.

@onefriendaday
Created June 28, 2014 12:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save onefriendaday/f4f4dc001e7fe79b9ce8 to your computer and use it in GitHub Desktop.
Bootbox Ajax
$('.open-modal-btn').click(function(e){
$that = $(this);
e.preventDefault();
$.ajax({
url: $that.attr('href'),
type: 'POST',
dataType: 'json',
success: function(data){
bootbox.dialog({
message: data.message,
title: data.title,
buttons: {
success: {
label: data.submit,
className: "btn-primary",
callback: function() {
$('#create-ticket-form').submit();
}
},
}
});
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment