1.4 Live issue with multiple event types

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

1.4 Live issue with multiple event types

jquery.redsquare@googlemail.com
It appears adding trying to delegate multiple event types to live in
one statement is not supported.

With $('selector').live('keyup keydown', fn); the func is fired
outside of the selections.

Test case http://pastebin.me/2796fa93b74138794e94d2f7d75ea29c


--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.


Reply | Threaded
Open this post in threaded view
|

Re: 1.4 Live issue with multiple event types

Jerome Covington
Are you linking to jQuery 1.3.1 hosted by Google?

On Jan 15, 9:23 am, "[hidden email]"
<[hidden email]> wrote:
> It appears adding trying to delegate multiple event types to live in
> one statement is not supported.
>
> With $('selector').live('keyup keydown', fn); the func is fired
> outside of the selections.
>
> Test casehttp://pastebin.me/2796fa93b74138794e94d2f7d75ea29c

--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.


Reply | Threaded
Open this post in threaded view
|

Re: 1.4 Live issue with multiple event types

jquery.redsquare@googlemail.com
No, The site was built with jquery 1.3.1.
The site uses an iframe that links to 1.4.

On Jan 15, 3:19 pm, jerome <[hidden email]> wrote:

> Are you linking to jQuery 1.3.1 hosted by Google?
>
> On Jan 15, 9:23 am, "[hidden email]"
>
>
>
> <[hidden email]> wrote:
> > It appears adding trying to delegate multiple event types to live in
> > one statement is not supported.
>
> > With $('selector').live('keyup keydown', fn); the func is fired
> > outside of the selections.
>
> > Test casehttp://pastebin.me/2796fa93b74138794e94d2f7d75ea29c

--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.


Reply | Threaded
Open this post in threaded view
|

Re: 1.4 Live issue with multiple event types

dave.methvin
> > > With $('selector').live('keyup keydown', fn); the func is fired
> > > outside of the selections.

In 1.3.2 only one event name could be passed to live (unlike bind). I
don't see that changed in 1.4, did you see it documented somewhere?

--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.


Reply | Threaded
Open this post in threaded view
|

Re: 1.4 Live issue with multiple event types

jquery.redsquare@googlemail.com
Yup - in the API docs here - http://api.jquery.com/live/

eventType - A string containing one or more JavaScript event types,
such as "click" or "keydown"

On Jan 15, 5:39 pm, Dave Methvin <[hidden email]> wrote:
> > > > With $('selector').live('keyup keydown', fn); the func is fired
> > > > outside of the selections.
>
> In 1.3.2 only one event name could be passed to live (unlike bind). I
> don't see that changed in 1.4, did you see it documented somewhere?

--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.


Reply | Threaded
Open this post in threaded view
|

Re: 1.4 Live issue with multiple event types

Leeoniya
that seems like a mistake. wonder if it has been documented like this
since 1.3, cause it looks like it was just copied and pasted over. as
far as i know 1.3.2 never supported multiple events.


looking at the source
http://github.com/jquery/jquery/blob/master/src/event.js#L843

the type variable is not split or looped in any way like in bind:
http://github.com/jquery/jquery/blob/master/src/event.js#L73

this is a API doc error.

On Jan 15, 2:29 pm, "[hidden email]"
<[hidden email]> wrote:

> Yup - in the API docs here -http://api.jquery.com/live/
>
> eventType - A string containing one or more JavaScript event types,
> such as "click" or "keydown"
>
> On Jan 15, 5:39 pm, Dave Methvin <[hidden email]> wrote:
>
> > > > > With $('selector').live('keyup keydown', fn); the func is fired
> > > > > outside of the selections.
>
> > In 1.3.2 only one event name could be passed to live (unlike bind). I
> > don't see that changed in 1.4, did you see it documented somewhere?
>
>

--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.


Reply | Threaded
Open this post in threaded view
|

Re: 1.4 Live issue with multiple event types

Matias-17
On Jan 15, 9:54 pm, Leeoniya <[hidden email]> wrote:
> that seems like a mistake. wonder if it has been documented like this
> since 1.3, cause it looks like it was just copied and pasted over. as
> far as i know 1.3.2 never supported multiple events.

Yes, it doesn't work in 1.4. I still have to chain multiple live
events. Someone should change the docs.

--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.


Reply | Threaded
Open this post in threaded view
|

Re: Re: 1.4 Live issue with multiple event types

Karl Swedberg-2

On Jan 18, 2010, at 5:43 AM, matiasnu wrote:

On Jan 15, 9:54 pm, Leeoniya <[hidden email]> wrote:
that seems like a mistake. wonder if it has been documented like this
since 1.3, cause it looks like it was just copied and pasted over. as
far as i know 1.3.2 never supported multiple events.

Yes, it doesn't work in 1.4. I still have to chain multiple live
events. Someone should change the docs.

The docs are now updated.
http://api.jquery.com/live/

--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com


--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.