Timer function does not work

1

I'm using the Sweet Alert library and when I show a message I want it to remain on the screen for only a certain time and then it obviously disappears, according to the documentation I can use a function from the library itself, in case it would trigger it by adding the parameter timer (measured in ms) when creating alert . Here is my code:

swal({
    title:'Inserção concluída!',
    text: 'Inserção concluída com êxito.',
    type: 'success',
    timer: 2000
})

In the demo of site everything works correctly, but when running the same code I do not get the same result.

    
asked by anonymous 28.11.2014 / 04:43

0 answers