Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Multiple pages, same slider, need different start panel

  • This topic is empty.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #193609
    denisec
    Participant

    Hi! 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.

    #193610
    Paulie_D
    Moderator

    Without seeing the JS it’s hard to comment,

    #193817
    denisec
    Participant

    Sorry 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.

    #193818
    Paulie_D
    Moderator

    Use Codepen…the forum software really hates JS being shown.

    #193830
    denisec
    Participant

    Well 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.

    #193831
    denisec
    Participant

    Sorry 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.

    #193835
    Paulie_D
    Moderator

    Try this, it’s a semi-working Codepen with all the scripts linked. it starts on Panel 3

    http://codepen.io/Paulie-D/pen/YPVRBQ

    #193838
    denisec
    Participant

    I 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.

    #193840
    Paulie_D
    Moderator

    Well 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.

    #193843
    denisec
    Participant

    I 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

    #193852
    Paulie_D
    Moderator

    I doubt if my knowledge is much greater than yours.

    Perhaps we can find someone more versed.

    #193857
    denisec
    Participant

    Well 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.

    #194027
    denisec
    Participant

    I 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.

    #194055
    Paulie_D
    Moderator

    Excellent, working it for yourself leads to many an “AHA” moment..glad you got it sorted.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.