I’m currently using the slidesjs.com slider and I’m wanting to make it so when I click a link outside the slider it slides to the current slide e.g. click slide one link (#1) and it slides to slide one (#1) within the slider. Here is my coding any help would be much appreciated.
$(function(){
// Set starting slide to 1
var startSlide = 1;
// Get slide number if it exists
if (window.location.hash) {
startSlide = window.location.hash.replace('#','');
}
// Initialize Slides
$('#passion_slider').slides({
autoHeight: true,
// Get the starting slide
start: startSlide,
animationComplete: function(current){
// Set the slide number as a hash
window.location.hash = '#' + current;
}
});
});
Add to ready event. Use target var for destination.
Solution for specific task!!!
Adding click trigger to links for direct showing specific slide: