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)
  • You must be logged in to reply to this topic.

Register

You will be emailed a link to set your password.

Login

Lost password?