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
Post a Comment