Get Tab URL

6 views
Skip to first unread message

gilson.gdcweb

unread,
Mar 24, 2009, 8:03:48 PM3/24/09
to jQuery UI Development
How to get the url for a tab?

My Tabs is Ajax:

<div id="tabs">
<ul>
<li><a href="content1.html">Tab1</a></li>
<li><a href="content2.html">Tab2</a></li>
</ul>
</div>

<button onclick="alert(????)"> Tab 1 (or index 0) URL</button>

Thanks!

David Muir

unread,
Mar 24, 2009, 9:27:16 PM3/24/09
to jquery...@googlegroups.com
$('#tabs ul li').eq(0).attr('href');

David

gilson.gdcweb

unread,
Mar 25, 2009, 6:21:43 PM3/25/09
to jQuery UI Development
$('#tabs ul li a').eq(0).attr('href'));

This code request "#ui-tabs-4"

I need to get the value of "load" (url)

Sample setter:
$('#tabs').tabs('url', 0, 'page.php')

Getter ?????

David Muir

unread,
Mar 25, 2009, 8:14:16 PM3/25/09
to jquery...@googlegroups.com
$('#tabs').tabs('url', 0);

These are all questions that can easily be answered by a quick look at the documentation:
http://jqueryui.com/demos/

Cheers,
David

gilson.gdcweb

unread,
Mar 25, 2009, 8:59:44 PM3/25/09
to jQuery UI Development
alert($('#tabs').tabs('url', 0));
// in alert window [object Object]
Reply all
Reply to author
Forward
0 new messages