CRUD HTML List In Pure JavaScript – ulol.js

Category: Javascript | August 13, 2019
Author: Ayush-Rajniwal
Views Total: 39
Official Page: Go to website
Last Update: August 13, 2019
License: MIT

Preview:

CRUD HTML List In Pure JavaScript – ulol.js

Description:

The ulol.js JavaScript enables you to dynamically generate an HTML list from an array of strings and programmatically add/update/remove list items.

Supports both ordered and unordered HTML lists.

How to use it:

Insert the minified version of the ulol.js library into the HTML file.

<script src="src/ulol_mini.js"></script>

Create a container to place the generated HTML list.

<div id="example"></div>

Generate a basic HTML list using the ulol.run method. Possible parameters:

  • tagId: The HTML id tag name under which list is added
  • tyeOfList: Can have 2 values ul(Unordered List) and ol(Ordered List)
  • content: Array which contains the bullet points to show in list
var list = ulol('example','ol',['jQueryScript.Net','CSSScript.Com','Google.Com']).run();

Add new items to the list.

list.update(['Facebook.Com','Twitter.Com']);

Remove an item from the list.

list.remove(3);

You Might Be Interested In:


Leave a Reply