title: Span value using Ajax
body: <p>Hello i try to display a price form an AJAX call, i putted an input just to check if you get the price and it's work but i can't display the price result on a span. </p>
  
  <p>{{$product->price}} have default value but it's change depending the size, i would like to display the result also in the space and hide the input. </p>
  
  <p>someone knows how to do that ? </p>
  
  <p><a href="https://i.stack.imgur.com/axfpZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/axfpZ.png" alt="enter image description here"></a></p>
  
  <p>Here my html : </p>
  
  <pre><code>&lt;input type="text" placeholder="{{$product-&gt;price}}"value="{{$product-&gt;price}}"&gt;
    &lt;div id="price"&gt;
      &lt;span class="text-muted text-normal" id="price"&gt; {{$product-&gt;price}}€&lt;/span&gt;
    &lt;/div&gt;
  &lt;input type="hidden" name="price" id="price" value="{{$product-&gt;price}}" /&gt;
  </code></pre>
  
  <p>Here my javascript : </p>
  
  <pre><code>&lt;script&gt;
    $('#size').change(function () {
  
      $.ajax({
          type: 'GET',
          url : '../{{$product-&gt;id}}/ballons-entrainement/size-price',
          dataType: "json",
          data : {
              size : document.getElementById('size').value
          },
  
          success:function(data){
              console.log(data);
              $('input').attr('value', data.price);
          }
      });
    });
  &lt;/script&gt;
  </code></pre>