デフォルトでタブを表示しようとしているタブ付きのVertical jScrollPaneを成功裏に実装しました。
ID #default のリンクのクリックをシミュレートすることでこれを行うことはできますか? もしそうなら、どのように?
コードはそのサイトのものと同じです。これがJavaScriptです:
$(function()
{
// Create the "tabs"
$('.tabs').each(
function()
{
var currentTab, ul = $(this);
$(this).find('a').each(
function(i)
{
var a = $(this).bind(
'click',
function()
{
if (currentTab) {
ul.find('a.active').removeClass('active');
$(currentTab).hide();
}
currentTab = $(this).addClass('active')
.attr('href');
$(currentTab).show().jScrollPane();
return false;
}
);
$(a.attr('href')).hide();
}
);
}
);
});
htmlコードは次のとおりです。
<ul class="tabs">
<li><a href="#pane1" id="default">Pane 1</a></li>
<li><a href="#pane2">Pane 2</a></li>
<li><a href="#pane3">Pane 3</a></li>
</ul>
ありがとうございました!