AnythingSlider 返回面板编号“0”当 jQuery 工具选项卡更改时
我有 jQuery 工具选项卡 并在此选项卡栏的每个窗格中,我放置了一个 AnythingSlider。
一切正常,直到选项卡未更改。如果选项卡更改并更改回 Everythingslider 所在位置,则选择索引为“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',
});
});
});}
查看控制器 Home 的脚本和脚本/操作名称 index
error_message;?> tabs; ?> <!-- 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>
$(函数() { $('#form_kind_alg').validator( { 输入事件:“更改” } ); $("#flowtabs").tabs("#flowpanes > div", { 历史记录: false });
I have jQuery Tools Tabs and in each of the panes of this tab bar, I have placed an AnythingSlider.
Everything works just fine till the tab is not changed. If the tabe is changed and changed back to where the anythingslider was, the slide with index '0' is selected.
I just want the slider to not change when the tabs are swtiched and switched back....
here is my code:
<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',
});
});
});}
View script for controller Home and script/action name index
error_message;?>
tabs; ?>
<!-- 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 });
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试更新到 AnythingSlider 的最新版本:
摘自常见问题解答文档。
Try updating to the latest version of AnythingSlider:
Excerpt from the FAQ documentation.