Home › Forums › JavaScript › Anythingslider several questions
- This topic is empty.
-
AuthorPosts
-
June 22, 2012 at 5:28 am #38617ic3dMember
Hi all,
I restarted playing with anythingslider andI have a couple of questions that i couldn’t find the answer for on the site. Perhaps you could help me out. I editted your jsFiddle a little so it’s easier to see what i mean.
1. I am using an external menu. Is it possible to use names instead of numbers. So far example
Link 1
will become
Link 1
2. If not possible, would it be possible to change the names in the url, now it looks like #&panel1-2
3. Is it possible to directly link from an external site to for example slide 3 ( #&panel1-3)
4. I am using inFx and outFx. Works excellent, however when i open the site it starts with the outFx and then the inFx on the first slide. Is is possible to just show the inFx the first time on the first slide?
Thanks in advance.
June 22, 2012 at 11:47 am #104748MottieMemberHi ic3d!
I have two demo that show you how to add custom hash tags. This one uses the panel ID and this one links to a header ID inside of a panel. Both of these demos and more can be found on the document home wiki page.
As for the stopping the initial outFX, just set the FX option
stopRepeat
tofalse
. See the FX wiki page for an example of how to add it.June 25, 2012 at 4:24 am #104840ic3dMemberThanks for the help Mottie!
I tried what you did, but i guess I am doing it wrong somehow. Everything is working, but not the external menu with the hashtags. After a couple of hours of trial and error, i don’t know where to search anymore. I created a jsfiddle, perhaps you can see what I’m doing wrong: http://jsfiddle.net/W7eWH/
Also I noticed that in both demo’s the link to the slide from another site doesn’t work. So for example if i type http://fiddle.jshell.net/Mottie/VM8XG/7278/show/#grey it doensn’t go to the right slide.
June 26, 2012 at 9:52 am #104870MottieMemberAhh you’re right, I missed this bit of code in the “onInitialized” callback (updated demo):
// Callback when the plugin finished initializing
onInitialized: function(e, slider) {
if (window.location.hash) {
slider.gotoPage(window.location.hash);
}
slider.$items.find('h6').each(function(){
// add some prefix to the id so setting the hash doesn't
// make the page jump
this.id = "tmp_" + this.id;
});
}, -
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.