hello,
I just downloaded sweetalert. It looks great only the alert closes itself in 2 seconds.
Don't understand what I am doing wrong since on the demo it works prefectly !
I am using firefox 35.0 (but same issue with IE 11) on PC.
Here is my code :
function fswal()
{
swal({
title: "Hello!",
text: "Here's my message!",
type: "info",
confirmButtonText: "Cool"
});
}
I even tried to put a very long timer but it didn't change anything.
Any help will be greatly appreciated :)
Thanks in advance
@dock21 tested it with firefox 35, seems to work fine. Can you test with the latest release if you still have this issue?
@dock21 I think you just forgot to put the option timer, didn't you? Here's an example:
swal({
title: "Auto close alert!",
text: "I will close in 2 seconds.",
timer: 2000
});
@dhyegofernando
What he is saying is that it is closing by itself after 2 seconds, and he doesn't want it to.
My bad. I saw a little quickly.
Just like @adi-ads tested in the Firefox 35 so did I and I haven't found any issue. It works fine.
@dock21 could you reproduce it in a JSFiddle project?
sorry guys I thought I replied days ago.
In fact my issue is similar to an issue already created: my button is included in a form that's what causes the closing.
Thanks for looking anyway
This can be closed as a wontfix. This issue was that @dock21 thought swal() was a blocking JS command like alert() is.
Issue can be fixed if you change the button type from " submit " to " button" but I dont know then if the the button of form sends data to php or not
, I would like to know
Most helpful comment
@dock21 I think you just forgot to put the option
timer, didn't you? Here's an example: