title: Get attribute value from input text
body: <p>I want to get attribute value of each input field.</p>
  
  <pre><code>&lt;input type="text" id="qty" data-id="{{$item-&gt;rowid}}" value="{{$item-&gt;qty}}"&gt;
  
  function goUpdateCart(){
  
      $('input[type=text]').each(function(){
  
          alert($('input[type=text]').getAttribute("data-id"));
      })
  }
  </code></pre>
  
  <p>My function can't work correctly</p>