Halfmoon is a highly customizable, drop-in Bootstrap replacement. It comes with three built-in core themes, with dark mode support for all themes and components.
halfmoon.initStickyAlert({title: 'Publishing...', message: '<i class="fas fa-spinner fa-spin"></i> Your post is being published, please wait..', type: 'alert-secondary', timeShown: 1500})
triggered when a form is being submitted, here's the full code:
$("#post-form").submit(function (e) {
e.preventDefault();
$.ajax({
url: '/post',
type: 'GET',
beforeSend: function () {
$('#settings-form').find('button').attr('disabled', true);
halfmoon.initStickyAlert({title: 'Publishing...', message: '<i class="fas fa-spinner fa-spin"></i> Your post is being published, please wait..', type: 'alert-secondary', timeShown: 1500})
},
data: {
content: content
},
success: function () {
$('#settings-form').find('button').attr('disabled', false);
$('#content').val('');
$('#posts').unload()
},
error: function () {
$('#settings-form').find('button').attr('disabled', false);
}
});
});
I keep getting this error whenever trying to trigger the function.
Meanwhile, I have it working in another page. Here's the code:
I have this simple code:
triggered when a form is being submitted, here's the full code:
I keep getting this error whenever trying to trigger the function.![error](https://capy-cdn.xyz/sLzJqqbWiRhx.png)
Meanwhile, I have it working in another page. Here's the code:
I have halfmoon.js imported in a headers file, and this headers file is imported in all my pages' files.