Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a limit to the number of <li> elements in an <ul>?

I'm loading in a collection of 343 objects into a BackboneCollection it's fetch() method.

Those 343 objects are templated into <li>elements.

I would expect 343 elements to be displayed on the page, but $('#myapp li').length tells me that only 200 objects are there.

Any idea what could be going on?

like image 494
CamelBlues Avatar asked Oct 22 '22 12:10

CamelBlues


1 Answers

No there is not a limit to how many <li> elements a DOM will allow.

I create an example in which you can create <li> elements dynamically. Put in an integer value, as you can see it's the same in all browsers. I tested with values up to 1000 across all browsers.

Check out this example

like image 114
Gabe Avatar answered Nov 02 '22 04:11

Gabe