Created
November 18, 2018 04:53
-
-
Save TheYkk/e23e4b96f387e21e11b8ad63bdf15228 to your computer and use it in GitHub Desktop.
Modal javascript update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$("#myForm").submit(function(event) { | |
$.ajax({ | |
type: "POST", | |
url: 'url.php', | |
data: $(this).serialize(), | |
dataType: 'json', | |
success: function(data) | |
{ | |
$('#myModal').find('.modal-body').addClass('alert-success'); | |
$('#myModal').find('.modal-body').html(data.message).show; | |
$('#myModal').find('.modal-body').removeClass('hidden'); | |
$('#myModal').modal('show'); | |
} | |
}); | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment