Home › Forums › JavaScript › Multiple pages, same slider, need different start panel
- This topic is empty.
-
AuthorPosts
-
January 19, 2015 at 10:11 am #193609
denisec
ParticipantHi! I have created a slide show using the #slider2 FX. It is working great. I am using this as a site navigation. I want to use the same slide show but have it start on different panels on each of the pages. I am not sure how to do this. I tried adding a new ul class then doing
startPanel : 2 (or number of the panel I needed),but that does not work.
I am kind of a newbie with javascript. I can alter it for simple stuff but have difficulty beyond that.
I am sure there is a simple solution but so far I cannot figure this one out.
January 19, 2015 at 10:14 am #193610Paulie_D
MemberWithout seeing the JS it’s hard to comment,
January 21, 2015 at 8:20 am #193817denisec
ParticipantSorry for the delay. I keep trying to post the code but the forum will not allow it. Yes I am using back ticks. I will try again.
January 21, 2015 at 8:26 am #193818Paulie_D
MemberUse Codepen…the forum software really hates JS being shown.
January 21, 2015 at 8:43 am #193830denisec
ParticipantWell I have put just the effected code in CodePen (I have never used that before – thank you for directing there neat site). There is other javascript which I will provide the links for below – it is the default ones for AnythingSlider which I have not altered.
Here is the link to my CodePen: http://codepen.io/denisec/pen/JoNevY
I also have the standard Anything Slider javascript uploaded to my server – but I have not altered that code in any way.
January 21, 2015 at 8:47 am #193831denisec
ParticipantSorry here are the javascript links I did not post in CodePen
http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js
http://www.contentandsolutions.com/enerstaff/js/jquery.easing.1.2.js
http://www.contentandsolutions.com/enerstaff/js/jquery.anythingslider.min.js
FYI
The slider is working great- I managed to get the text nav and a logo over the slider (I need to adjust the css for mobile and such ) but just stuck on this one little part.
January 21, 2015 at 9:07 am #193835Paulie_D
MemberTry this, it’s a semi-working Codepen with all the scripts linked. it starts on Panel 3
January 21, 2015 at 9:49 am #193838denisec
ParticipantI will try it in a bit but will this change each page’s starting panel?
For instance – I want the Mechanical page’s Navigation Slider starting panel to be panel 4. I want the EH&S page’s Navigation Slider starting panel to be panel 6. etc etc
That is my goal.
January 21, 2015 at 10:34 am #193840Paulie_D
MemberWell you would probably need different scripts* for different pages and you’d have to set the panel numbers in the JS yourself.
*Or the same script with multiple functions in it that only apply to individual sliders..one per page presumably.
January 21, 2015 at 10:46 am #193843denisec
ParticipantI hate to be a pain…my understanding of javascript is limited… I can alter code when I see an example (I am pretty good at following directions). Could you give me an example of using the same script with multiple functions? Would I need to go in and change the core javascripts? If this is something complicated – let me know I may need to look for outside help.
Denise
January 21, 2015 at 12:14 pm #193852Paulie_D
MemberI doubt if my knowledge is much greater than yours.
Perhaps we can find someone more versed.
January 21, 2015 at 12:40 pm #193857denisec
ParticipantWell I appreciate your help!
Hopefully someone will respond – if not I have a couple of friends to turn to but their rates are really high. Much more than my client is paying me by far.
I will play with it myself tomorrow when I have more time. I had a feeling I may need to just recreate all the scripts as if they were different sliders. I can do that… I was just trying to NOT do that – so time consuming. I will lose money on this one if I am not careful.
January 22, 2015 at 3:52 pm #194027denisec
ParticipantI got it to work. Had to give myself the old “Work the Problem People” (from Apollo 13 movie) speech. All I needed to do was NOT use my WordPress Theme’s “javascript to footer” that I always use – I removed it from there and added the javascript individually on each page using a plugin called: OH Add Script Header Footer Plugin. This allowed me to add a different “startPanel” number on each page. You can do this at function.php level as well – WordPress has some decent “how-tos” for that. I chose to let a plugin do the work for me.
January 23, 2015 at 2:50 am #194055Paulie_D
MemberExcellent, working it for yourself leads to many an “AHA” moment..glad you got it sorted.
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.