title: javascript search - case-insensitive
body: <p>I'm having troubles with getting this code to be case-insensitive. 
  This code is found online -  (<a href="http://jsfiddle.net/bizamajig/radzq2o2/" rel="nofollow noreferrer">http://jsfiddle.net/bizamajig/radzq2o2/</a>)</p>
  
  <pre><code> $(function(){
      // Instantiate MixItUp:
      $container = $('.cd-gallery')
      $container.mixItUp();
      $('#filter').keyup(function(){
        var val = $(this).val();
        var state = $container.mixItUp('getState');
        var $filtered = state.$targets.filter(function(index, element){
          return $(this).text().toString().indexOf( val.trim() ) &gt;= 0;
        });
  
        $container.mixItUp('filter', $filtered);
      });
    });
  </code></pre>
  
  <p>But I can't seem to get this code to be case-insensitive. 
  I've tried different things - but nothing worked. Can anyone help me? </p>
  
  <p>I need this code (above) to be case-insensitive. </p>
  
  <p>Thank you!</p>