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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:13:12+00:00 2026-06-01T09:13:12+00:00

I am using a NivoSlider in one of my projects, this specific client has

  • 0

I am using a NivoSlider in one of my projects, this specific client has asked for the active thumbnail image to change based on the slide being shown. I have looked through the documentation and can’t find anything about changing the image itself, therefore I think the best option is to change the image itself with a Jquery function. Despite that, I’m stuck on how to achieve this.

The NivoSlider creates this HTML:

<div class="nivo-controlNav">
    // Active Thumbnail Link
    <a class="nivo-control active" rel="0">
        <img alt="" src="images/inactive_wedge.png">
    </a>
    // Inactive Thumbnail Link
    <a class="nivo-control" rel="1">
        <img alt="" src="images/inactive_wedge.png">
    </a>
</div>

The plugin adds a class of active to the <a> for the image slide that is showing.

I’m trying to change the containing <img> source attribute to display ‘active_wedge.png’ when the active class is applied to the <a> tag.

How would I achieve this with Jquery? (it’s times like this that I realise how little I know!)

I’ve tried something along these lines:

if ($('.nivo-control').hasClass('active')) {
    // Not really sure what to put here at all
}

Is this correct, or am I approaching this badly?

Thanks in advance.

Additional JS:

$(window).load(function() {
    $('#theslides').nivoSlider({
        effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
        animSpeed: 500, // Slide transition speed
        pauseTime: 3500, // How long each slide will show
        startSlide: 0, // Set starting Slide (0 index)
        directionNav: false, // Next & Prev navigation
        directionNavHide: true, // Only show on hover
        controlNav: true, // 1,2,3... navigation
        controlNavThumbs: true, // Use thumbnails for Control Nav
        controlNavThumbsFromRel: true, // Use image rel for thumbs
        keyboardNav: false, // Use left & right arrows
        pauseOnHover: true, // Stop animation while hovering
        beforeChange: function(){}, // Triggers before a slide transition
        afterChange: function(){
            // Putting code to change the thumbnail image in here
            if ($('.nivo-control').hasClass('active')) {
                $('.nivo-control .active img').attr('src','images/active_wedge.png');
            }
        }, // Triggers after a slide transition
        slideshowEnd: function(){}, // Triggers after all slides have been shown
        lastSlide: function(){}, // Triggers when last slide is shown
        afterLoad: function(){} // Triggers when slider has loaded
    });
});
  • 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-01T09:13:14+00:00Added an answer on June 1, 2026 at 9:13 am

    without using if hasclass just:

       $('.nivo-control.active img').attr('src','images/active_wedge.png')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using nivoslider for my webpage. The images look overflow one by one
I am using a Nivo Slider based image slideshow module for Joomla CMS, version
I'm using the excellent Nivoslider plugin to showcase a set of photos on my
using the jquery ui modal dialog , the background shades grey (i assuming this
Using Browserlab, it appears that the background image is not centred in Firefox7 for
Using Ivy with this Ant target: <target name=retrieve-jars> <ivy:retrieve pattern=WebContent/WEB-INF/lib/[artifact].[ext] /> </target> to fetch
Using android 2.3.3, I have a background Service which has a socket connection. There's
I was wondering if anyone who has had experience using the Jquery Nivo Slider
I'm using NivoSlider and I'm not really good on using javascript so I was
Using Xcode4.2.1, with a basic PhoneGap template based app. (I say template, but I

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.