jQuery Toolsタブがあり、このタブバーの各ペインにAnythingSliderを配置しました。
タブが変更されない限り、すべてが正常に機能します。タブが変更され、anythingsliderがあった場所に戻されると、インデックスが「0」のスライドが選択されます。
タブを切り替えて元に戻したときにスライダーが変わらないようにしたいだけです。
これが私のコードです:
<html>... <script>$(function () {
var slider1 = ['Start','Allgemein', 'Fancy', 'Status', 'Medikamente', 'Submit'];
function formatText(index, panel) {
return slider1[index -1];
//alert('hhh)';
}
$(function () {
$('#slider1').anythingSlider({
width : 800, // Override the default CSS width
easing: 'easeInOutExpo',
autoPlay: false,
buildArrows:false,
navigationFormatter : formatText, // Format navigation labels with text
hashTags: false,
startPanel: '1',
});
});
});}
コントローラのホームのスクリプトとスクリプト/アクション名のインデックスを表示する
error_message;?>タブ; ?>
<!-- remove the space between tabs and panes -->
<br clear="all" />
<div id="tabbed-wrap">
<div id="another-div"><?php echo $this->panes; ?></div>
</div>
</div>
$(function(){$('#form_kind_alg')。validator({inputEvent:'change'}); $( "#flowtabs")。tabs( "#flowpanes> div"、{history:false});