I want to fade out logo and fade in after fade out is completed

$(".navlist li a").click(function() {

     $("#logo").fadeOut("slow").delay(850).fadeIn("slow");

});

This code is not working well. fadeIn occurs fastly I used values instead "slow" but it fade out correctly and fade in fastly

Recommended Answers

All 6 Replies

You'll need to chain those events. fadeOut has a callback function as parameter that gets called when the fadeout is complete.

$("#logo").fadeOut("slow", function(){ $("#logo").fadeIn("slow") });

I tried this but problem occurs at fadeIn

I need ,

wait few seconds After fadeOut and then fadeIn "#logo"

$("#logo").fadeOut("slow", function(){ $("#logo").delay(850).fadeIn("slow") });

I have already tried this too, but .fadeIn("slow") is not working even after adding .delay(850) or adding like this .fadeIn(1200) also not working

What version of jQuery are you using? Upload your code sample to jsFiddle, so we can see it all.

http://jsfiddle.net/vUNP8/

It is working well in jsFiddle. But it create problem on localhost only for .fadeIn(1200) & I'm using jquery-1.8.3.min.js

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.