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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:12:23+00:00 2026-06-03T15:12:23+00:00

So I understand there are many free image rotators, etc, out there using things

  • 0

So I understand there are many free image rotators, etc, out there using things like jQuery. My issue however, is it there a way to dynamically update the image rotator without refreshing the site page?

So basically you are displaying ten images then 1 hour later you have a script delete the old images add ten new images and a new xml file, do you need to do a refresh of the page? Or does the script always dynamically check the xml file, so you don’t have to do a refresh.

p.s. it doesn’t have to be in jQuery, could be HTML5 or the likes – I just want to be able to add and remove images from a folder, and have the rotator automatically update to use what’s in the folder

  • 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-03T15:12:27+00:00Added an answer on June 3, 2026 at 3:12 pm

    I think it’s best, if at all possible, to operate on the gallery without doing anything that might make it necessary to re-initialise it. The approach below seeks to achieve this aim by replacing the gallery images without replacing the img nodes themselves.

    First, let’s assume that the server-side code is up and working and returns, by whatever means, json that when decoded is equivalent to:

    [
        "images/aaa.jpg",
        "images/bbb.jpg",
        "images/ccc.jpg",
        "images/ddd.jpg",
        "images/eee.jpg",
        etc.
    ]
    

    Then:

    $(function(){
        var $galleryImgs = $('#myGallery img');//gallery img nodes in a jQuery wrapper.
        var updateGallery = function() {
            $.ajax({
                url: 'getImageUrls.php', //or whatever
                data: {
                    n: $galleryImgs.length //specify how many new image urls to fetch
                },
                dataType: 'json',
                success: function(data) {
                    $.each(data, function(i, url) {
                        if($galleryImgs[i]) { //safety
                            $galleryImgs[i].src = url; //replace each gallery image in turn
                        }
                    });
                }
            });
        };
        var galleryInterval = setInterval(updateGallery, 60*60*1000);//60*60*1000 for one hour; 30*60*1000 for half an hour
    });
    

    Thus, the gallery plugin will (hopefully) continue its rotation blissfully unaware that it’s images have been changed. Some gallery plugins may be more amenable to this than others – experimentation necessary.

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

Sidebar

Related Questions

I understand there are many threads like mine but I have been trying to
Edit Since there were many downvotes and people who didn't understand what I'm asking
I understand there is a limit to the number of requests per day using
Novice question, but I don't really understand why there are so many operations for
I understand there are MANY posts on this, but I have tried every single
I understand there are many questions related to this, so I'll be very specific.
I'm just trying to understand this a little better. I understand there are many
I understand that there are many existing questions about Django template images, but I
I understand that there is a setting in Sun JVM for dumping the heap
I don't understand why there is no inheritance in Java annotations, just as Java

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.