I think, there is a little bug in your plugin. If you use $(this) in
the event function, your are pointing (in firefox) to the window
instead to the element.

Here is my code (firebug is your fried :):

$('.leaf').mousewheel(function(event, delta){
  if (delta > 0) {
    console.info("Up");
    console.log($(this)); //will return [window]
  } else if (delta < 0) {
    console.info("Down");
  }
},true);


Mathias

2006/9/29, Brandon Aaron <[EMAIL PROTECTED]>:
> > I overrode the mousewheel method...
>
> I don't think I used the correct terminology there. That should be 'I
> overloaded' instead of 'I overrode' ... at least I think so.
>
> --
> Brandon Aaron
>
> On 9/28/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> > Okay ... I've updated the plugin once again.
> >
> > I overrode the mousewheel method to take an optional two functions
> > instead of one. The first function is the up handler and the second
> > function is the down handler. The preventDefault is still the last
> > param. I also added mousewheelup and mousewheeldown along with
> > unmousewheelup and unmousewheeldown. However, you can't chain
> > mousewheelup and mousewheeldown together. The last one in the chain
> > will override the previous. Also unmousewheelup and unmousewheeldown
> > will remove both up and down if they exist. I tried to get around this
> > but couldn't easily do so. If you need a seperate function for both up
> > and down, just use mousewheel method with two functions.
> >
> > The example/test page is updated as well as the SVN. The blog entry
> > however, is not updated yet.
> >
> > I've also posted this on the plugins page of jquery.com.
> >
> > Brandon
> >
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to