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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:31:38+00:00 2026-05-27T02:31:38+00:00

I’m working with the Orbit jQuery slider . Tricky thing is that I am

  • 0

I’m working with the Orbit jQuery slider. Tricky thing is that I am running six iterations of that slider on the page. What I want it to do is tell me I am on image 4 of 7, 5 of 7, etc…

Here’s what I’ve done so far:

$(window).load(function() {
    var n = $('#dicks-feature img').size();

    $('#dicks-feature img').each(function(index) { 
        var title = $(this).attr('title');
        var z = $(this).css('z-index');

        function stuff() {
            if (z == 3) {

                $('<p>' + title + 'of' + n + '</p>').appendTo('.count');
            }
        }

        setInterval(stuff,3000);
    });     

});

The HTML:

<div id="dicks" class="item first">
        <div id="dicks-feature" class="feature">
            <img src="img/features/DSG/dicks.jpg" width="711" height="369" alt="Dicks Sporting Goods" title="1"/>
            <img src="img/features/DSG/DSG_Primary_1.jpg" width="711" height="369" alt="Dicks Sporting Goods" title="2" />
            <img src="img/features/DSG/DSG_Primary_3.jpg" width="711" height="369" alt="Dicks Sporting Goods" title="3"  />
            <img src="img/features/DSG/DSG_Primary_4.jpg" width="711" height="369" alt="Dicks Sporting Goods" title="4"  />
            <img src="img/features/DSG/DSG_Primary_5.jpg" width="711" height="369" alt="Dicks Sporting Goods" title="5"  />
            <img src="img/features/DSG/DSG_Primary_6.jpg" width="711" height="369" alt="Dicks Sporting Goods" title="6"  />
            <img src="img/features/DSG/DSG_Primary_7.jpg" width="711" height="369" alt="Dicks Sporting Goods" title="7"  />
        </div><!--/feature-->
        <div class="count">

        </div>
    </div><!--/dicks-->

So what I can manage to get is the overall count of images: x of 7. If I click the slider next button the x never switches. It always stays 1 of 7, 1 of 7, etc…

I’m trying to base this off of a z-index of 3. Orbit assigns that to the img tag when the img is visible. All other images have an index of 1. I’m using the title attribute to give me the 2 of 7, 3 of 7, blah blah.

Any ideas? I am not a JS jedi at all 🙁

Thank you!

  • 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-27T02:31:38+00:00Added an answer on May 27, 2026 at 2:31 am

    When you initialize your orbit slider, there’s an event called afterSlideChange which will be called every time the slide changes.

    It has no arguments, but the image currently being displayed is used as context (this). So you could check it’s index(), and do something like this:

    $(function($) {
        $('.featured').orbit({
            afterSlideChange: function() {
                var currentNum = $(this).index() + 1;
                var count = $(this).closest('.featured').find('img').length;
            }
        });    
    });
    

    How you find where to put the caption is up to what your HTML looks like, but the above should work for finding out the relevant info, every time it changes, in any slideshow.

    Working demo with multiple slideshows.

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace

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.