because ui.panel is a dom element, and you are searching for "a" within
ui.panel. panel isn't a class name for a "ui" element, it's the node
reference.
If it were $("a, ui.panel") it would be what you described with the
comma. The quotes are around the selector, and the comma means a second
parameter.
Regards
Peter
Jeff Chan 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 [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-ui?hl=en
-~----------~----~----~----~------~----~------~--~---