Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6673619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:38:56+00:00 2026-05-26T03:38:56+00:00

I’m trying to make a slider with jQuery Cycle where, when you click on

  • 0

I’m trying to make a slider with jQuery Cycle where, when you click on one of 5 thumbnails, you switch to the right slide in the slider. Those thumbs are external to the slider.

Thing is, for some reason, the startingSlide argument doesn’t work and just doing .cycle(number) doesn’t either, even if the slider is clearly running. Here’s a peek at the code:

JS

        jQuery(document).ready(function(){
        var current_slide;
        jQuery('#slider_accueil').cycle({ 
            fx:     'fade',
            timeout: 3000,
            after: onAfter,
            startingSlide: 0,
            pager: '#nav',
            next: '.next_btn_slider',
            prev: '.prev_btn_slider'
        });

        function onAfter(curr,next,opts){
            jQuery('.indicator').removeClass('current')
            current_slide=opts.currSlide + 1
            jQuery('#thumb'+current_slide+' .indicator').addClass('current')
        }

        jQuery('#thumb1').click(function(){
            jQuery('#slider_accueil').cycle(0);
            return false;
        })

        jQuery('#thumb2').click(function(){
            jQuery('#slider_accueil').cycle(1); 
            return false;
        })

        jQuery('#thumb3').click(function(){
            jQuery('#slider_accueil').cycle(2); 
            return false;
        })

        jQuery('#thumb4').click(function(){
            jQuery('#slider_accueil').cycle(3); 
            return false;
        })

        jQuery('#thumb5').click(function(){
            jQuery('#slider_accueil').cycle(4); 
            return false;
        })
    })

html

<div id="sliderAccueil">
            <div id="nav" style="display:none;"></div>
            <img src="/wp-content/themes/customtheme/images/slider_previous.png" class="prev_btn_slider">
            <img src="/wp-content/themes/customtheme/images/slider_next.png" class="next_btn_slider">
            <div id="slider_accueil" style="position: relative;">
                                    <div style="position: absolute; top: 0px; left: 0px; z-index: 5; opacity: 0; display: none;">
                    <img src="/wp-content/uploads/2011/09/slider1.jpg">
                    <div>
                        <div class="maintext">
                            <h2>Slide 1</h2>
                            <p>Slide 1</p>
                        </div>
                        <div class="link">
                            <b href="/"></a>
                            <b class="call_slide" href="/"><ig src="/wp-content/themes/customtheme/images/call_slider.png"></a>
                        </div>
                    </div>
                </div>
                                    <div style="position: absolute; top: 0px; left: 0px; z-index: 4; display: none; opacity: 0;">
                    <ig src="/wp-content/uploads/2011/09/slider2.jpg">
                    <div>
                        <div class="maintext">
                            <h2>Slide 2</h2>
                            <p>Slide 2</p>
                        </div>
                        <div class="link">
                            <b href="/"></a>
                            <b class="call_slide" href="/"><img src="/wp-content/themes/customtheme/images/call_slider.png"></a>
                        </div>
                    </div>
                </div>
                                    <div style="position: absolute; top: 0px; left: 0px; z-index: 3; display: block; opacity: 0.942616;">
                    <img src="/wp-content/uploads/2011/09/slider3.jpg">
                    <div>
                        <div class="maintext">
                            <h2>Reprise des travaux majeurs</h2>
                            <p>Slide 3</p>
                        </div>
                        <div class="link">
                            <b href="/"></a>
                            <b class="call_slide" href="/"><img src="/wp-content/themes/customtheme/images/call_slider.png"></a>
                        </div>
                    </div>
                </div>
                                    <div style="position: absolute; top: 0px; left: 0px; z-index: 2; display: block; opacity: 0.0573843;">
                    <img src="/wp-content/uploads/2011/09/slider4.jpg">
                    <div>
                        <div class="maintext">
                            <h2>Slide 4</h2>
                            <p>Slide 4</p>
                        </div>
                        <div class="link">
                            <b href="/"></a>
                            <b class="call_slide" href="/"><img src="/wp-content/themes/customtheme/images/call_slider.png"></a>
                        </div>
                    </div>
                </div>
                                    <div style="position: absolute; top: 0px; left: 0px; z-index: 1; display: none; opacity: 0;">
                    <img src="/wp-content/uploads/2011/09/slider5.jpg">
                    <div>
                        <div class="maintext">
                            <h2>Slide 5</h2>
                            <p>Slide 5</p>
                        </div>
                        <div class="link">
                            <b href="/"></a>
                            <b class="call_slide" href="/"><img src="/wp-content/themes/customtheme/images/call_slider.png"></a>
                        </div>
                    </div>
                </div>
                                </div>
            <div id="thumbnails_slider_accueil">
                <ul>
                                                                    <li>
                        <b id="thumb1" href="#1">
                            <div class="indicator"></div>
                            <div style="background-image:url(/wp-content/uploads/2011/09/thumb1.png)" class="thumbnail">
                                <p>Voies retranchées trains ajoutés</p>
                            </div>
                            <div class="clear"></div>
                                                        </a>
                    </li>
                                            <li>
                        <b id="thumb2" href="#2">
                            <div class="indicator"></div>
                            <div style="background-image:url(/wp-content/uploads/2011/09/thumb2.jpg)" class="thumbnail">
                                <p>Événements</p>
                            </div>
                            <div class="clear"></div>
                                                        </a>
                    </li>
                                            <li>
                        <b id="thumb3" href="#3">
                            <div class="indicator current"></div>
                            <div style="background-image:url(/wp-content/uploads/2011/09/thumb3.jpg)" class="thumbnail">
                                <p></p>
                            </div>
                            <div class="clear"></div>
                                                        </a>
                    </li>
                                            <li>
                        <b id="thumb4" href="#4">
                            <div class="indicator"></div>
                            <div style="background-image:url(/wp-content/uploads/2011/09/thumb4.jpg)" class="thumbnail">
                                <p>Appels d'offres</p>
                            </div>
                            <div class="clear"></div>
                                                        </a>
                    </li>
                                            <li>
                        <b id="thumb5" href="#5">
                            <div class="indicator"></div>
                            <div style="background-image:url(/wp-content/uploads/2011/09/thumb5.jpg)" class="thumbnail">
                                <p>Environnement</p>
                            </div>
                            <div class="clear"></div>
                                                        </a>
                    </li>
                                        </ul>
            </div>
            <div class="clear"></div>
        </div>

^check source, seems I cant put that cleaner than this.

Anybody have an idea?

PS, It’s on purpose that all img are ig and all links are … Stackoverflow wouldn’t let me post.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:38:56+00:00Added an answer on May 26, 2026 at 3:38 am

    I found the answer to my own question…

    Seems that to use jQuery(‘#slider_accueil’).cycle(0); you need to have the full version linked, and not the lite.

    Seems like that function is one of those who have been taken out from the conversion from full to lite… Note to self: The lite versions may not have the function you want to do… just spent 2 hours trying all kinds of stuff on that. :p

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.