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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:39:13+00:00 2026-05-13T20:39:13+00:00

Whats up peeps.. lets say i have a ul with 30 li items <ul

  • 0

Whats up peeps..

lets say i have a ul with 30 li items

<ul class="column">
  <li>portfolio items 1</li>
  <li>portfolio items 2</li>
  ...
  <li>portfolio items 29</li>
  <li>portfolio items 30</li>
</ul>

i need jquery to take li items from 10 into a new ul column and if possible from 20 into a third column

so if my ul list had 30 li items it would have only 10 and create a new ul coumn with the rest of the li items.

example of what i’m trying to do is within my portfolio
http://www.missionandromeda.com

i’m basicly migrating to wordpress and i must have all entries within 1 ul. would have been very easy if i only had 1 column but my design require 4 =/

Thanks! (;

  • 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-13T20:39:13+00:00Added an answer on May 13, 2026 at 8:39 pm

    Try this. It assumes that the new ULs need to be created dynamically.

    UPDATE: Created a version that assignes the class, and doesn’t assign IDs at all.

    $('document').ready(function() {
      var i = 0;
      var $newUL;
      var $theColumn = $('.column');
      var length = $theColumn.children('li').length;
      while(length > 10) {
        $newUL = $('<ul class="' + $theColumn.attr('class') + '"></ul>');
        while(i < 10) {
            $theColumn.children('li').eq(10).appendTo($newUL)
            i++;
            length--;
        }
        $('body').append($newUL);
        i = 0;
      }
    });
    

    Here’s another way to do it. (this time the class name is hardcoded, though it doesn’t need to be):

    $(document).ready(function() {  
        var $newUL;
        while($('.column:last').children('li').length > 10) {
            $newUL = $('<ul class="column"></ul>');
            $('.column:last').children('li').slice(10).appendTo($newUL);
            $newUL.appendTo('body');
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whats wrong in below JSON Object definition I am trying to create a new
I want to collect statistics from the spreading of a file in a new
I have 5 servers on a LAN without Internet connection. I need them to
I have this code, to get followers and friends(peeps you are following), However I'm
Let's say you have a table for branches in your organization. Some of them
I'm new to ZooKeeper. This is what I need. I've a network of peers.
Hey there programming peps! I have a question re: jQuery. We have a software
I am new to WPF - and painfully aware of it. I have unsuccessfully
Hay Peeps, I have a question. I am trying to write part of a
I have this SQL: INSERT INTO v3_peers (torrent, peer_id, ip, ipv6, port, smoke_ip, uploaded,

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.