how can I animate an API function?

I have this code that uses an API supplied by a plugin (wordpress)

$('#my_overlay').click(function(){
        uberMenu_close('#menu-item-1459');
        return false;
    });

What it does is it closes the sub-menu associated with #menu-item-1459 when the #my_overlay is clicked. However it is really abrupt since there is no animation.

How can I add an animation effect to the code above?

Here is the JS that defines the API of "uberMenu_close('ID')" (just in case I have to actually edit this instead of my code above, and to give you a better picture)

function uberMenu_close( id ){
    var $uber = $ujq('#megaMenu').data( 'uberMenu' );
    $uber.close( id );
}

Thanks

Answers


I'd try changing the second function you posted to add fadeOut() functionality. Something like this.

function uberMenu_close( id ){
    var $uber = $ujq('#megaMenu').data( 'uberMenu' );
    //adjust how quickly you want it to fade, 1000 is one second
    $(id).fadeOut(1000,function(){
        $uber.close( id );
    }); 
}

Need Your Help

Why is it that sometimes my web application does not work on the iPhone?

iphone authentication session cookies

I have a web application that uses login and sessions (cookies). Why is it that sometimes, when the iPhone is going slow with the 3G network (super super slow), the iphone doesn't see the cookies?

EJB 2.1 Vs EJB 3.1

java java-ee ejb ejb-3.1 ejb-2.x

Just wanted to know can i directly run the code which EJB code (adhering to 2.1 specs) in a EJB 3.1 container of an application server?In an application server, are there different versions of the...