title: if input contains any word in array
body: <p>I have an input and I want to know if any of the values in my array exist.  For a simple example my array is </p>
  
  <pre><code>var _array = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
  </code></pre>
  
  <p>I've figured out how to trigger it if I type simply 'sun' for example, but I want to know if 'hhsun' or 'sunee' exist too. </p>
  
  <pre><code>$('input').keyup(function() {
      var _val = $(this).val();
      $('p').text(_val);
  
      var _array = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
  
      if (_array.indexOf(_val) != -1) {
          $('span').text('it worked');
      } else {
          $('span').text(_array.indexOf(_val));
      } 
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/nosfan1019/WLacb/1/" rel="nofollow">fiddle</a></p>