-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If you use multiple loadings, message does not change #4
Comments
Hi @morzius, thanks for the feedback! That's a scenario I didn't consider when developing this plugin. For now, the plugin uses the first call to create the plugin object and store it in the associated DOM (in your case, the body). The subsequent calls use the previously defined overlay and just start it. For now, you can temporarily fix your problem doing: $('body').removeData('jquery-loading');
$('body').loading({
...
}); This will remove the previously defined overlay and start it all again. I will be working on a permanent solution and posting the feedback here. Let me know if you have another problem. |
Thank you, $('body').loading({
...
});
$(".loading-overlay-content").text('...'); |
I solved it using this: $.Loading.setDefaults({
onStop: function (loading) {
$(loading.element).removeData('jquery-loading');
}
}); |
@morzius, @tompazourek. I just fixed the problem on release 1.1.0. Now subsequent calls to the plugin will override config options. Please, let me know if you find any problems. Thanks for the feedback! |
I got 2 buttons with ajax on them,
first one
...
beforeSend: function () {
$('body').loading({
stoppable: false,
message: 'Unpublish...'
});
},
...
second one
...
beforeSend: function () {
$('body').loading({
stoppable: false,
message: 'Publish...'
});
},
...
if i click "publish", then another button will have same message and vice versa
The text was updated successfully, but these errors were encountered: