title: Strange Jquery-mobile issues
body: <p>I have tried a lot on this code but it keeps messing up. The problems: </p>
  
  <ul>
  <li>when you click on the +/- 2 is added/subtracted instead of one; the method is called twice for some reason</li>
  <li>when you click submit, the +/- functionality simply doesn't work anymore</li>
  </ul>
  
  <p>I cannot find the problem and before I submit a bug to jquery-mobile, I would first like to know if i'm not doing something very stupid. </p>
  
  <p>When I remove the jquery-mobile .js file, everything works perfectly fine, but with it doesn't work. </p>
  
  <p>After submit the url show the #bang in the url and when that's there, it stops working. </p>
  
  <p>Code: </p>
  
  <pre><code>&lt;html&gt; 
  &lt;head&gt; 
  &lt;meta charset="utf-8"&gt; 
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; 
  &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css" /&gt;
  &lt;script src="http://code.jquery.com/jquery-1.6.2.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"&gt;&lt;/script&gt; 
  &lt;/head&gt; 
  &lt;body&gt; 
  &lt;div data-role="page" id="home"&gt; 
  &lt;div data-role="content"&gt;
  &lt;form method="post"&gt; 
  &lt;a id="minus" href="#"&gt;-&lt;/a&gt; 
  &lt;input type="text" id="value" name="days" value="1" /&gt; 
  &lt;a id="plus" href="#"&gt;+&lt;/a&gt; 
  &lt;script&gt; 
  $('#home').live('pagecreate',function(event){
  
      var valueElement = $('#value');
      function incrementValue(e){
          valueElement.val(Math.max(parseInt(valueElement.val()) + e.data.increment, 0));
          return false;
          }
  
      $('#plus').bind('click', {increment: 1}, incrementValue);
  
      $('#minus').bind('click', {increment: -1}, incrementValue);
  
      });
  &lt;/script&gt; 
  &lt;input type="submit" value="submit" /&gt;
  &lt;/div&gt;&lt;/div&gt; 
  &lt;/form&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>Edit: changed it to match the mobile framework better, with the below comments added into there. Fixes problem one; the double calling of the method, however the second problem; after submit it stops working. </p>
  
  <p>Phill's answer works and strangely enough it works always like this; </p>
  
  <pre><code>                                      var inputs = $("input[type='text']");
  
                                          for(i=0;i&lt;inputs.length;i++) {
                                                  if (inputs[i].getAttribute("id") == "value") {
                                                          inputs[i].value = currentValue;
                                                  }
                                          } 
  </code></pre>
  
  <p>If I directory select the element, it doesn't work after submit; does anyone know the explanation of that? </p>