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

  • Home
  • SEARCH
  • 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 52123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:51:27+00:00 2026-05-10T16:51:27+00:00

I’m trying to place 4 of my image containers into a new pane, having

  • 0

I’m trying to place 4 of my image containers into a new pane, having a total of 16 images. The jQuery below is what I came up with to do it. The first pane comes out correctly with 4 images in it. But the second has 4 images, plus the 3rd pane. And the 3rd pane has 4 images plus the 4th pane. I don’t know exactly why the nesting is occurring. My wrapping can’t be causing their index to change. I added css borders to them and it appears to be indexed correctly. How should I be going about this? What I want is to have 1-4 in one pane, 5-8 in another, 9-12, and 13-16. It needs to be dynamic so that I can change the number in each pane, so just doing it in the HTML isn’t an option.

A demo of the issue can be seen here: http://beta.whipplehill.com/mygal/rotate.html. I’m using firebug to view the DOM.

Any help would be splentabulous!

The jQuery Code

$(function() {      $('.digi_image:gt(-1):lt(4)').wrapAll('<div class=\'digi_pane\'></div>').css('border', '2px solid red');     $('.digi_image:gt(3):lt(8)').wrapAll('<div class=\'digi_pane\'></div>').css('border', '2px solid blue');     $('.digi_image:gt(7):lt(12)').wrapAll('<div class=\'digi_pane\'></div>').css('border', '2px solid green');     $('.digi_image:gt(11):lt(16)').wrapAll('<div class=\'digi_pane\'></div>').css('border', '2px solid orange');     $('.digi_pane').append('<div style=\'clear: both;\'></div>'); });  

The HTML (abbreviated), but essentially repeated 16 times.

<div class='digi_image'>     <div class='space_holder'><img src='images/n883470064_4126667_9320.jpg' width='100' /></div> </div> 
  • 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. 2026-05-10T16:51:28+00:00Added an answer on May 10, 2026 at 4:51 pm

    I think your problem is your use of the gt() and lt() selectors. You should look up slice() instead.

    Check out this post: http://docs.jquery.com/Traversing/slice

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

Sidebar

Ask A Question

Stats

  • Questions 59k
  • Answers 59k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I've been a full time rails developer for over a… May 11, 2026 at 9:03 am
  • added an answer If you're doing joins for no reason, sure. Usually the… May 11, 2026 at 9:03 am
  • added an answer There is no way to query from ActionScript what the… May 11, 2026 at 9:03 am

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.