Hi guys I am using the Superslide slider for fullscreen slider images. Now i want to to create a website with nearly no text. So by using the main mavigation, it just should change the images in the slider, or jump to a specific image in the slider.
I have tried to use the api.goTo() call in a js function, but it always get me an error,
Cannot GET /linoSlider/showSlideTwo()
and also the posts on the internet didn't help me.
Any ideas how tu jump to a specific image using the supersized slider?
To jump to a specific slide you should use a jquery click action in your menu and the api.goTo() including the image number, you should keep track of the number by yourself.
<a href="#" class="link_class01"><span>Menu Item 1</span></a>
<a href="#" class="link_class02"><span>Menu Item 2</span></a>
$(".link_class01").click(function(){
api.goTo(1);
});
$(".link_class02").click(function(){
api.goTo(2);
});
Try that and see what happens.
Put this in your main html doc. The links will be url/doc.html?num=2
function GetURLParameter(sParam)
{
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++)
{
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == sParam)
{
return sParameterName[1];
}
}
return null;
}
jQuery(function($){
var slideNum = GetURLParameter("num");
var num = 1;
if(slideNum!=null){
if(num > 0) num = slideNum;
}
}
This was such a pain in the a** i hope this helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.