Raised ticket:
http://dev.jquery.com/ticket/4189
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this g
> There was a brief discussion about binding to the current context
> rather than document, which is similar to what you are suggesting:
>
> http://groups.google.com/group/jquery-dev/browse_thread/thread/911a50d2a0ed64b9
>
> John, should I raise a ticket for this?
Sure. I already have it on my to
There was a brief discussion about binding to the current context
rather than document, which is similar to what you are suggesting:
http://groups.google.com/group/jquery-dev/browse_thread/thread/911a50d2a0ed64b9
John, should I raise a ticket for this?
On Feb 17, 9:21 am, weepy wrote:
> Re th
Re the following code :
>$(".grid").bind('click', function(ev) {
> var sq = $(ev.target).closest('.sq');
> ...
>
>});
Would make sense to support this with live by specifying the parent
element (".grid") in this case?
I.e. the above could be written something like this:
$(".sq").live("click",
Ah - that's neat - thanks Mark
On 16 Feb, 10:33, Mark Gibson wrote:
> .live registers all handlers on document, so in this case would have
> to filter all click events.
> For this case you may be better off handling this at the grid level
> and making use of .closest:
>
> $(".grid").bind('click'
.live registers all handlers on document, so in this case would have
to filter all click events.
For this case you may be better off handling this at the grid level
and making use of .closest:
$(".grid").bind('click', function(ev) {
var sq = $(ev.target).closest('.sq');
...
});
On Feb 15
$('#foo').live('click', myfunc )
Would have poor performance compared to:
$('#foo').bind('click', myfunc )
Live is good in cases where you want to delegate amongst a large number
of nodes. If you only have one or two, then it just reduces performance
because then the delegated functions get cal