title: Get value after changing input value with jQuery?
body: <p>This is my script that after changing input value should send it to php file with Ajax.But it's sending the actual value from input field which is set via php.How can i set the new value to be given?     </p>
  
  <pre><code>var idg;
  var newg;
  
  $('input.readonly').live("click",
      function() {
      $(this).attr('readonly', false);
      idgs=$(this).attr('id');
      newg=$(this).attr('value');
  
      $(this).change(function(){
          $.ajax({
            type:'POST',
            url: 'new.php',
            data: "idgs="+ idgs +"&amp;newg="+ newg,
            success: function(data) { $('.right').html(data); }
          });
      })
  }); 
  </code></pre>