You need to pass an anonymous method to do what you want, for example:
jQuery(function($) {
setTimeout(function() {
$.mainmenuslider({
trigger:'close'
});
}, 6000);
});
Otherwise, you are trying to pass the result of the function (to execute it immediately, and do not run it later).
source
share