I\'m trying to use inarray but its always returning true? Any ideas? (all li\'s are showing)
$(\"#select-by-color-list li\").hide();
// get the select
var $
ES6 to the rescue! Although not jQuery I thought worth answering for future readers...
ES6 introduces .includes() which works as you think $.inArray SHOULD work:
const myArray = ["a", "b", "c"];
console.log(myArray.includes("a")) /* true */
console.log(myArray.includes("d")) /* false */
Array.prototype.includes()