Javascript style.display taking away <ul> bullets

After a little commenting out I’ve found that when I run this command in JavaScript the bullets in my unordered list disappear (each “page” is an item in my unordered list.):

pages[i].style.display = "block";

The padding of the ul, however, remains intact. How might I toggle with the style.display of a list item without removing the bullet?


Set the display to list-item instead, then (which is the default value for li elements).

In your case, it would be:

pages[i].style.display = 'list-item';