I use jquery to put html dynamically but it is not working…
Here is what I have tried
JavaScript
x
2
1
$("#root").innerHtml("<h1>Hello</h1>")
2
Advertisement
Answer
You should not use innerHtml
instead use html()
You can do as below
JavaScript
1
2
1
$("#root").html("<div>Hello</div>")
2