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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:29:51+00:00 2026-05-31T09:29:51+00:00

I have an array of images in jquery that I am attempting to load

  • 0

I have an array of images in jquery that I am attempting to load into a series of divs when the user clicks a specific box. On my localhost everything works great, but when I put on the internets. Something really odd happens.

enter image description here

the url that I am attempting to load is split into each individual character and separate div is created for each letter…?

here is the code that is used to create the div’s and sign a background image to all of them.

            for (var i = 0, len = images[index].length; i < len; i++){
            $('#project_display #slides .slides_container').append($('<div></div>'))
            $('#project_display #slides .slides_container div').eq(i).css('background','url(' + images[index][i] +') center center no-repeat');
        }

images contains arrays of other images.
any help would be so great!

thanks!

UPDATE

here is images and another array creation:

`
var circus = new Array();
circus[0] = ‘images/projects/circus1.jpg’;
circus1 = ‘images/projects/circus2.jpg’;
circus[2] = ‘images/projects/circus3.jpg’;
circus[3] = ‘images/projects/circus4.jpg’;
circus[4] = ‘images/projects/circus5.jpg’;

var images = new Array();
images[0] = ‘images/projects/radioshack_899.jpg’;
images1 = radioImages;
images[2] = dwarf;
images[3] = dwarf;
images[4] = circus;
`

  • 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-31T09:29:52+00:00Added an answer on May 31, 2026 at 9:29 am

    It’s a little hard to tell without seeing more, but you are either doing something wrong in the for loop, or you are doing something wrong in the url(' + images[index][i] +').

    Are you sure you that images.length is’nt what your looking for in the for loop, and something tells me you should remove the [i] in the url(), like so: url(' + images[index] +')

    Maybe it should be something like this:

    for (var i = 0; i < images.length; i++){
        $('<div></div>').css('background','url(' + images[i] +') center center no-repeat')
           .appendTo($('#project_display #slides .slides_container'));
    }
    

    And you should try to shorten down those selectors if possible.

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

Sidebar

Related Questions

I am using PHP and I have an array of user images that I
I have image Array with two images out of that first image its showing
I need to get array of images that have to call from server and
I have a service that converts images stored on a website to byte array
I have a php file that creates a json array for my images and
I have a jQuery function that finds all the images nested in a container
I have an images array in which there are number of images. Not fixed,
i have two int array of images , i have implemented it in grid
I have an array of urls of images, from which i have to first
I need to display array of images in a single view which have various

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.