Answers for "jquery replace html in a div"

6

jquery replace element

$("elementsSelector").replaceWith( "<h2>New content</h2>" );
Posted by: Guest on May-07-2020
9

jquery replace html

$(element).html("Hello World");
Posted by: Guest on March-16-2020
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

Browse Popular Code Answers by Language