HN user

Javve

193 karma

Co-founder and bootstrapper at Confetti.events Organizer of the Nordic.js and Nordic.design conferences. Creator of List.js

Site: javve.com Twitter twitter.com/javve

Posts19
Comments22
View on HN

With the new plugins-functionality you could create your own special sorter that uses data attributes too. Then you would call it with listObj.yourSortersName(something).

And you can still use the regular sort function which since this version is a included in the helper object :)

With plugins you can build your own fuzzy search! :) ...but I know that is a feature many want, so maybe I will build a plugin if no one get before me.

List.js 15 years ago

Sweet! I would love to get some feedback when you tried it out.

List.js 15 years ago

Good idea! The id-parameter could absolutely be a element instead, will add that to next release.

But one point with only allowing id i.e is consistency.

List.js 15 years ago

I have optimized the script so that only 200 items are visible by default (change with options = { maxVisibleItemsCount: int }) this makes it possible to add large amounts (100 000+) items into the list without problems (except for sorting, thats sloooow if you have large amout of items).

But I am working on a solution for auto-loading data from callbacks or showing more items in list on the fly. But the problem is that most solutions are dependent on how the HTML/CSS around the list is implemented, which is something I want to avoid. Im thinking a lot about it, though.

List.js 15 years ago

Good point about the fold and the name. I added the name to the menu and maybe I will make the logo smaller.

I also added a note about that the contacts-example could contain bugs. My purpose with the example is the show the possibilities with add(), values() and remove(). There fore I have tried to minimize the amount of code (and there by some functionalities). But I will of course fix real bugs if there are any.

The Documentation-link now leads to the readme!

Thanks for your input!

List.js 15 years ago

Think I have to put a headline describing the list! Wait 5min :)

List.js 15 years ago

It is a working example on the first page? :)

List.js 15 years ago

The reason is simply that I wanted it to be as simple as possible, but if it seems to be a common request I could add support for data-attributes! (and yes, it "works" in IE, by using getAttribute())

List.js 15 years ago

It's using a really simple algorithm, but I will definitely update it in later releases!

I may update the examples but, I want to keep them as simple as possible, just enough to show some of the possibilities with List.js