title: Selector is not working in jquery
body: <p>Hi I've HTML code which is </p>
  
  <pre><code>&lt;div id="testing"&gt;&lt;/div&gt;
  &lt;input type="text" name="amount[]" id="amount_1" value="800"&gt;
  &lt;input type="text" name="date[]" id="date_1" value="12/05/2015"&gt;
  &lt;input type="text" name="notes[]" id="notes_1" value="This is test notes"&gt;
  
  &lt;hr /&gt;
  &lt;hr /&gt;
  
  &lt;hr /&gt;
  &lt;hr /&gt;
  
  &lt;input type="text" name="amount[]" id="amount_2" value="1500"&gt;
  &lt;input type="text" name="date[]" id="date_2" value="12/10/2015"&gt;
  &lt;input type="text" name="notes[]" id="notes_2" value="Towing amount paid Order ID 000000001"&gt;
  
  &lt;hr /&gt;
  &lt;hr /&gt;
  
  &lt;hr /&gt;
  &lt;hr /&gt;
  
  &lt;input type="text" name="amount[]" id="amount_3" value="1600"&gt;
  &lt;input type="text" name="date[]" id="date_3" value="12/09/2015"&gt;
  &lt;input type="text" name="notes[]" id="notes_3" value="Towing amount paid Order ID 000000002"&gt;
  </code></pre>
  
  <p>Now I want to search a value in my notes fields which is <code>Towing amount paid Order ID 000000001</code> and I want to empty these fields and my javascript/jquery code is</p>
  
  <pre><code>$(document).ready(function() {
       if($("input[name^=notes]").val().indexOf("Towing amount paid Order ID ") &gt; -1) {
           $("#testing").text('found it');
           /*var current = $("input[name^=notes]");
           var onePrevious = $(current).prev();
           var twoPrevious = $(current).prev().prev();
           current.attr('value', '');
           onePrevious.attr('value', '');
           twoPrevious.attr('value', '');*/
       } else {
           $("#testing").text('not found');
       }
  });
  </code></pre>
  
  <p>But this code is giving me <code>not found</code> message what is wrong in my code I've tried different selectors but didn't work for me.</p>