So nach dem Einreichen eines Formulars für eine Überprüfung, würde ich gerne ein modale Popup, um den Kunden zu danken und autoclose nach einer Verzögerung. Ich habe diesen Code:Ich möchte eine modale popup autoclose nach dem Senden Formular
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES); ?>" id="feedbackForm" data-toggle="validator" data-disable="false" method="post">
<button type="submit" value="Submit" title="Post your review" class="btn btn-primary btn-lg" data-loading-text="Sending..." style="display: block; margin-top: 10px;">Send <span class="glyphicon glyphicon-send"></span></button>
</form>
<div id="dialog" style="display: none">
Thank you for your review, this dialog will automatically close in 10 seconds.
</div>
</div>
<script type="text/javascript">
$(document).ready(function()
{
;(function($) {
// DOM Ready
$(function() {
// Binding a click event
// From jQuery v.1.7.0 use .on() instead of .bind()
$('#my-button').on('click', function(e) {
// Prevents the default action to be triggered.
e.preventDefault();
$('#feedbackForm').ajaxForm(function() {
$('#dialog').bPopup({
autoClose: 3000,
easing: 'easeOutBack', //uses jQuery easing plugin
speed: 450,
transition: 'slideDown'
});
});
});
});
});
})(jQuery);
</script>
Es senden Sie das Formular aber die modale Popup geöffnet nicht ... Vielen Dank für Ihre Hilfe!
Danke, ja, ich sind JQuery, wenn ich diese entfernen: "$ ('# feedback') ajaxForm (function() {", das modale Popup ist offen und autoclose, aber die Form ist nicht reichen dann .... – seb606