I have a problem with the returning value of the test function. This is the code:
$(document).ready(function () {
$("p").hide( test );
function test() {
return 5000;
}
});
After a bit of research a found the parseInt() function. But it didn't work.
- try with parseInt():
$(document).ready(function () { $("p").hide( test ); function test() { return parseInt(5000, 10); } }); - try with parseInt():
$(document).ready(function () { $("p").hide( parseInt(test, 10) ); function test() { return 5000; } });
I know I could just type:
$("p").hide( 5000 );
But that function will get more complex after resolving this problem.
hide()is the functiontest, not the result oftest(). jQuery interprets this as a completion callback - "calltestafter hiding the element".