Not to mention it would either be broken, or be a complete hack.
$(selector, context); is actually an alias for
$(context).find(selector); And this.context isn't what was passed to
context.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [
http://daniel.friesen.name]
Jörn Zaefferer wrote:
> Working or not, having public API methods rely on the context-property
> doesn't seem like a great idea - is that the case anywhere else?
>
> Jörn
>
> On Wed, Jul 22, 2009 at 11:32 PM, mike.helgeson<
mike.helgeson@gmail.com> wrote:
>
>> That makes a lot of sense, except it does not work. The "context"
>> property of the jquery instance is always equal to the first element
>> when passing in DOM nodes. Unless I am mistaken.
>>
>> On Jul 22, 4:33 pm, Brandon Aaron <
brandon.aa...@gmail.com> wrote:
>>
>>> I think it should just stop at the "context" of the jQuery object. So
>>> you'd do this instead:
>>>
>>> $("table").bind("click", function( event ) {
>>> var $td = $(event.target, this).closest("td");
>>>
>>> });
>>>
>>> --
>>> Brandon Aaron
>>>
>>> On Wed, Jul 22, 2009 at 1:07 PM, mike.helgeson<
mike.helge...@gmail.com>