On 5 Jan., 23:35, "Matt Quackenbush" <[EMAIL PROTECTED]> wrote: > I'm using the Tabs plugin, and have a question. > > <ul> > <li><a href="#tab-1"><span>My First Tab</span></a></li> > <li><a href="#tab-2"><span>My Second Tab</span></a></li> > <li><a href="http://www.someothersite.com/"><span>My Third > Tab</span></a></li> > </ul> > <div id="tab-1"> > // my content > </div> > <div id="tab-2"> > // my other content > </div> > > Is it possible to get that third tab to actually go to the off-site URL when > clicked? I tried this, but the link was ignored, so I'm not sure if I've > done something wrong, or if it's just not possible as written. > > Thanks in advance. > > Matt
Hi Matt, currently external tabs like that are not supported. So far I was reluctant to implement that 1. to avoid bloat and 2. to me that seems unexpected behavior to have a tab open in a new window (inconsistency), more on this here: http://www.useit.com/alertbox/tabs.html Although I already nearly finished to implement that for the official tabs extensions. For now you can try something like the following: $('#your-tabs').tabs({ click: function(tab) { var href = $.data(tab, 'href'); if (/someothersite/.test(href)) { location.href = href; return false; } } }); If the click handler returns false the tab switch won't happen, that's the trick. I'll find a way to handle external links properly. --Klaus