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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:48:54+00:00 2026-06-06T15:48:54+00:00

I managed to apply this excellent example to my needs: http://code.google.com/p/galleriffic/issues/attachmentText?id=76&aid=-3045121742886940548&name=example-2.html&token=4nlvmgAfVpc5whcXC9UEqHZaSz0%3A1339257750721 With a small

  • 0

I managed to apply this excellent example to my needs:

http://code.google.com/p/galleriffic/issues/attachmentText?id=76&aid=-3045121742886940548&name=example-2.html&token=4nlvmgAfVpc5whcXC9UEqHZaSz0%3A1339257750721

With a small twist: both galleries apply the image to the same slideshow container, so instead of having “#thumbs0” thumbnails change the image in “#slideshow0”, and “#thumbs1” thumbnails change the image in “#slideshow1” , i have them both set to change the image in “#slideshow” .

This is because I use tabs to separate 2 different categories of thumbnails, that change the image in one single slideshow container.

I did this by setting imageContainerSel to ‘#slideshow’, instead of ‘#slideshow’+i like in the example.

Here is the code:

HTML:

<div id="tabs">
<div class="each-gallery">
    <div id="thumbs0" class="navigation">
        <ul>
            <li><a href="#tabs-1">Tab 1</a></li>
            <li><a href="#tabs-2">Tab 2</a></li>
        </ul>

            <div id="tabs-1">
                <ul class="thumbs noscript">
                    <li>
                        <a class="thumb" href="images/1.jpg" title="Title #0">
                        <img src="images/thumbs/1.jpg" alt="Title #0" />
                            Title 1
                        </a>
                        <div class="caption">
                            <div class="image-title">Title 1</div>
                            <div class="image-desc">Description 1</div>
                        </div>
                    </li>
                    <li>
                        <a class="thumb" href="images/2.jpg" title="Title #0">
                            <img src="images/thumbs/2.jpg" alt="Title #0" />
                            Title 2
                        </a>
                        <div class="caption">
                            <div class="image-title">Title 2</div>
                            <div class="image-desc">Description 2</div>
                        </div>
                    </li>

                </ul>
            </div>

        </div>
</div>

            <div id="tabs-2">
                <div class="each-gallery">
                    <div id="thumbs1" class="navigation">

                <ul class="thumbs noscript">
                    <li>
                        <a class="thumb" href="images/3.jpg" title="Title #0">
                        <img src="images/thumbs/3.jpg" alt="Title #0" />
                            Title 3
                        </a>
                        <div class="caption">
                            <div class="image-title">Title 3</div>
                            <div class="image-desc">Description 3</div>
                        </div>
                    </li>
                    <li>
                        <a class="thumb" href="images/4.jpg" title="Title #0">
                            <img src="images/thumbs/4.jpg" alt="Title #0" />
                            Title 4
                        </a>
                        <div class="caption">
                            <div class="image-title">Title 4</div>
                            <div class="image-desc">Description 4</div>
                        </div>
                    </li>

                </ul>
                    </div>
                </div>
            </div>

Javascript:

 <script type="text/javascript">
                    jQuery(document).ready(function($) {
                            // We only want these styles applied when javascript is enabled
                            // We only want these styles applied when javascript is enabled
                            $('div.navigation').css({'width' : '960px', 'float' : 'left'});
                            $('div.content').css('display', 'block');

                            $(".each-gallery").each(function(i){
                                    // Initially set opacity on thumbs and add
                                    // additional styling for hover effect on thumbs
                                    var onMouseOutOpacity = 0.67;
                                    $('#thumbs + i + ul.thumbs li').opacityrollover({
                                            mouseOutOpacity:   onMouseOutOpacity,
                                            mouseOverOpacity:  1.0,
                                            fadeSpeed:         'fast',
                                            exemptionSelector: '.selected'
                                    });

                                    // Initialize Advanced Galleriffic Gallery
                                    var gallery = $('#thumbs'+i).galleriffic({

                                            delay:                     2500,
                                            numThumbs:                 20,
                                            preloadAhead:              0,
                                            enableTopPager:            false,
                                            enableBottomPager:         false,
                                            maxPagesToShow:            7,
                                            imageContainerSel:         '#slideshow',
                                            controlsContainerSel:      '#controls',
                                            captionContainerSel:       '#caption',
                                            loadingContainerSel:       '#loading',
                                            renderSSControls:          true,
                                            renderNavControls:         true,
                                            playLinkText:              'Play Slideshow',
                                            pauseLinkText:             'Pause Slideshow',
                                            prevLinkText:              '&lsaquo; Previous Photo',
                                            nextLinkText:              'Next Photo &rsaquo;',
                                            nextPageLinkText:          'Next &rsaquo;',
                                            prevPageLinkText:          '&lsaquo; Prev',
                                            enableHistory:             false,
                                            autoStart:                 false,
                                            syncTransitions:           true,
                                            defaultTransitionDuration: 900,
                                            onSlideChange:             function(prevIndex, nextIndex) {
                                                    // 'this' refers to the gallery, which is an extension of $('#thumbs')
                                                    this.find('ul.thumbs').children()
                                                            .eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
                                                            .eq(nextIndex).fadeTo('fast', 1.0);
                                            },
                                            onPageTransitionOut:       function(callback) {
                                                    this.fadeTo('fast', 0.0, callback);
                                            },
                                            onPageTransitionIn:        function() {
                                                    this.fadeTo('fast', 1.0);
                                            }
                                    });
                            });

                    });
            </script>

The problem:

on page load, both galleries load their first image to #slideshow at the same time, so on initial page load, the image appears twice, one below the other. Only after clicking on a different thumbnail the second image disappears and everything works as expected.

How do I fix it?

  • 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-06T15:48:56+00:00Added an answer on June 6, 2026 at 3:48 pm

    I managed to solve the problem myself.

    In case anyone is interested, here is the solution:

    I gave the first thumb in the first gallery a unique name:

    <a class="thumb" name="first" href="images/1.jpg" title="Title #0">
    

    And modified jquery.galleriffic.js:

                    var buuga = this.data[nextIndex].hash;
                if(buuga !== 'first') {
                                var newSlide = this.$imageContainer
                    .append('<span class="image-wrapper current"><a class="advance-link" rel="history" href="#'+this.data[nextIndex].hash+'" title="'+imageData.title+'">&nbsp;</a></span>')
                    .find('span.current').css('opacity', '0');
                }
    

    What i changed was adding the ‘buuga’ variable to store the name, and wrapped the part that constructs a new hidden span for the image in an “if” condition that does not run if the name is “first’.

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

Sidebar

Related Questions

I'm Not too Fluent in Javascript but I managed to alter this code and
managed to get my xsl working at http://www.xmlper.com/ (great tool good recommendation from other
From managed code, how do I load a managed type from another assembly at
I managed to get authentication to work by following the tutorial from this page
There were some excellent answers to this question already, however, they are now outdated.
I'm really lost on this case. I am trying to apply a custom MVC
So I've managed to get Code First running and it works great. Since I
Normally when I use backbone.js I would apply this sort of patch to nest
I managed to build my storyboard behind code. I don't know how to add
After reading this article , I've managed to change rendering. I'm calling an internal

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.