Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Anything Slider: Issues When Dynamically Modifying Options Re: Anything Slider: Issues When Dynamically Modifying Options

#132470
wis
Member

Hi @Mottie,

I spent a little time figuring out some of the options and what happens when you change them dynamically at run-time.

I created a spreadsheet but I don’t know how to get it to you but here is a summary of what I found:

These definitely have problems:

1) AutoPlay: It doesn’t automatically start autoplay and the controls do not show and hide unless you do the workaround but if you use updateSlider() afterwards it “undoes” the workaround and the controls will not show or hide properly:

The workaround to show/hide the controls is:


var sliderData = jQuery('#Slider').data('AnythingSlider');
sliderData.$startStop.toggle(true);

Also, to start auto play:


sliderData.options.autoPlay = true;
sliderData.startStop(true);

2) enableArrows / buildArrows: this doesn’t show the arrows unless you do the below workaround but even with the workaround if you use updateSlider() afterwards the controls will not show or hide properly.

The workaround is:


var sliderData = jQuery('#wisSW_SampleSlider').data('AnythingSlider');
sliderData.$forward.add(sliderData.$back).toggle(wantNavigationArrows);

3) enableNavigation / buildNavigation: this doesn’t show the slide navigation tabs unless you do the below workaround with one caveat, if you have more slides than the maximum number of tabs being shown and the left and right arrows show to allow you to go beyond the bounds of the visible tabs, the arrows never hide even if the tabs are hidden.

And, like above, the the controls don’t show or hide properly if updateSlider() is used.

The workaround is:


var sliderData = jQuery('#wisSW_SampleSlider').data('AnythingSlider');
sliderData.$nav.toggle(wantSlideNumbers);

To hide the << and >> buttons next to the slide number you must do this:


jQuery('.anythingControls ul').hide();

4) mode: this only seems to work for horizontal. Fade every now and then appears to work but if you go to the start or end then all content disappears. Also, if you change to fade or vertical and then back to horizontal, even horizontal stops working.

5) navigationSize: this works but you must use updateSlider() after updating navigationSize otherwise controls will not show up correctly.

6) animationTime, easing, hashTags, delay, and delayBeforeAnimate: appear to work correctly in my minimal testing

7) top, bottom, left, and right transitions: appears to work but you must specify the “distance” parameter or it doesn’t.

8) fade transition: it works but you must not have easing, distance or size or all content in the slider disappears.

9) expand, grow, listLR, and listRL transitions: appear to work but if you then change it to, at least, top, bottom, left and right (I didn’t check the other 3) it messes up the content; i may or may not have something to do with the distance as I saw some weird things related to it and the transitions.

10) caption-top, caption-right, caption-bottom, and caption-left: works but these things are true (mostly you’ve documented this but I verified it): you must define the container initially; there may be problems if port view changes; each caption must be in separate div and must have the transition size defined.

I did try having all captions in one slider and that didn’t work (don’t know if it’s supposed to) but haven’t tried just having 2 or 3 captions in a single slider.

Hope that helps you and others, also if you have any fixes and workarounds (or corrections to my workarounds I’d love to hear about them) and anything else I find out I’ll let you know.