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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:55:57+00:00 2026-05-21T03:55:57+00:00

Using javascript/jQuery: I have an array with images and I need to display them

  • 0

Using javascript/jQuery:

I have an array with images and I need to display them in my web. The number of images will vary.
Depending on the width and height available due to screen resolution I will display x rows and y columns in order to fill the space.
All images are width=115px and height=120px

When the rows of images go out of view (the vertical scroll shows) I need to place them in a new div (id=’slide’). This new div I will use to create a slide and show a second/third .. set of images by the clicking of an arrow.

I’m calculating the dimensions of the space available using:

function Resize(){
    var docheight = jQuery('.main_insidem').height();    
    var docwidth = jQuery('.main_insidem').width();
    jQuery('.main_insidem').html(docheight+' '+docwidth);
}

And everything is contained in

<div id="slidesContainer"></div>

I need to end up with something like:

<div id='slide'><img src='image1.jpg'><img src='image2.jpg'><img src='image3.jpg'><img src='image4.jpg'><img src='image5.jpg'>..</div>

<div id='slide'><img src='imagex+1.jpg'><img src='imagex+2.jpg'><img src='imagex+3.jpg'><img src='imagex+4.jpg'><img src='imagex+5.jpg'>..</div>

<div id='slide'><img src='imagey+1.jpg'><img src='imagey+2.jpg'><img src='imagey+3.jpg'><img src='imagey+4.jpg'><img src='imagey+5.jpg'>..</div>
.

.

Any ideas on how to proceed?

Thanks a lot!

  • 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-21T03:55:57+00:00Added an answer on May 21, 2026 at 3:55 am

    Images load within a container. As you resize window, images will adjust accordingly. No need to do any width or height calculations.

    jQuery

    $("img").each(function(index) {
        $(this).delay(400 * index).fadeIn(300);
    });
    

    CSS

    .wrap{
        height:400px;
        border:1px solid red;
    }
    img{
        display:none;
        margin:5px 5px 0 0;
        float:left;
    }
    

    HTML

    <div class="wrap">   
        <img ...>
        <img ...>
        ..
    </div>
    

    Check working example at http://jsfiddle.net/38D6f/1/

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

Sidebar

Related Questions

I am using jQuery 1.7.1 (but that's probably irrelevant). I have several JavaScript arrays
i have a JavaScript project (using jquery), inside it i draw a canvas by
I have the following Javascript code (using jQuery): floatUpAndDown(); function floatUpAndDown() { $(#bird).animate({top: '+=30px'},
I want to set focus on particular div using jquery or javascript. i have
We are using jQuery in our project. We have numerous custom javascript files in
I have updated my jSon object using the code <script type=text/javascript > jQuery(document).ready(function($){ var
I am using jQuery to build an array of images from a php array.
I have developed a game using HTML5 and Javascript/JQuery. This game is a Tile
I have a little trouble understanding scope and lifetime using javaScript and jQuery. I
I need to upload some files (images but it doesn't matter) using jquery and

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.