title: Set data title generic ajax
body: <pre><code>  $( document ).ready(function(){
  
      $('.status-red').click(function(){
          var colonne_id = $('.status-red').attr('data-sort');
          data = {sort: colonne_id , '+name': $('.search-query').val()};
          console.log(data);
          $.ajax({
              url: $('.url_sortindex').val(),
              data: data,
              type: 'post',
              dataType: "json",
              success: function(data) {
                  $('#body_sortindex').html(data.content);
              }
          });
      });
  });
  </code></pre>
  
  <p>Hi,
  I have a search with this input. </p>
  
  <pre><code>&lt;input type="text" value="test" placeholder="name" class="input-medium search-query form-control" name="+name" style="margin-right:5px"&gt;
  </code></pre>
  
  <p>But you see the name of this input name="+name".
  My problem is, If I create a new input named "age" for example my request ajax don't work because the name is "+name". My question is, how do you set the name for example like that </p>
  
  <pre><code>data = {sort: colonne_id , $('.search-query').attr('name'): $('.search-query').val()};
  </code></pre>
  
  <p>I need to get the name of my input like that <code>$('.search-query').attr('name')</code></p>
  
  <p>And set my title here <code>data = {sort: colonne_id , '+name': $('.search-query').val()};</code></p>
  
  <p>I want to set <code>+name</code> in <code>data</code> to<code>$('.search-query').attr('name')</code>
  I don't want the name in data is + name but a variable</p>
  
  <p>I want to make my input generic.</p>
  
  <p>Thanks you ;)</p>