I quite like the sound of the keydown[enter] style events. I wonder thought
does it have much use outside of key events? I suppose mousedown/up could
specify the button that was clicked? The reason I ask is perhaps rather than
potentially changing the syntax of the event binding calls you could just
create a function like $.fn.key("keycode/regex/complex selector") (or somtehing
similar) that would be an event specific to the matching keypress/down/up
whatever? Just a thought.
James
________________________________
From: [email protected] on behalf of ajpiano
Sent: Fri 30/01/2009 09:59
To: jQuery Development
Subject: [jquery-dev] Re: Proposal: Attributed events
maybe a few jquery event shortuts to specific keycodes/ranges of
keycodes, which would provide a meaningful semantic layer, as opposed
to further entrenching the spread of ranges of valid numeric keycodes
into our jquery events
$(...).bind("keydown[enter] keydown[numeric]",fn)
or maybe even simply
$(...).bind("enter",fn);
I'm sure there are better ideas out there for implementation than that
but I think something along these lines might be more useful. Unless
you are proposing a generic method of binding to events after
performing a filter based on a property of the event object, in which
case I still sort of think special keypress helpers might be useful.
On Jan 29, 10:25 pm, Dave Methvin <[email protected]> wrote:
> Sounds kind of nice to me. Do you have some other examples? I wonder
> how it would be expected to interact with other features:
>
> $("p").bind("click.myplug keydown[keyCode=119].myplug", function ...
--------------------------------------------------------------------
This e-mail is intended solely for the addressee and is strictly confidential;
if you are not the addressee please destroy the message and all copies. Any
opinion or information contained in this email or its attachments that does not
relate to the business of Kainos
is personal to the sender and is not given by or endorsed by Kainos. Kainos is
the trading name of Kainos Software Limited, registered in Northern Ireland
under company number: NI19370, having its registered offices at: Kainos House,
4-6 Upper Crescent, Belfast, BT7 1NT,
Northern Ireland. Registered in the UK for VAT under number: 454598802 and
registered in Ireland for VAT under number: 9950340E. This email has been
scanned for all known viruses by MessageLabs but is not guaranteed to be virus
free; further terms and conditions may be
found on our website - www.kainos.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---