right, so does that mean their is no way to specify only the hover out
in jquery?

On Feb 17, 6:21 pm, James <james.gp....@gmail.com> wrote:
> The syntax for hover() is hover(function, function), where the first
> function is what happens when something is onmouseover and the second
> is onmouseout.
>
> $(elem).hover(
>      function() {
>          // do something on mouseover
>      },
>      function() {
>           // do something on mouseout
>      }
> );
>
> On Feb 17, 1:07 pm, pedalpete <p...@hearwhere.com> wrote:
>
> > I've got a fairly simple form with a few dropdowns which I currently
> > trigger on hovers.
>
> > A use requested that instead of a hover, that the dropdowns be
> > triggered by a click event.
> > No problem, except that I need the dropdown to slideUp when the user
> > hovers out.
>
> > I've taken a look at the .hover documentation, but can't seem to
> > figure out how to specify the 'out' (though it does say that this
> > exists).
>
> > Here's the code I've got now
>
> > [code]
> > $('form#filterList span.holdDate').click(function(){
> >                 $('span#datePickers, div.datepicker').slideDown('fast');
>
> >                 },
> >                 $('span#datePickers').hover('out', function(){
> >                 $('#datePickers').slideUp('slow');
> >                 });
> >         });
> > [/code]
>
> > unfortunately, i'm getting an error when running this function. I
> > figure it is more efficient to only run the 'hover' code within
> > the .click function, but maybe that isn't right.

Reply via email to