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

I load a collection of 343 objects into the BackboneCollectionit method fetch().

Those 343 objects are templated into elements <li>.

I would expect 343 elements to be displayed on the page, but $('#myapp li').lengthtells me that there are a total of 200 objects.

Any idea what could happen?

+5
source share
1 answer

There is no limit to the number of elements <li>that the DOM will allow.

I am creating an example in which you can dynamically create elements <li>. Put an integer value, as you can see it the same in all browsers. I tested with values โ€‹โ€‹up to 1000 in all browsers.

See this example

+3
source

All Articles