0

I used to create List in APS.net :

<% List<Item> list = new List<Item>(); %>

I want to create in jquery like this. How can I do that? Anyone have any idea? Thanks.

2
  • Why jQuery? I would think a plain JavaScript array would do the same job as a list in other languages, given that JavaScript arrays don't have a fixed length. Commented May 10, 2012 at 3:36
  • Thanks nnnnnn for your answer. Commented May 10, 2012 at 5:58

2 Answers 2

2

This is how you create a basic unordered list.

jQuery(document).ready(function(){
    list = jQuery('<ul>');
    listItem = jQuery('<li>new item</li>');
    list.append(listItem);
});
Sign up to request clarification or add additional context in comments.

Comments

1

some of possible solutions for you: http://www.coffeeblack.org/work/jscollections/ http://plugins.jquery.com/project/Collection

similar discussion: JavaScript Collections API?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.