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.

Role of complete() function

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1395
    David
    Participant

    Forgive me if I am stupid, just still kinda new to this, but what is the role of the “complete()” in things like the showFunction?

    Where is it being called from?

    Many thanks!

    #1772
    admin
    Keymaster

    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
    		complete();
    	});
    }

    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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘0.9.x’ is closed to new topics and replies.