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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:28:33+00:00 2026-05-24T08:28:33+00:00

I have 3 cycles per page and they’re all working great with one exception.

  • 0

I have 3 cycles per page and they’re all working great with one exception. Their counters, which display things like “1/3” for 1 of 3 slides all update together. If I advance the first cycle to slide 2, the counters for the other two cycles increment as well so that all three display “2/3”. Here’s my code:

$('.slides').each(function() {
    var $this = $(this), $ss = $this.closest('.slide-container');
    var prev = $ss.find('a.slide-control-previous'), next = $ss.find('a.slide-control-next');
    $this.cycle({
        fx: 'scrollHorz',
        pause: 1,
        prev: prev,
        next: next,
        speed: 1000,
        after: onAfter
    });
});
function onAfter(curr,next,opts) {
    var caption = '<span>' + (opts.currSlide + 1) + '</span>/' + opts.slideCount;
    $('.slide-count').html(caption);
}

The issue is obviously at function onAfter but I can’t seem to find how to pass the cycle container ID from $this.cycle into onAfter. Any ideas?

  • 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-24T08:28:34+00:00Added an answer on May 24, 2026 at 8:28 am

    The accepted answer here on how to find cousin elements helped me find the solution to this problem. In place of $('.slide-count').html(caption); in my code above, this works:

    $(this).closest(':has(.slide-count)').find('.slide-count').html(caption);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say i have 70,000 cycles per second, and i want to get cycles
I have the following situation: A machine takes on average c cycles per instruction
I have a text file with catalog names (one per line) and I need
I have an unweighted directed graph that may or may not have cycles in
I have long cycles of GC. from checks I saw there are too many
I have 3 jquery cycles on my website that I have randomised. The cycles
I have C# code that cycles through .sql files and executes what's inside them
I have a lot of cycles ( indicated by numeric values, for example, 1-2-3-4
I have a couple of projects with different release cycles sitting in my SVN
I have a slider that has a fade-in and fade-out transition. It basically cycles

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.