You need to get rid of the parentheses on doFade()
.
The parentheses invoke the function instantly.
Just use this in stead: doFade
More Related Contents:
- Why is bracket notation not working here? [duplicate]
- Why is set.timeout not working in this php while loop?
- How can I pass a parameter to a setTimeout() callback?
- Calling functions with setTimeout()
- Pass correct “this” context to setTimeout callback?
- Combination of async function + await + setTimeout
- setTimeout calls function immediately instead of after delay
- Difference between setTimeout with and without quotes and parentheses
- Why is my function call that should be scheduled by setTimeout executed immediately? [duplicate]
- Execute script after specific delay using JavaScript
- What is the reason JavaScript setTimeout is so inaccurate?
- JavaScript : For loop with timeout
- Passing functions to setTimeout in a loop: always the last value?
- Javascript SetTimeout and Loops [duplicate]
- setTimeout / clearTimeout problems
- setInterval/setTimeout return value
- How do I clear this setInterval inside a function?
- Is there a faster way to yield to Javascript event loop than setTimeout(0)?
- What happens to setTimeout when the computer goes to sleep?
- setTimeout behaviour with blocking code
- How many concurrent setTimeouts before performance issues?
- How to tell .hover() to wait?
- stop settimeout in recursive function
- Why doesn’t setTimeout(.., 0) execute immediately?
- JQuery, setTimeout not working
- Are equal timeouts executed in order in Javascript?
- How to use “setTimeout” to invoke object itself
- How browser executes Javascript and renders asynchronously
- setTimeout Internet Explorer
- setTimeout() method inside a while loop [duplicate]