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 8575331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:40:12+00:00 2026-06-11T19:40:12+00:00

I have a jQuery cycle slider working fine, but the pager I need split

  • 0

I have a jQuery cycle slider working fine, but the pager I need split into different places. The paging itself works, but the active slide is the same for each div – i.e. for the first slide, the first pager in each div will show as active. I’m having a hard figuring out how to solve this problem!

An example of what I’m trying to achieve is the paging of this site http://www.cote-carmes.com/en-en/rooms.php.

The idea of the markup is as follows:

<div id="home-content">
<div class="home-sub first">
   <ul class="slide-nav">
      <li><a href="#">Link</a></li>
      <li><a href="#">Link</a></li>
      <li><a href="#">Link</a></li>
   </ul>
</div>

<div class="home-sub">
   <ul class="slide-nav">
      <li><a href="#">Link</a></li>
      <li><a href="#">Link</a></li>
      <li><a href="#">Link</a></li>
   </ul>
</div>

<div class="home-sub">
   <ul class="slide-nav">
      <li><a href="#">Link</a></li>
      <li><a href="#">Link</a></li>
      <li><a href="#">Link</a></li>
   </ul>
</div>
</div>

And the jQuery I have as follows:

$('#home-slider').cycle({
        pager:  '#home-content ul', 
        pagerAnchorBuilder: function(idx, slide) { 
            // return selector string for existing anchor 
            return '#home-content li:eq(' + idx + ') a'; 
        }

    });

Please help!

  • 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-06-11T19:40:13+00:00Added an answer on June 11, 2026 at 7:40 pm

    Chris,

    I think I cracked it.

    See this demo based on jquery.malsup.com/cycle/pager3.html.

    This is what I did:

    • Split the pager ul into two separate uls
    • Modified the pagerAnchorBuilder option in the .cycle() call as below to make only the first link in each ul an active pager.
    • Added some css to give the anchor borders in the two uls different colors (just to indicate the different uls) and to give the active pager links a mouseover effect.

    Javascript:

    $('#slideshow').cycle({
        fx:     'turnDown',
        speed:  'fast',
        timeout: 0,
        pager:  '#nav',
        pagerAnchorBuilder: function(idx, slide) {
            var selector = '#nav li:eq(' + (idx) + ')';//li selector
            var $li = $(selector).filter(function() {
                return $(this).index() == 0;//accept only the first li in its ul
            });
            if( $li.length > 0 ) {
                $li.find('a').addClass('pager');
                return selector + ' a';//anchor selector
            }
        }
    });
    

    This may not be exactly what you want but it should give you a way ahead.

    EDIT

    Starting with your fiddle, I ended up with this :

    $('#home-slider').cycle({
        pager: '#home-content',
        pagerAnchorBuilder: function(idx, slide) {
            return '#home-content li:eq(' + idx + ') a';
        },
        updateActivePagerLink: function(containerID, idx, cl) {
            $lis = $('#home-content li').removeClass(cl).eq(idx).addClass(cl);
        }
    });
    

    NOTES :

    • In the HTML, <div class="home-sub"> wrappers removed – unnecessary.
    • cycle pager option changed from pager: '#home-content ul' to pager: '#home-content'
    • cycle updateActivePagerLink option added – to give a custom highlight effect

    DEMO

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

Sidebar

Related Questions

I've added a pager to my Jquery Cycle, and things are working fine. I'd
I'm using jquery cycle plugin with WP theme and working fine, but i can't
I have a jquery cycle slider that I need to pause either when a
I have implemented the Jquery cycle plugin on my page but I can't get
I have a pager for jQuery cycle, which I want to rotate on the
I'm using jquery Cycle to create a featured content slider. In my pager I
I have a working cycle script with 6 slides, with the pager fitting perfectly
I have a working jQuery script that will cycle through some images. However, when
I'm using the jQuery Cycle plugin for a slider - I need to make
I currently have jquery Cycle running on a page, but not only find it

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.