Jquery Tabs - Using External URL link

坚强是说给别人听的谎言 提交于 2019-12-11 01:57:23

问题


I'm using the Jquery UI Tabs, and have a question.

<div id="ui-tabs">
    <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>

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.


回答1:


It's not pretty but this works

    <li><a href="#tabs-3"><a href="http://espn.com">ESPN</a></a></li>

Sample is here http://codepen.io/martypowell/pen/leGaz



来源:https://stackoverflow.com/questions/13980268/jquery-tabs-using-external-url-link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!