Re: [jQuery] mousewheel plugin updated

2007-01-11 Thread David Duymelinck
Brandon Aaron schreef:
 Test page: http://brandon.jquery.com/plugins/mousewheel/test/test.html
   
I tested the page on FF2 and i didn't see the log frame.

In IE7 tests 6 and 7 fail their limitation. They both show movement up 
and down.

Nice work. I didn't know it could get the speed of the movement but i 
haven't used it yet. I already made it into a game to get the highest 
movement (24.975) :)

-- 
David Duymelinck

[EMAIL PROTECTED]


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


Re: [jQuery] mousewheel plugin updated

2007-01-11 Thread Andy Matthews
Nice Brandon...

IE7 here. Everything seemed to work as promised except test 6 which says
should only do something when the mousewheel is moved down. yet I got a
response in the monitor pane when I moved the mousewheel up. Just FYI.

This works really well, you should be proud of yourself. I can easily where
many people will leverage your work.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Brandon Aaron
Sent: Thursday, January 11, 2007 8:36 AM
To: jQuery Discussion.
Subject: [jQuery] mousewheel plugin updated

I've made some big changes to the mousehweel plugin. All of these changes
are based on quality feedback from users of the mousehweel plugin. First, I
really simplified the API. The only methods are:
 - mousewheel()
 - unmousewheel()

The mousewheel() method takes only one function and a second optional param
called preventDefault. The function passed in still needs to be ready for
two params, event and delta. The delta is a number greater or lesser than 0
indicating the velocity and direction of the mousewheel. The preventDefault
param is defaulted to true now.

There are two other features that I added in. You can now have nested
elements that use the mousewheel event and you can add multiple handlers to
the same element.

Test page: http://brandon.jquery.com/plugins/mousewheel/test/test.html
Source from SVN:
http://jquery.com/dev/svn/trunk/plugins/mousewheel/mousewheel.js?format=txt

Enjoy!

--
Brandon Aaron

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


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


Re: [jQuery] mousewheel plugin updated

2007-01-11 Thread Brandon Aaron
It is fixed. :)

--
Brandon Aaron

On 1/11/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Sorry, that was my fault. Copy and paste from previous test page.
 There aren't supposed to be limitations. I'll update the test page
 shortly.

 --
 Brandon Aaron

 On 1/11/07, David Duymelinck [EMAIL PROTECTED] wrote:
  Brandon Aaron schreef:
   Test page: http://brandon.jquery.com/plugins/mousewheel/test/test.html
  
  I tested the page on FF2 and i didn't see the log frame.
 
  In IE7 tests 6 and 7 fail their limitation. They both show movement up
  and down.
 
  Nice work. I didn't know it could get the speed of the movement but i
  haven't used it yet. I already made it into a game to get the highest
  movement (24.975) :)
 
  --
  David Duymelinck
  
  [EMAIL PROTECTED]
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


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


Re: [jQuery] mousewheel plugin updated

2007-01-11 Thread Abel Tamayo

Is it compatible with jQuery-1.1b?

On 1/11/07, Brandon Aaron [EMAIL PROTECTED] wrote:


It is fixed. :)

--
Brandon Aaron

On 1/11/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Sorry, that was my fault. Copy and paste from previous test page.
 There aren't supposed to be limitations. I'll update the test page
 shortly.

 --
 Brandon Aaron

 On 1/11/07, David Duymelinck [EMAIL PROTECTED] wrote:
  Brandon Aaron schreef:
   Test page:
http://brandon.jquery.com/plugins/mousewheel/test/test.html
  
  I tested the page on FF2 and i didn't see the log frame.
 
  In IE7 tests 6 and 7 fail their limitation. They both show movement up
  and down.
 
  Nice work. I didn't know it could get the speed of the movement but i
  haven't used it yet. I already made it into a game to get the highest
  movement (24.975) :)
 
  --
  David Duymelinck
  
  [EMAIL PROTECTED]
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


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

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


Re: [jQuery] mousewheel plugin updated

2007-01-11 Thread Brandon Aaron
Yes it is.

--
Brandon Aaron

On 1/11/07, Abel Tamayo [EMAIL PROTECTED] wrote:
 Is it compatible with jQuery-1.1b?


 On 1/11/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 
  It is fixed. :)
 
  --
  Brandon Aaron
 
  On 1/11/07, Brandon Aaron [EMAIL PROTECTED] wrote:
   Sorry, that was my fault. Copy and paste from previous test page.
   There aren't supposed to be limitations. I'll update the test page
   shortly.
  
   --
   Brandon Aaron
  
   On 1/11/07, David Duymelinck  [EMAIL PROTECTED] wrote:
Brandon Aaron schreef:
 Test page:
 http://brandon.jquery.com/plugins/mousewheel/test/test.html

I tested the page on FF2 and i didn't see the log frame.
   
In IE7 tests 6 and 7 fail their limitation. They both show movement up
and down.
   
Nice work. I didn't know it could get the speed of the movement but i
haven't used it yet. I already made it into a game to get the highest
movement (24.975) :)
   
--
David Duymelinck

[EMAIL PROTECTED]
   
   
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
   
  
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


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




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


Re: [jQuery] mousewheel plugin

2006-09-27 Thread John Resig
 Oh wow ... okay I'll have to look into that. I don't even remember the
 reason why I thought it didn't now. Heh that is going to simplfy some
 of my code. :)

You should definitely post your code as a plugin. While I don't think
this is widely-needed enough to be in core (considering that Safari
and Opera, apparently, don't work), it would certainly be useful to
those that want it.

--John

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


Re: [jQuery] mousewheel plugin

2006-09-26 Thread Mark Gibson
Brandon Aaron wrote:
 I've actually just recently implemented the mousewheel and thought
 about writting it as a plugin. There are a few special situations that
 need to be considered. For example IE allows a mousewheel event to be
 attached to an element in the dom and Firefox allows it only to be
 attached to the document. So I have normalized this so that you can
 attach a mousewheel event to elements in the dom. The unfortunate part
 is that it doesn't work in Safari, yet. I'm not sure about Opera.

Strange, I've managed to attach it to any element:

el.addEventListener('DOMMouseScroll', function(e) {
console.log(e.detail);
e.preventDefault();
}, false);

Hover the mouse over the element and scroll, it worked fine!
The element doesn't even require focus.
(Firefox 1.5.0.7)

e.detail usually contains 3 or -3.

- Mark.

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


Re: [jQuery] mousewheel plugin

2006-09-26 Thread Webunity | Gilles van den Hoven
Mathias Bank wrote:
 It seems, that mousewheel is not an accepted event in jquery. So I
 have written a small plugin that can handle wheel events. It is based
 on http://adomas.org/javascript-mouse-wheel/. 
Nice! I just sent an email about the exact same page to John today (3 
hours ago), telling him we need Mousewheel support!
I think however that you cp'd much of the code there, and i think a lot 
of the code could be removed since it is allready in the jQuery core.

I hope that John gives his reaction to this!

-- Gilles

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


Re: [jQuery] mousewheel plugin

2006-09-26 Thread Brandon Aaron
Oh wow ... okay I'll have to look into that. I don't even remember the
reason why I thought it didn't now. Heh that is going to simplfy some
of my code. :)

Brandon

On 9/26/06, Mark Gibson [EMAIL PROTECTED] wrote:
 Brandon Aaron wrote:
  I've actually just recently implemented the mousewheel and thought
  about writting it as a plugin. There are a few special situations that
  need to be considered. For example IE allows a mousewheel event to be
  attached to an element in the dom and Firefox allows it only to be
  attached to the document. So I have normalized this so that you can
  attach a mousewheel event to elements in the dom. The unfortunate part
  is that it doesn't work in Safari, yet. I'm not sure about Opera.

 Strange, I've managed to attach it to any element:

 el.addEventListener('DOMMouseScroll', function(e) {
 console.log(e.detail);
 e.preventDefault();
 }, false);

 Hover the mouse over the element and scroll, it worked fine!
 The element doesn't even require focus.
 (Firefox 1.5.0.7)

 e.detail usually contains 3 or -3.

 - Mark.

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


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


Re: [jQuery] mousewheel plugin

2006-09-26 Thread Brandon Aaron
I've actually just recently implemented the mousewheel and thought
about writting it as a plugin. There are a few special situations that
need to be considered. For example IE allows a mousewheel event to be
attached to an element in the dom and Firefox allows it only to be
attached to the document. So I have normalized this so that you can
attach a mousewheel event to elements in the dom. The unfortunate part
is that it doesn't work in Safari, yet. I'm not sure about Opera.

I actually wrote this for a custom scrollbar and allows the mousewheel
to be used in any div that has the scrollbar when you mouseover it.

Again, as with everything it take time to do it right and do the
tests. I've got lots on my plate but this is something I would like to
pursue in more depth.

Brandon

On 9/26/06, Webunity | Gilles van den Hoven [EMAIL PROTECTED] wrote:
 Mathias Bank wrote:
  It seems, that mousewheel is not an accepted event in jquery. So I
  have written a small plugin that can handle wheel events. It is based
  on http://adomas.org/javascript-mouse-wheel/.
 Nice! I just sent an email about the exact same page to John today (3
 hours ago), telling him we need Mousewheel support!
 I think however that you cp'd much of the code there, and i think a lot
 of the code could be removed since it is allready in the jQuery core.

 I hope that John gives his reaction to this!

 -- Gilles

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


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