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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:06:07+00:00 2026-06-12T08:06:07+00:00

since hours i try to build my own slideshow to play around with some

  • 0

since hours i try to build my own slideshow to play around with some javascript.

i have an object $pic with all the images of my site. Thats no problem so far. My images are shown on my site as thumbs.

Now when i click .rightslide button, the script gets the next and previous image of the current image due to the slidenavi() function. That works also. But it doesn’t deep copy the object that slidenavi() function returns, so that the image that should instead be copied is taken away…so no copy at all!

What can I do?

    function slidenavi(image_src){
        $nextpic_index="";
        $prevpic_index="";
        $nextpic="";
        $prevpic="";

        $pics.each(function (index) {
            if (this.src== image_src){
                $nextpic_index=index+1;
                $prevpic_index=index-1;
            } 
        })
        nextpic=$pics.eq($nextpic_index);
        prevpic=$pics.eq($prevpic_index);
        img = {
            prev:prevpic,
            next:nextpic
        };

        return img
    }

    $('.rightslide').click(function(){
        var slidenaviobject=slidenavi($(this).parent().siblings('img').attr('src'));
        var copyimage = jQuery.extend(true, {}, slidenaviobject);
        console.log(copyimage.next);
        $('.slideshow-wrapper').append(copyimage.next);        

    }) 
  • 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-12T08:06:08+00:00Added an answer on June 12, 2026 at 8:06 am

    nextpic is a reference to a (jQuery-wrapped) DOM node. You will have to .clone() the DOM node when you append it.

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

Sidebar

Related Questions

I've been battling with this bug for 3 hours. I have checked the build
since hours I try to solve the following error from the paypal Instant Update
i'm working since hours on this issue without any success, hope to get some
I am sitting here since 2 hours to find a solution for my problem.
Here is the code that cause me problem since few hours: TabItem newTab =
I am investigating since a few hours the best way to use the Email
Since now I have only used plugin for editing and the way I use
I am trying to figure out this error since 5 hours without any success.
I'm struggling since a few hours with this design question. In Cocoa for example,
I have an assignment and after hours of pondering and fighting off my illness

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.