Solved

Jquery Tabs plugin current version 1.9.3 - Make tab use a web page link

Posted on 2013-01-14
1
444 Views
Last Modified: 2013-01-14
I had this working in 1.7 version and now it is not.  I am hoping someone could help me out in how I get this done.

Basically I want to have all my tabs point to live web page links (not hidden panels)

below is how my old code works... Basically the Selected part of the tab is alwyas dynamically set.  Whatever that is set too the tab will match.  So I make the selected Tab href ="#<Name>" and then the other tabs href are actual links to webpages.

My links are valid I have cut and pasted them into abother browser window and they do work.

But every time I click on a tab which has a page link it now gives the url with "/undefined" added to the end.

So for example www.me.com/admin/undefined which isn't correct.

        <script type="text/javascript">
        $(function () {
        	// Tabs
            $("#tabs").tabs({
                select: function (event, ui) {
                    try {
                        window.location = $.data(ui.tab, 'href.tabs');
                    }
                    catch (err) {
                    //just ignore it.  For now..
                    }
                    return false;
                }
                , selected: 0
            });
 
        });
    </script>
<div id="tabs">
     <UL>
         <LI><a href="#details">Details</LI>
         <LI><a href="charges.aspx">Charges</LI>
         <LI><a href="History.aspx">History</LI>
     </UL>

</div>

Open in new window



How can I get this to work... I am under a crunch... otherwise I would go through and figure it out...

Any help is greatly appreciated :)
0
Comment
Question by:angelalaw
1 Comment
 

Accepted Solution

by:
angelalaw earned 0 total points
ID: 38776978
For those who might be looking I figured it out...

window.location = $.data(ui.tab, 'href.tabs');

Changes to
window.location = ui.tab.href;

That will work, or at least it does now for me...
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
The viewer will learn how to count occurrences of each item in an array.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now