Remove delay() on click event
I have a panel who slide automatically after 13 seconds. I made this with jquery.delay().
The problem appears if I want to manually slide the panel with a click event. It appears that the click event is waiting the end of the delay to effect..

What can I use in place of delay()?

My code :

The delay part:

    $('#menu').delay(13000).hide("slide", { direction: "right" }, 400, function () {
                if ($('#menu').is(':hidden')) {
                    $('#trigger').removeClass("triggerdroiteExtended");
                    $('#trigger').addClass("triggerdroiteCollapsed");
                    $.cookie('rightfold', 'collapsed', { path: '/' });
                }
            });
The Click event part:

  

      $('#triggerdroite').click(function () { foo
    });
Remove delay() on click event
===

I have a panel who slide automatically after 13 seconds. I made this with jquery.delay().
The problem appears if I want to manually slide the panel with a click event. It appears that the click event is waiting the end of the delay to effect..

What can I use in place of delay()?

My code :

The delay part:

    $('#menu').delay(13000).hide("slide", { direction: "right" }, 400, function () {
                if ($('#menu').is(':hidden')) {
                    $('#trigger').removeClass("triggerdroiteExtended");
                    $('#trigger').addClass("triggerdroiteCollapsed");
                    $.cookie('rightfold', 'collapsed', { path: '/' });
                }
            });
The Click event part:

  

      $('#triggerdroite').click(function () { foo
    });