title: How increment with 0.5 for first increment and then with 1 using js
body: <p>i want to add 0.5 for the first increment and then with 1 and the value is starts with 0.5 ,That is i want a logic like below </p>
  
  <pre><code>if(quantity==0.5)
  $('#quantity_'+Id).val(quantity+=0.5);
  else
  $('#quantity_'+Id).val(++quantity);
  </code></pre>
  
  <p>here my original code </p>
  
  <pre><code>&lt;input type="text" id="quantity_&lt;?php echo $j ;?&gt;"  data-id="&lt;?php echo $j;?&gt;" value="&lt;?= 0.5 ?&gt;" disabled&gt; 
  </code></pre>
  
  <p>here my javascript</p>
  
  <pre><code>  $('.container').on('click','.button-plus',function () {
              var Id=$(this).data('id');
              var quantity=$('#quantity_'+Id).val();
              $('#quantity_'+Id).val(++quantity);
              calcAmount(Id);
      });
  </code></pre>