I am desperately trying to make the filtering work with multiple keywords. Somehow it doesnt work as expected. For example the keyword combination: laurene maria works but laurene maria ben or laurene ben or laurene clara and so on does not work. What have I dont wrong?
http://fiddle.jshell.net/7t8mgont/18/
var $quicksearch = $('#quicksearch').keyup( debounce( function() {
qsRegex = new RegExp( $quicksearch.val(), 'gi' );
$container.isotope({
filter: function() {
return qsRegex ? $(this).text().match( qsRegex ) : true;
}
});
}) );
Above is the essential section of the entire code. I also added a fully functional JSFiddle for you.
I would appreciate some insight.
Edit: I was thinking of str.split(" "); not sure though. My implementation didnt work