Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey
Filter by
Sorted by
Tagged with
0 votes
0 answers
63 views

Unable to load List.js accurately while loading data using AJAX

I'm working on a pagination feature using List.js for my email page on a website where emails are loaded using PHP, MySQL, and AJAX. I have installed List.js locally and referenced it correctly in my ...
Muhammad Aleem's user avatar
0 votes
0 answers
43 views

How to change links in list.js pagination to from href="#" to href="?page="?

I want to change links in list.js pagination: https://listjs.com/docs/pagination/ Before: <ul class="pagination"> <li class="disabled"><a class="page" href=...
Cyborg2030's user avatar
1 vote
1 answer
145 views

Reassigned NodeList in ForEach Loop with list.js

I'm using List.js to sort a HTML list. The JS reorders the list items in the DOM. Now I made elements in my list clickable and i need to use the (new) index of my list items. Super Simple HTML setup: &...
mollini's user avatar
  • 35
2 votes
0 answers
862 views

List.js how to reset sorting to initial state

I'm currently working with the list.js library and its sorting method. The functionality works perfectly when you want to sort asc or desc, but is there a way to reset everything to initial state from ...
Marcin Mroczko's user avatar
0 votes
1 answer
1k views

list.js - Custom sort function on button click without jQuery

List.js without jQuery. It's working as supplied out of the box. Mission: When a 'List By Price' button is clicked, sold-out items need to display at the bottom of the sorted list - regardless of ...
GLCoder's user avatar
  • 137
-1 votes
1 answer
323 views

Why the includes() function is not working?

I would like to make a filter using List.js. I have two simple buttons: "BUY" and "SELL" Ideally they should be used as reference to search into the value of a specific cell but I ...
iChef89's user avatar
  • 97
3 votes
2 answers
258 views

How do I count checked checkboxes in list.js that are not currently displayed?

I have a table with checkboxes in list.js. I want to count all checkboxes that are checked, even those hidden due to the search function of the list. The method below works for only the checkboxes ...
mattm's user avatar
  • 5,949
0 votes
1 answer
284 views

Inform the number of items filtered via list.js

I start by saying that I am not a developer, but I understand the minimum of JS ... However I am not managing to solve something that in my view seems very simple (I think it is). Using List.js I was ...
Marcelo Sales's user avatar
0 votes
0 answers
210 views

sorting is not working after using .load() list.js & jQuery

I am using list.min.js for sorting the table column. It works fine till data is not refreshed again from database using .load() method. But after using .load() method my data successfully loaded but i ...
Sanjay Gupta's user avatar
0 votes
1 answer
158 views

How to count elements by class using list.js

I am using list.js for pagination and I am trying to count items in list by category. Here i have a list 7 people, of which : 1 is born in 1970, 2 are born in 1983, and 4 are born 1993. So i am trying ...
Tevin Tevboy's user avatar
0 votes
1 answer
1k views

How to update one list using List.js

I am implementing List.js List.js https://listjs.com/docs/ I want to "UPDATE" the item by specifying the id=1. I want an "UPDATE" feature like .myUpdate(). But the document seems ...
machupichu123's user avatar
1 vote
0 answers
358 views

List.js is not working when search symbol

I am implementing a search function using List.js List.js https://listjs.com/docs/ I'm having trouble with different features depending on the version var 1.5.0 getHtml cannot be used with item: ...
machupichu123's user avatar
0 votes
1 answer
1k views

Multiple Filters in list.js?

I have two columns that I want to be filterable with list.js. I tried the following code: var options = { valueNames: [ 'formformname', 'form-name', 'form-email','form-phone','form-branch','...
NotaGuruAtAll's user avatar
0 votes
1 answer
197 views

List.JS - Filter with comma separated values

I'm trying to create a dropdown to filter based on dates, but I would like to be able to comma separate the dates instead of initilizing each field as a separate filter, which would be slow when you ...
Maurice's user avatar
  • 477
0 votes
1 answer
424 views

List.js - filtering by an attribute with more than 1 key/value/answer

I'm trying to filter a List.js list by a data-attribute where the result has multiple answers: <div data-colors="red, blue, green">Item Name</div> When I try the following it wont ...
stankobrin's user avatar
0 votes
2 answers
748 views

List.js not working when using an ampersand (&) in value

When using an ampersand, either explicitly as & or using HTML character codes as &amp;, List.js breaks. Here's the code, working for the first filter, but not for the second: $(function() ...
Chris_Heu's user avatar
  • 139
0 votes
1 answer
123 views

List.js searching <img> object?

Trying to search image object by using the title attribute. List.js initialises when searching, but all images disappear upon entering a search query. <div id="img-list"> <input type="...
crbon's user avatar
  • 175
0 votes
1 answer
574 views

Subtract 7 days from moment date getting Invalid Date

Trying to subtract 7 days from date using moment.js. But, invalid date in the console. I'm first consoling the date in the span element with data-date attribute then creating a new variable and ...
sgoodman's user avatar
  • 167
0 votes
1 answer
195 views

List.js Not Sorting

I have a simple list at this codepen that I am trying to sort by number but it is not seem to work. I am following the documentation shown for basic list shown here. What am I missing? Thank you. js ...
sgoodman's user avatar
  • 167
0 votes
1 answer
68 views

Disable similar results from list.js

I use list.js, but it displays also similar results. For example I am typing Mar..., website displays also mur, car, man and etc. How can I disable them? It is demo from codepen: <p class="...
Cavid Muradov's user avatar
1 vote
1 answer
429 views

Codeigniter Pagination and List.js

I am trying to get pagination and list.js (sort and search) to work with my table. I have tried any advice I can find online, the pagination works correctly, and list.js works correctly search and ...
Mark's user avatar
  • 37
0 votes
1 answer
643 views

How to get a prev/next | first/last button to work with list.js pagination

I would like to add prev/next, first/last button to my already paginated and working index. Has anyone else created these buttons using List.js? <script src='//cdnjs.cloudflare.com/ajax/libs/...
kosmas's user avatar
  • 1
0 votes
0 answers
164 views

Search a table without removing collapsed rows

so basically I have a table, and I'm using the search of list.js to search the table. I'm also highlighting the results with mark.js. You can see a working version in the following link. <tbody ...
K DB's user avatar
  • 3
1 vote
1 answer
777 views

List.js apply filter by default

I am a beginner in Javascript and would appreciate some guidance in using the List.js library. So far, I have created the filters and they are able to work. But I would like the default table to have ...
X.enia's user avatar
  • 33
0 votes
1 answer
497 views

Sorting data stored on ID's with List.js

The Problem List.js isn't properly sorting numbers on my HTML-Table. This is happening because I'm using inner-HTML on the place of numbers, sort works fine if I just put the numbers and not an ID. ...
Katriel Lucas's user avatar
0 votes
1 answer
2k views

React sortable table not sorting

New React developer here. I am trying to create a sortable table, and to get started I snagged the following codepen example which is a good starter. From that, I stripped some stuff away and made the ...
Canovice's user avatar
  • 10.1k
1 vote
0 answers
4k views

How to make a sortable table with arrow icons which doesn't 'jump around' which clicked

I'm trying to adapt the example at http://listjs.com/examples/table/ to create a sortable table in which the table headers are clickable and sort by the corresponding column. I'd like to use up and ...
Kurt Peek's user avatar
  • 57k
0 votes
1 answer
198 views

Caching List.js Results - Reload filtered results on browser back button

I have a site where I am using List.js to filter between For Sale and To Let properties. The JS for this is as so: var options = { valueNames: [ 'status' ], }; var hackerList = new List('...
user avatar
0 votes
0 answers
89 views

List.js --- when I search by city or state on a table for ["New York, NY", "Ft Lauderdale, FL", "Miami, FL", " Quincy, MA", "Englewood, CO"]

I used list.js on this page https://comcastspotlight.com/jobs to search job by location. When I search by City name it works. However can't get an exact result when I search by state. Example, PA ( ...
Anisur's user avatar
  • 1
1 vote
2 answers
607 views

Javascript list.js extra class based on value

I have the following code that is working perfectly, but I am still not able to color cells with for example class bg-success due to the fact I use list.js to create tables. What I would like is that ...
p0nts's user avatar
  • 63
4 votes
2 answers
1k views

How to get data from specific event target

I'm trying to extract the name of a street using a click event in my list the entire process of getting the address data is working perfectly using AJAX successful callback I added a successful ...
smachs's user avatar
  • 236
0 votes
1 answer
753 views

Get data from selected option in <ul> using AJAX result

I'm trying to get data from selected li in AJAX result but I can not think of something to get the data from the current selection, could help me? The whole process of getting the registry are ...
smachs's user avatar
  • 236
0 votes
1 answer
655 views

How correctly handle toggle effect in List.js list with pagination

I have an issue with the behavior of toggle on click when I include pagination management in List.js. The effect works properly first, but when I navigate to page 2 then back to page one, toggle ...
elalaouifaris's user avatar
2 votes
1 answer
82 views

How to expand single statement for multiple statements in success function

I'm trying to turn the results of a route from my API into a searchable list the whole process of obtaining data via AJAX is completed, I can print data on my front end but only 1 result from my list ...
smachs's user avatar
  • 236
0 votes
1 answer
2k views

List.js Dropdown Filter - How to reset to initial state?

I have the dropdown filter working properly but I'd like to offer an All value that refreshes the list items and shows the initial state (all list items being visible). I have a button that does this ...
4ndy's user avatar
  • 448
0 votes
1 answer
1k views

How to use List.JS with Vue + Axios?

I have used List.JS before successfully, but this time I'm trying to use it with a Vue.JS rendering of a list from JSON data. I have a button at the top that when clicked should show only the QB ...
4ndy's user avatar
  • 448
0 votes
1 answer
396 views

Filter with dropdown <select> instead of radio buttons

I'm trying to filter by select dropdown using List.js My example is working fine with radio buttons. But I would like to replace them with a select list. I tried changing this html <label> &...
Simon Kartäuser's user avatar
1 vote
1 answer
2k views

How to search from two or more lists using list.js

I want to ask that how can I retrieve filtered results from two or more list using list.js Let me explain using pictures: Here's my HTML: <div id="SearchBarContainer" class="col l10 offset-l1"&...
Zaryab Waseem's user avatar
2 votes
1 answer
362 views

How pull innerHTML of element created by javascript function

Question: I have a div element with id of "tableholder" which is purely to hold the output on a javascript function that pulls data via ajax from a PHP file. Within the tableholder element, is a ...
Petay87's user avatar
  • 1,753
1 vote
1 answer
163 views

Why isn't list.js working when I click the button when I am trying to sort my list

Here is my code. I do not know what I am missing. I went to the list.js documentation and I followed every step. I even went to jfiddle and did an example and it worked. I think I am doing ...
J. Portilla's user avatar
0 votes
1 answer
859 views

Prevent auto search / add a search button List.js

This should be a straightforward problem but I haven't found the solution anywhere on the list.js documentation. How do I go about preventing the list from auto searching as I type in the search field ...
Taylor's user avatar
  • 365
1 vote
1 answer
75 views

Function sorting list by 3 columns and initiating it with a modification

I have a table to be sorted. It has currently 3 columns: currencyTd | accountNoTd | checkboxTd I would like to sort it firstly by currency, then by checkbox (the checked ones to top) and lastly ...
Hubert Kubiak's user avatar
0 votes
1 answer
862 views

list.js have separate search inputs

I am using list.js to search a list with at least two search inputs. I want to have separate search inputs for each of the columns. My issue is that each of the search boxes search all the assigned ...
Keith Power's user avatar
  • 14.1k
1 vote
1 answer
4k views

Filter a list using min and max values

Im using list.js and i've looked at the api which can be found here. I still can't figure out how to get my min and max price filters to only displays results if they fit between the two ranges. This ...
JMendez's user avatar
  • 37
1 vote
2 answers
3k views

How to write sort function for List.js?

I use list.js to make a simple sorting of my table's data. Sorting functionality works fine but I want to modify it's initial behaviour. When an user sees the table for the first time he/she should ...
Hubert Kubiak's user avatar
1 vote
1 answer
4k views

On page load change input value and trigger

I am using list.js. When the page loads I would like to change the search bars value to "newvalue" and then trigger the search. What should happen is that no list items appear because nothing matches ...
JMendez's user avatar
  • 37
0 votes
1 answer
2k views

List.js example not working

I'm trying to replicate the example on the List.js page, to create a new list. I copy and pasted the code on the example, but I'm getting an error on the .js library file. Here's the code: HTML: &...
tsuo euoy's user avatar
  • 139
4 votes
1 answer
3k views

Getting a prev/next | first/last button to work with list.js

I am building a paginated index with search. I have the index paginated and working, however I want to add a prev/next and a first/last button because this has to be scalable. List.JS does not seem ...
knocked loose's user avatar
1 vote
1 answer
148 views

Creating Links in List.js

I'm using List.js to generate lists (obviously), however I'm having trouble creating links inside of the list items. Here's my code so far -- <script> var options = { valueNames: [ '...
BrettJ's user avatar
  • 1,226
0 votes
1 answer
432 views

callback not working in a draggable list with list.js

Im trying to create a draggable list with list.js but when I try to edit, add or delete an item nothing happen, I guess is something with the callbacks but I cant find the solution. this is my html: ...
Ultimated's user avatar