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

  • Home
  • SEARCH
  • 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 6883669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:24:42+00:00 2026-05-27T05:24:42+00:00

I currently have a jQuery Slider in progress: http://jsfiddle.net/hQj8a/ $(document).ready(function() { $(‘body’).removeClass(‘no-js’); $(‘#my-carousel-2’).carousel({ itemsPerPage:

  • 0

I currently have a jQuery Slider in progress: http://jsfiddle.net/hQj8a/

    $(document).ready(function() {

        $('body').removeClass('no-js');

        $('#my-carousel-2').carousel({

            itemsPerPage: 3,

            itemsPerTransition: 3,

            speed: 500,

            nextPrevLinks: false

        });

    });

When the user clicks between the pagination (1,2,3) I would like different text to display next to the pagination.
So initially on page load (i.e. state 1) it should say ‘hello’ and clicking 2, it should say ‘hello again’ and 3 it says ‘goodbye’.

Can someone show me how this is possible with my current code? It doesn’t have to “animate” but just switch between the three bits of text depending on the current pagination value.

Many thanks for any pointers with this 🙂

  • 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-27T05:24:43+00:00Added an answer on May 27, 2026 at 5:24 am

    http://jsfiddle.net/hQj8a/5/

    Within jQuery, I added a span to hold the text “Hello” “Hello again” or “Goodbye”. I gave that span an id of “addedText”. Then I added an event listener for the pagination links (found the selector using inspect element in chrome), that looks at the text of clicked links in order to determines which link you clicked. Based on that, fill the addedText appropriately.

    Added jQuery/javascript:

    $('.pagination-links').append("<span id='addedText'>Hello</span>");
    var addedText = document.getElementById('addedText');
    
    $('.pagination-links a').click(function(){
        if (this.innerHTML == '1')
            addedText.innerHTML = "Hello";
        else if (this.innerHTML == '3')
            addedText.innerHTML = "Goodbye";
        else
            addedText.innerHTML = "Hello again";
    });
    

    Added CSS:

    #addedText {
        float: left;
        padding-top: 12px; //copied from .carousel .pagination-links li a
    }
    

    Edit: Added “Hello” to addedText by default, so it displays on page load.

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

Sidebar

Related Questions

I currently have the following code set up for a jQuery slide. $(document).ready(function ()
Currently I have a JQuery script in place http://jsfiddle.net/gaby/zzj7E/5/ which handles the requirement that
I have currently implemented this image slider http://www.dreamcss.com/2009/04/create-beautiful-jquery-sliders.html on a site but for some
I have a jquery based slider on the page. This slider calls a function
currently I am working on an image slider with jquery. I have downloaded the
Is there a better way to do this jquery code? Currently I have to
I have 2 references to jQuery in my master page which is currently configured
I have a fancy web page with lots on JQuery included. Currently i am
I am currently trying to manipulate a unordered list with jQuery, essentially I have
currently I have the a basic jQuery gallery: <ul> <li>IMAGE</li> <li>IMAGE</li> </ul> // with

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.