jquery - Calling a user defined function as callback parameter in fadeOut() -


a basic question:

$(element).fadeout("slow",myfunction()); 

this doesn't work. correct way it?

try

$(element).fadeout("slow", myfunction); 

your code, i.e. adding () run code rather defining callback.

just quick console playing:

function test() {}  typeof test // "function" typeof test() // "undefined" 

so argument needs function , not function returns (except function, too).


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -