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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:35:30+00:00 2026-06-18T08:35:30+00:00

I have following simple list item code in my html file <ul> <li>item one</li>

  • 0

I have following simple list item code in my html file

<ul>
    <li>item one</li>
    <li>item two</li>
    <li>item three</li>

    <li>item four</li>
    <li>item five</li>
    <li>item six</li>

    <li>item seven</li>
    <li>item eight</li>
    <li>item nine</li>

    <li>item ten</li>
    <li>item eleven</li>
    <li>item twelve</li>    
</ul>

and i want to output like this way using with jQuery.

item one     item four    item seven    item ten
item two     item five    item eight    item eleven
item three   item six     item nine     item twelve
  • 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-18T08:35:31+00:00Added an answer on June 18, 2026 at 8:35 am

    Here’s a solution that creates multiple UL and floats them

    CSS

    .col_4 {
        width:25%;
        float:left
    }
    

    HTML

    <ul class="list"><li></li></ul>
    

    JS

    /* config*/
    var numCols = 4,
        listClass = 'list';
    
    var $list = $('.' + listClass),
        $container = $list.parent(),
        $items = $list.children().detach(),
        numItems = $items.length,
        itemsPerCol = Math.ceil(numItems / numCols),
        sliceStart = 0;
    
    /* remove original empty list and create new ones*/
    $list.remove();
    
    for (i = 0; i < numCols; i++) {
        var endSlice = sliceStart + itemsPerCol + 1;
        $('<ul class="' + listClass + ' col_' + numCols + '">')
                            .append($items.slice(sliceStart, endSlice))
                            .appendTo($container);
        sliceStart += itemsPerCol;
    };
    

    DEMO http://jsfiddle.net/G7BfY/

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

Sidebar

Related Questions

I have the following code (correct for my simple tests) for a linked list
I have following simple code: <%@ Page Language=C# AutoEventWireup=true CodeBehind=testForm.aspx.cs Inherits=Orbs.testForm %> <html> <body>
I have a following simple code: def get(): return [lambda: i for i in
I have used to following code to display the favorite item listing. It has
I want to populate a list from my database. I have the following code:
I have following simple class: @interface Article: NSObject { NSString *title; } @property (copy,
I have following simple program: import std.stdio; int main(string[] argv) { writeln(Hello, world!); return
I'm using MVC 4, EF 4.3 and the MVCScaffolding package. I have following simple
I have following rather simple query select count(*) from tbl t1, tbl t2 For
I have the following simple class definition: //mycommon.h @interface CurrentPath : NSObject @property (nonatomic,

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.