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 });
Try updating to the latest version of AnythingSlider:
AnythingSlider is starting from the last panel instead of the first. How do I fix it?
Update AnythingSlider to version 1.5.13+ to fix this issue! This problem was happening because older versions of AnythingSlider used
scrollLeft
to position the slides in the view port. When the slider was hidden, as it would be in a popup, in a tab or inside an accordion, thescrollLeft
value could not be set and it defaulted to zero, the position of the last slide clone.
Excerpt from the FAQ documentation.