• HTML,  Javascript

    Easy sortable and filterable lists in HTML/Javascript with List.js

    Let’s leave SAP aside for a while to talk about HTML and Javascript, which I also like 🙂.

    In a personal web project, I needed an easy way of making lists which data I could filter and sort, and a quick search on Lord Google gave me the answer: List.js

    List.js is a light and quick JavaScript library that let’s you easilly create data listings, allowing sort, search and much more.

    Like any JavaScript library, first we’ll need to download it and link it in our HTML document.

    <script type="text/javascript" src="/js/list.min.js"></script>

    We will define a div for out list, in which we will create our list with
    and tags. A class needs to be defined for the list. For now, we will leave it as “list”. List.js will search for this class to interact with the HTML.

    <div id="lenguajes">
    <ul class="list">
    <p class="puesto">Puesto: 1 <img src="/img/oro.png" alt="" /></p>
    <p class="lenguaje">Lenguaje: Java</p>
    . . .
Esta web utiliza cookies propias y de terceros para su correcto funcionamiento y para fines analíticos. Al hacer clic en el botón Aceptar, acepta el uso de estas tecnologías y el procesamiento de tus datos para estos propósitos. Ver