0

このサイト「http://lopatin.github.com/sliderTabs/」からこの jquery SliderTabs を試しています。すべて正常に動作します。外部リンクを使用して特定のタブに移動する際に問題が発生しています。ここに私の次のコードがあります:

<script>
$(function(){
 $('#customers').sliderTabs();  

if(document.location.hash!='') {
        //get the index from URL hash
        selectedTab = document.location.hash.substr(1,document.location.hash.length);
        $("#customers").sliderTabs('select', selectTab - 1);
    }

  });
</script>

しかし、それは私にはうまくいかないようです。誰でもこれで私を助けることができますか?

4

1 に答える 1

0

使用できるパブリック関数に関連するプラグインのドキュメントはありません。ソース コードの 230 行目を見ると、jquery-ui タブのように "select" の代わりに "selectTab" のオプションを使用したいようです。https://github.com/lopatin/sliderTabs/blob/master/jquery.sliderTabs.js

$("#customers").sliderTabs("selectTab", selectTab - 1);
于 2012-07-26T22:26:43.197 に答える