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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:29:46+00:00 2026-06-18T18:29:46+00:00

This is probably a longshot but, i’m using galleriffic Jquery plugin, and i’m changing

  • 0

This is probably a longshot but, i’m using galleriffic Jquery plugin, and i’m changing the images on the fly with javascript by using appending and replacing the img src:

   $.each(paths,function(index, value) {
       if(size > 0) {
    var src = $('.thumbs li:nth-child('+index+')').find('img').attr('src', value);
    var str = value; 
    var big_img=str.replace("_s","_b");
    var src = $('.thumbs li:nth-child('+index+')').find('a').attr('href', big_img);
     size -- ;    
        }

The problem I’m having is that it somehow uses a hash function to convert the image URL to display the fullsize image, and since I change the img src after the DOM is loaded any changed images are not being displayed in the viewer.

you can see the effect here
http://www.riskycode.com/wordpress/#

click on design focuses.

  • 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-18T18:29:48+00:00Added an answer on June 18, 2026 at 6:29 pm

    that’s because of the way your plugin is binding events

    so before changing the images attributes you’ll have to destroy the gallerific instance;

    then re-instantiate once your change of images attribute is finished

    nb: very old plugin but whatever

    go through this code; replace the this by the name of your instance; depending on your options part of the script may well be unecesary;

    start with gallery.initializeThumbs(); only could be enough (but won’t trigger preload i think)

        // Initialize the thumbails
        this.initializeThumbs();
    
        if (this.maxPagesToShow < 3)
            this.maxPagesToShow = 3;
    
        this.displayedPage = -1;
        this.currentImage = this.data[0];
        var gallery = this;
    
        // Hide the loadingContainer
        if (this.$loadingContainer)
            this.$loadingContainer.hide();
    
        // Setup controls
        if (this.controlsContainerSel) {
            this.$controlsContainer = $(this.controlsContainerSel).empty();
    
            if (this.renderSSControls) {
                if (this.autoStart) {
                    this.$controlsContainer
                        .append('<div class="ss-controls"><a href="#pause" class="pause" title="'+this.pauseLinkText+'">'+this.pauseLinkText+'</a></div>');
                } else {
                    this.$controlsContainer
                        .append('<div class="ss-controls"><a href="#play" class="play" title="'+this.playLinkText+'">'+this.playLinkText+'</a></div>');
                }
    
                this.$controlsContainer.find('div.ss-controls a')
                    .click(function(e) {
                        gallery.toggleSlideshow();
                        e.preventDefault();
                        return false;
                    });
            }
    
            if (this.renderNavControls) {
                this.$controlsContainer
                    .append('<div class="nav-controls"><a class="prev" rel="history" title="'+this.prevLinkText+'">'+this.prevLinkText+'</a><a class="next" rel="history" title="'+this.nextLinkText+'">'+this.nextLinkText+'</a></div>')
                    .find('div.nav-controls a')
                    .click(function(e) {
                        gallery.clickHandler(e, this);
                    });
            }
        }
    
        var initFirstImage = !this.enableHistory || !location.hash;
        if (this.enableHistory && location.hash) {
            var hash = $.galleriffic.normalizeHash(location.hash);
            var imageData = allImages[hash];
            if (!imageData)
                initFirstImage = true;
        }
    
        // Setup gallery to show the first image
        if (initFirstImage)
            this.gotoIndex(0, false, true);
    
        // Setup Keyboard Navigation
        if (this.enableKeyboardNavigation) {
            $(document).keydown(function(e) {
                var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
                switch(key) {
                    case 32: // space
                        gallery.next();
                        e.preventDefault();
                        break;
                    case 33: // Page Up
                        gallery.previousPage();
                        e.preventDefault();
                        break;
                    case 34: // Page Down
                        gallery.nextPage();
                        e.preventDefault();
                        break;
                    case 35: // End
                        gallery.gotoIndex(gallery.data.length-1);
                        e.preventDefault();
                        break;
                    case 36: // Home
                        gallery.gotoIndex(0);
                        e.preventDefault();
                        break;
                    case 37: // left arrow
                        gallery.previous();
                        e.preventDefault();
                        break;
                    case 39: // right arrow
                        gallery.next();
                        e.preventDefault();
                        break;
                }
            });
        }
    
        // Auto start the slideshow
        if (this.autoStart)
            this.play();
    
        // Kickoff Image Preloader after 1 second
        setTimeout(function() { gallery.preloadInit(); }, 1000);
    

    otherwise you add/remove images as shown there : http://www.twospy.com/galleriffic/example-4.html

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

Sidebar

Related Questions

I am using Prototype.js, but this probably applies to jQuery as well: I have
I am using this probably ugly javascript to show a text box (in a
I am using ASP.Net MVC but this probably applies to all MVC patterns in
This is probably a longshot but.. is it possible to duplicate a whole database
This probably sounds really stupid but I have noo idea how to implement jquery's
This is probably a long shot but I asked a question about converting one
This probably sounds like a terrible idea at first glance, but here is my
This probably is a dummy question but I cannot find a clear indication. I
I know this probably really simple but Im not sure what im doing wrong...
I know this probably has been asked before but I am having issues 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.