Jquery delay timeout function???

Posted by iSimpleDesign on Stack Overflow See other posts from Stack Overflow or by iSimpleDesign
Published on 2011-01-13T14:46:13Z Indexed on 2011/01/13 14:53 UTC
Read the original article Hit count: 221

Filed under:
|
|

I am really struglling tring to get this to work what i what is if my php script returns success.

echo success

I want it to should a message that says congratulations its all setup but stay for aleast 5 seconds but it never seems to work i have tried elay etc but still getting issues please help.

here is my code it works but for about a second it then redirects far to quick to read it.

 if($.trim(data) == 'Congratulations'){
setTimeout(function(){
    $('#congrats').fadeIn(1000,function(){
        window.location.href='http://example.co.uk/tour/first-time-users';
    });
},5500);

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about timeout