Hi Pablo:
The description to TOASTs in the help file is still very small, here a few questions:
What does the cookie related to a toast do? Does it avoid reappearance after closing the toast?
Can I trigger actions on "close toast"?
Can "close toast" be used with a link?
I want to use a toast as a "Acknowledge the page may use cookies"-message and after closing it, the user should be redirected to the main page and the toast should not appear for some time!
Toasts
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.quickandeasywebbuilder.com/f ... =12&t=1901
MUST READ:
http://www.quickandeasywebbuilder.com/g ... arted.html
Quick 'n Easy Web Builder FAQ
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.quickandeasywebbuilder.com/f ... =12&t=1901
MUST READ:
http://www.quickandeasywebbuilder.com/g ... arted.html
Quick 'n Easy Web Builder FAQ
Re: Toasts
yesDoes it avoid reappearance after closing the toast?
No, there no event for this.Can I trigger actions on "close toast"?
NoCan "close toast" be used with a link?
Re: Toasts
Thanks for the quick answer.
So I guess I need to build the function/message I mentioned with some other tool or can you think about any QnEWB function to use for that purpose?
So I guess I need to build the function/message I mentioned with some other tool or can you think about any QnEWB function to use for that purpose?
QnEWB V6.x - Ubuntu 18.04
Re: Toasts
It is possible with custom code. For example:
Note however that I cannot assist you with writing custom code.
Alternatively, you can try the dialog which does have a 'close' event.
Code: Select all
<script>
$(document).ready(function()
{
$("#Toast1").on('hidden.bs.toast', function ()
{
// do something
});
});
</script>
Alternatively, you can try the dialog which does have a 'close' event.
Re: Toasts
>Alternatively, you can try the dialog which does have a 'close' event.<
Just trying.... but seems that different than the Toast, the "dialog" condition will not be remembered by a cookie.... it seems to appear always.
Is this possible or am I doing something wrong?
Just trying.... but seems that different than the Toast, the "dialog" condition will not be remembered by a cookie.... it seems to appear always.
Is this possible or am I doing something wrong?
QnEWB V6.x - Ubuntu 18.04
Re: Toasts
Thanks for pointing me in this direction, but it is not working as I like to. Seems that "//do something" is fired only when the toast has being hidden by the user but not if the toast is not even shown because the cookie has not expired yet.Pablo wrote: ↑Mon Nov 25, 2019 7:05 am It is possible with custom code. For example:
Code: Select all
<script> $(document).ready(function() { $("#Toast1").on('hidden.bs.toast', function () { // do something }); }); </script>
QnEWB V6.x - Ubuntu 18.04
Re: Toasts
Correct.Seems that "//do something" is fired only when the toast has being hidden by the user but not if the toast is not even shown because the cookie has not expired yet.
See also:
https://getbootstrap.com/docs/4.3/components/toasts/