The hoverIntent plugin assumes you're sending it either:

a) both over and out functions, or
b) a single configuration object.

When you send it only one function it assumes that that's the configuration
object. As you are only interested in using an over function, I'd recommend
sending an anonymous function for the out function. You could name your
functions and use them directly in the method, or as part of the
configuration object:

var overFn = function(){
     $("dd:visible").slideUp("slow");
     $(this).parent().next().slideDown("slow");
     return false;
};

var outFn = function(){};

$("dt a").hoverIntent( overFn, outFn );

// OR //

$("dt a").hoverIntent({
    over: overFn,
    out: outFn
});

Let me know if this helps,
Brian.



On Fri, Feb 20, 2009 at 3:57 PM, zac <zacharyf...@gmail.com> wrote:

>
>
> I am trying to add the hoverIntent plugin to this basic accordion menu
> such as this:
>
> $("dd").hide();
>                $("dt a").hover(function(){
>                        $("dd:visible").slideUp("slow");
>                        $(this).parent().next().slideDown("slow");
>                        return false;
>                });
>
> I am confused about how to call those functions for over and out:
>
>        $("dt a").hoverIntent({
>                                sensitivity: 3,
>                                interval: 200,
>                                over: ?,
>                                timeout: 500,
>                                out: ?,
>
>                        });
>
> The plugin says it is interchangeable with hover but when I try this:
>
>
> $("dd").hide();
>                $("dt a").hoverIntent(function(){
>                        $("dd:visible").slideUp("slow");
>                        $(this).parent().next().slideDown("slow");
>                        return false;
>                });
>
>
>
> I get errors because I did not define the over and out.  How do I
> define these?
>
> Thanks for any help with this.
>

Reply via email to