Slider Index Count Example (ie: Slide 1 of 10)

kevin's Avatar

kevin

07 Sep, 2012 09:14 PM

Hi, I have tried everything to get a slide index count working using the code provided in the knowledge base. Unfortunately my Javascript skills are weak and I just can't get it working. Having a slide count is mission critical for the site I am building and I would rather not use Nivo or some other slider.

Can anyone provide a working example of the code outlined in the Knowledge base? Or provide better javascript-newbie instructions on how and where the various code gets placed?

I would be tremendously grateful! Thank you!

  1. Support Staff 1 Posted by Dmitry Semenov on 10 Sep, 2012 04:59 AM

    Dmitry Semenov's Avatar

    Hi,

    All you need is to put these three blocks of code in document.ready() http://help.dimsemenov.com/kb/royalslider-javascript-api/creating-s...

    If you don't understand this code, you probably should hire someone, as you may create mistakes.

    Dmitry

  2. 2 Posted by Alain Picard on 12 Jun, 2015 05:04 AM

    Alain Picard's Avatar

    Hi,
    How about if we want it to an existing DIV?
    I want to display the counter to this specific DIV : rsGCaption

    Thank you.

  3. Support Staff 3 Posted by Dmitry Semenov on 12 Jun, 2015 05:29 AM

    Dmitry Semenov's Avatar

    @Alain, global caption can contain any HTML content http://dimsemenov.com/plugins/royal-slider/documentation/#global-ca...

    Or you can wrap rsGCaption element with another one, and append counter inside it. Just make sure that you do this after slider is initialized.

  4. 4 Posted by faustogabiou on 07 Jul, 2016 11:46 AM

    faustogabiou's Avatar

    Hi,

    I tried the WP version code, but the counter appeared outside the slider. How can I change it's position?

    Thanks!

  5. Support Staff 5 Posted by Dmitry Semenov on 07 Jul, 2016 03:32 PM

    Dmitry Semenov's Avatar

    Hi,

    You may style the element via CSS, e.g.:

    .rsSlideCount {
      position: absolute;
      left: 20px;
      bottom: 20px;
    }
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac