Reputation: 8424
I have this simple jQuery code:
$("p").html("A simple <strong>example</strong>");
And when I inspect this using Chrome, I get:
<p>
"A simple "
<strong>example</strong>
</p>
Why are there double quotes here? Why don't I simply get:
<p>A simple </strong>example</strong></p>
Upvotes: 0
Views: 57
Reputation: 5622
try using .append()
$("p").append("A simple <strong>example</strong>");
Upvotes: 0
Reputation: 1
Instead of .html() why dont you try .text() ? I think it fits better.
Upvotes: 0
Reputation: 6891
This is just on chrome developer tool's reflection. If you check the html page source, you should not see this double quotas. try and share with us please.
Upvotes: 3