Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

Re: Role of complete() function

Home Forums Older releases 0.9.x Role of complete() function Re: Role of complete() function


You don’t really need to care what it does. Just remember to call it after you’ve applied any effects in any custom showFunction you might use – e.g.:

showFunction: function($ul, complete) {
	var curHeight = $ul.css('height');
	$ul.css({ display: 'block', height: 0 }).animate({ height: curHeight }, 200, function() {
		$(this).css({ height: '' });
		// just call complete() at the end

It’s used for some built-in fixes – you can search the code of “jquery.smartmenus.js” if you’d like to get further details.