Navigate to a slide with the url

With this code, you will be able to go to a page, where is a slider, and make that slider go to a specific slide depending on the link. Go to the Edit Slider -> HTML widget, and paste this code in there, just replace the 100063 with your slider’s id:

<script>
njQuery(document).ready(function(){
	function getUrlVars() {
		var vars = {};
		var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
			vars[key] = value;
		});
		return vars;
	}
	var go_to_slide_number = getUrlVars()["slide"];
	if (typeof go_to_slide_number !== 'undefined') {
		var slider = njQuery('#nextend-smart-slider-100063');
		slider.smartslider('onInit', function(){
			slider.smartslider('goto', parseInt(go_to_slide_number));
		});
	}
});
</script>

After this you can make the slider to go to a specific slide, if you put a ?slide=1, or other number into the end of your link. This code will get out this number, and when your page loads, the slider will switch to that slide. For example if your slider is here: http://example.com/home/ , then with this link, you can make it go to the 2nd slide: http://example.com/home/?slide=1

You could hide your slider until it goes to that slide. Just you have to change the setTimeout’s delay ( 600) to the time, your slider needs to switch there. Here is the whole code:

<script>
njQuery(document).ready(function(){
	function getUrlVars() {
		var vars = {};
		var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
			vars[key] = value;
		});
		return vars;
	}
	var go_to_slide_number = getUrlVars()["slide"];
	if (typeof go_to_slide_number !== 'undefined') {
		var slider = njQuery('#nextend-smart-slider-100063');
		slider.css('opacity',0);
		setTimeout(function(){
			slider.animate({'opacity':1},500);
		},600);
		slider.smartslider('onInit', function(){
			slider.smartslider('goto', parseInt(go_to_slide_number));
		});
	}
});
</script>