But sometimes you’d like to change the current slide of the slider from outside of it. When clicking on a shortcut to a certain slide containing more information, for example.
I have found solutions that make use of the ‘start’-property when creating the slider where the click of the button’s event is registered to change to a slide. This is done then because the context of the Flexslider is available. But I’ve found it doesn’t always do the trick and it’s also a bit confusing.
However, this doesn’t seem to work every time (or at least not in the project I was using it in). After some tinkering and searching and trying out solutions, I think I’ve found a more straight forward and simpler way of tackling this problem. When the click event is happening for the link, you can just as easily request the context of the slider from the element.
Much easier to read and a more logic place of action to my feelings.