Answers for "jquery set html inside div"

1

change html div jquery

// html
 <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2 total-price bold red"> 0  </div>

// jquery
var price = 1000;
$('.total-price').html(price);
$('.total-price').text(price);
Posted by: Guest on October-06-2021
0

jquery set html of element

$("button").click(function(){
  $("p").html("Hello <b>world</b>!");
});
Posted by: Guest on November-20-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language