title: jquery attr() not working on mobile - Android - Chrome
body: <p>I'm trying to make an input be enabled/dsabled if an input type text is either empty or not. Here is my jQuery code:</p>
  
  <pre><code>$(document).on('keyup', '#searchString', function(){
      searchString = $('#searchString');
     if(searchString.val().length &gt; 0){
          $('#cmdSearch').attr('disabled', false);
      }
      else{
          $('#cmdSearch').attr('disabled', true);
      }
  });
  </code></pre>
  
  <p>And here is the relevant HTML node: </p>
  
  <pre><code>&lt;div class="form-wrapper"&gt;
       &lt;form method="post" class="res-form" role="form"&gt;
       &lt;input type="text" name="searchString" id="searchString" autocomplete="off" aria-autocomplete="none" class="form-control input-lg" placeholder="busca artículos, screencasts o demos"&gt;
       &lt;div style="height: 15px;"&gt;&lt;/div&gt;
       &lt;button type="submit" name="cmdSearch" disabled="true" id="cmdSearch" class="btn btn-block btn-lg btn-success"&gt;Buscar&lt;/button&gt;
       &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It works on desktop, though it doesn't on mobile. Any ideas why?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I found something interesting, it does work, the problem is, that once I wipe out all the text from the input, let's say the input has a <code>.val()</code> of <code>"foo"</code> and I delete the <code>"foo"</code>, I still have to press <code>backspace</code> once more so that the script takes action, this is happening on Android, on Chrome. This seems weird, any fix for this?</p>