javve / list.js

The perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML.
https://listjs.com
MIT License
11.19k stars 898 forks source link

Use regular CSS selectors #563

Open bejohu opened 6 years ago

bejohu commented 6 years ago

Use CSS selectors rather than IDs, e.g.

...
var options = {
  item: '#list-item'
};

var userList = new List('#users', options);
...
binarykiwi commented 6 years ago

You can use an element if you do not want to use an ID:

new List(id/element, options, values);

But yes, would sometimes be easier using a CSS selector.