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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:26:46+00:00 2026-05-25T02:26:46+00:00

I have a slideshow, its only changing photos. Now I need to add a

  • 0

I have a slideshow, its only changing photos. Now I need to add a new different div box on top of each photo. At the moment jquery code takes just #slideshow and .active. How to amend it to grab also new different “.newbox” (.newbox1 for first photo, .newbox2 for second and so on). This is my photo slideshow jquery code:

function slideSwitch() {
    var $active = $('#slideshow DIV.active');

    if ( $active.length == 0 ) $active = $('#slideshow DIV:last');

    // use this to pull the divs in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow DIV:first');

    // uncomment below to pull the divs randomly
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 5000 );
});

</script>

My html:

div id="slideshow">
   <div class="active">
        <a href="http://www.mylink.com/" target="_blank"><img src="http://route/img.jpg" alt="alt" /></a>

    <div class="newbox"><h4><a href="/href">WTF?!</a></h4><p>something</p><a class="bttn action" href="/shop/what-the-at-taz">Buy Now</a> <a class="bttn" href="/shop/explore?designer=211">See More</a></div>
    </div>
  • 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-25T02:26:47+00:00Added an answer on May 25, 2026 at 2:26 am

    use $active.children('.newbox').text('write your text here');

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

Sidebar

Related Questions

I have a slideshow, its only changing photos. I need to add a new
I have to show slideshow of images. But at one moment I know only
I have an image slideshow with navigation, with which I want to add an
Right now, we have a slideshow of images that uses javascript. However, when the
I have created a slideshow using jquery easyslider. But its not happening. I am
I want to create a slideshow using jquery. But i have different size of
I have a slideshow with divs for Previous and Next buttons. Inside the div
hi i have a slideshow i created with jquery and jquery cyle its working
I have an image slideshow that works, but I need to make it so
I'm wondering how I could have a JavaScript image rotator/slideshow, that each time it

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.