开发者

jQuery UI Tabs AJAX link with anchor

开发者 https://www.devze.com 2023-04-07 09:31 出处:网络
I am trying to implement something quite simple, I want t开发者_StackOverflowo have a tab menu, with submenu as anchor in tabs, let say :

I am trying to implement something quite simple, I want t开发者_StackOverflowo have a tab menu, with submenu as anchor in tabs, let say :

<div id="tabs">
  <ul>
    <li><a href="file1.html">Nunc tincidunt</a>
    <ul>
      <li><a href="file1.html#anchor1">Et perditur</a></li>             
      <li><a href="file1.html#anchor2">Proin elit arcu</a></li>
    </li>
    <li><a href="file2.html">Proin dolor</a></li>
    <li><a href="file3.html">Aenean lacinia</a></li>
  </ul>
</div>

I can easily switch tabs on the top level , but any attempts to access the file#anchor link failed, the best I could do was to actually open the right tab, but not go to the anchor.

Any hint ? Working example ?


Take a look at this answer https://stackoverflow.com/a/3330919/1285020

Here's an example using jquery address plugin http://www.asual.com/jquery/address/samples/tabs/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号