Change label

Asked

Viewed 5,066 times

1

The JQuery below is not changing the html of label:

<script src="_global/_js/jquery-2.1.4.min.js"></script>

<label id="precoSedex">0.00</label>
   <input type="radio" name="pgtoTipo" value="40010" required />SEDEX

<label id="precoPac">0.00</label>
   <input type="radio" name="pgtoTipo" value="41106" />PAC

<script>
 $("#precoPac").html = 41.51;
 $("#precoSedex").html = 48.71;
</script>

Is it because?

Note: The library JQuery being successfully included in the first line and without error in the console.

1 answer

2


Try it this way:

 <script>
 $("#precoPac").html(41.51);
 $("#precoSedex").html(48.71);
</script>
  • 1

    Thank you: tiredness with lack of attention!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.