Thanks for writing this for me but that's not what I'm trying to do. Please
see the above-posted comment with regard to automatically scrolling up and
selecting the specified tab. Thanks



Clayton Dukes wrote:
> 
> If you want to switch to the tab by name, try this:
> 
> // Usage: getIndexForId("#tabs", "MyTabName" )
> function getIndexForId( tabsDivId, searchedId )
> {
>         var index = -1;
>         var i = 0, els = $(tabsDivId).find("a");
>         var l = els.length, e;
> 
>         while ( i < l && index == -1 )
>         {
>                 e = els[i];
> 
>                 if ( searchedId == $(e).attr('href') )
>                 {
>                         index = i;
>                 }
>                 i++;
>         };
> 
>         return index;
> }
> 
> var index = getIndexForId('#tabs', '#MyTabName');
> $("#tabs").tabs("select",index);
> 
> On Sat, Jan 9, 2010 at 10:25 PM, Steven Black <ste...@stevenblack.com>
> wrote:
>> See the selected option in the docs.  It looks something like this to
>> programmatically select, say, the third-tab.
>>
>>   $('#tabs').tabs('option', 'selected', 2)
>>
>> http://jqueryui.com/demos/tabs/#option-selected
>>
>> **--**  Steve
>>
>>
>> On Jan 9, 8:22 pm, chrisbeaman <chris.bea...@gmail.com> wrote:
>>> Well, sure, that gets me to a place above the tabs, but I want to be
>>> able to
>>> switch the tab too. I've tried doing  #foo/#tab4 Go to foo and switch to
>>> tab
>>> 4  but it doesn't work.
>>>
>>>
>>>
>>> Steven Black-2 wrote:
>>>
>>> > Did you know.... you can use an HTML element's ID as an a target?
>>>
>>> > <div id="foo">
>>> >  ---
>>> > </div>
>>>
>>> > Then, elsewhere...
>>>
>>> >  #foo Go to foo
>>>
>>> > Specify the ID of your tabs, or something just above that.
>>>
>>> > **--**  Steve
>>>
>>> > On Jan 9, 8:58 am, chrisbeaman <chris.bea...@gmail.com> wrote:
>>> >> Hi, I'm working with the Tabs plugin and have it so that my tabs work
>>> >> fine,
>>> >> and I can click an external text link to control my tabs. The problem
>>> is
>>> >> that these external links (in my footer) are far below where my
>>> tabbed
>>> >> content is.
>>>
>>> >> Does anyone know how I can anchor up to my tabs nav AND change my
>>> tabs at
>>> >> the same time? Ideally I'd like to be able to link to the tabs nav
>>> from
>>> >> another page as well.
>>> >> --
>>> >> View this message in
>>> >>
>>> context:http://old.nabble.com/Anchoring-and-jumping-to-a-Tab-tp27088961s27240...
>>> >> Sent from the jQuery UI Discussion mailing list archive at
>>> Nabble.com.
>>>
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups
>>> > "jQuery UI" group.
>>> > To post to this group, send email to jquery...@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.
>>>
>>> --
>>> View this message in
>>> context:http://old.nabble.com/Anchoring-and-jumping-to-a-Tab-tp27088961s27240...
>>> Sent from the jQuery UI Discussion mailing list archive at Nabble.com.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "jQuery UI" group.
>> To post to this group, send email to jquery...@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.
>>
>>
>>
>>
> 
> 
> 
> -- 
> ______________________________________________________________
> 
> Clayton Dukes
> ______________________________________________________________
> 
> -- 
> You received this message because you are subscribed to the Google Groups
> "jQuery UI" group.
> To post to this group, send email to jquery...@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.
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Anchoring-and-jumping-to-a-Tab-tp27088961s27240p27095403.html
Sent from the jQuery UI Discussion mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery...@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