listjs
sortable list in list.js doesn't seem to be working
I copied the example from http://listjs.com/examples/table/ of a sortable table, but it's not working. Can anyone tell me what I'm doing wrong please? I have these links in my <head>: <link rel="stylesheet" href="/includes/material-design-lite/material.min.css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> html: <div id="users"> <input class="search" placeholder="Search" /> <button class="sort" data-sort="name"> Sort by name </button> <table> <!-- IMPORTANT, class="list" have to be at tbody --> <tbody class="list"> <tr> <td class="name">Jonny Stromberg</td> <td class="born">1986</td> </tr> <tr> <td class="name">Jonas Arnklint</td> <td class="born">1985</td> </tr> <tr> <td class="name">Martina Elm</td> <td class="born">1986</td> </tr> <tr> <td class="name">Gustaf Lindqvist</td> <td class="born">1983</td> </tr> </tbody> </table> </div> <script src="//listjs.com/assets/javascripts/list.min.js"></script> <script src="/includes/material-design-lite/material.min.js"></script> js: <script type="javascript"> var options = { valueNames: [ 'name', 'born' ] }; var userList = new List('users', options); </script>
Use the absolute URL when linking list.js: <script src="http://www.listjs.com/assets/javascripts/list.min.js"></script>
Related Links
sortable list in list.js doesn't seem to be working
Listjs Turn Off Search Filter For Title Attribute in Table
How to save state pagination with list.js after refresh?