$('a', ui.panel) is equivalent to $(ui.panel).find('a') note that only the
'a' is quoted an the ui.panel is a variable

It uses the selector context argument...
http://docs.jquery.com/Core/jQuery#expressioncontext

On Tue, Oct 27, 2009 at 11:21 AM, Jeff Chan <hkjeffc...@gmail.com> wrote:

>
> I'm reading the documentation in jquery ui tabs, it said:
>
> "Hijax" links after tab content has been loaded:
>
> $('#example').tabs({
>    load: function(event, ui) {
>        $('a', ui.panel).click(function() {
>            $(ui.panel).load(this.href);
>            return false;
>        });
>    }
> });
>
> Why "$('a', ui.panel)" is correct? My understanding is that after the
> tag is loaded, the selector will select all 'a' AND the ui.panel
> element to override the click event. Isn't ',' is "Matches the
> combined results of all the specified selectors."? I tried "$
> (ui.panel, 'a')" and it does not work anymore.
>
> I know the demo code is correct but I just can't understand why.
>
> Thanks.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to