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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:37:31+00:00 2026-05-23T17:37:31+00:00

I am using Jquery and html to create a grid with an ordered list

  • 0

I am using Jquery and html to create a grid with an ordered list in a GUI. The user can dynamically edit the html content in each of the grid cells. I have two questions:

  1. If each of the li elements has a .html associated with it that the user can edit, how can I iterate through all of the li elements to get the current value of the .html? Preferably without having to name each element individually….

  2. I want to make the grid customizable by the user. I.e. if the user enters in that they want 2 rows and 2 cols, the grid will appear 2×2. How can I dynamically edit how html appears on the GUI? If the user wants a 10×10 grid, do I really have to create 100 li elements, or what’s a better way?

Here is my code for the ordered list. Right now there are 12 cells. Thanks!

<ol id="selectable">
    <li class="ui-state-default">1</li>
    <li class="ui-state-default">2</li>
    <li class="ui-state-default">3</li>
    <li class="ui-state-default">4</li>
    <li class="ui-state-default">5</li>
    <li class="ui-state-default">6</li>
    <li class="ui-state-default">7</li>
    <li class="ui-state-default">8</li>
    <li class="ui-state-default">9</li>
    <li class="ui-state-default">10</li>
    <li class="ui-state-default">11</li>
    <li class="ui-state-default">12</li>
</ol>
  • 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-23T17:37:32+00:00Added an answer on May 23, 2026 at 5:37 pm
    1. you could use .map() to get all the innerHTML from a list of elements. The following code would give you a list of the innerHTML of each li and join them by a comma.

      $('#selectable li').map(function(v) { return $(this).html() }).get().join(', ');

    2. I am pretty sure that jQuery’s manipulation methods will assist you in inserting/removing elements. How many cells in grid really is up to your program; you could even allow them to insert 1000 cells. Why not?

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

Sidebar

Related Questions

I am trying to create a GUI using jquery and html to allow users
Is it possible using jQuery to create an <iframe> element and append html content
I'm trying to create a carousel similar to http://www.aprica.jp/ , using jQuery and HTML.
I'm trying to dynamically create a div to show error messages using jquery. I'm
I'm using jQuery Tools ( http://flowplayer.org/tools/index.html ) to create tooltips, I've created a js-file
I am trying to create a html page with persistent footers using jquery mobile.This
I'm trying to create a fade in effect using jQuery, html & CSS with
I'm using the HTML/CSS/JavaScript/jQuery to create a UI palette for a Sketchup plug-in. There
I'm trying to create a copy/paste system for a HTML table using jQuery and
I have an MVC3 application doing AJAX edit of a grid line using JQUERY

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.