title: Loop through input elements that id ends in
body: <p>How can I loop all input elements in JQuery and select only the inputs that the ID attribute ends in a specific name? For example see my html below: </p>
  
  <p>My html is like this</p>
  
  <pre><code>&lt;input type="text" id="a-user" value="0"/&gt;
  &lt;input type="text" id="a-amount" value="10"/&gt;
  &lt;input type="text" id="b-user" value="0"/&gt;
  &lt;input type="text" id="b-amount" value="10"/&gt;
  ......
  </code></pre>
  
  <p>I want to loop all the inputs that the id ends with <code>-amount</code> so that i can add a formatting to all those fields. </p>