Search code examples
javascriptlist.js

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 for list

var options = { 
  valueNames = ['date', 'number'] 
};
var ResultDiv = new List('ResultDiv', options);

Solution

  • try with:

    var options = { 
      valueNames : ['date', 'number'] 
    };
    var ResultDiv = new List('ResultDiv', options);