I’m playing around with jQuery Isotope and want to implement an element search. When the user types into a text box, I change the filter option like this:
var newFilter = '[data-myAttr*="' + $('#mySearchBox').val() + '"]';
$('#myIsotopeContainer').isotope({filter: newFilter});
I’m using jQuery’s attribute contains selector. But it’s case-sensitive, and I want to be case-insensitive. How can I accomplish this?
I’ve looked at other questions and Google results that suggest using .filter(fn), but I don’t have that much control with isotope. I just give it a selector.
use lower case as protocol for all attributes and then change user input to lowercase