While creating self-closed elements with jQuery html() the following issue happens:
$('#someId').html('<li><input type="checkbox" /></li>')
will create
<li><input type="checkbox"></li>
It closes correctly the <li>
tag but not the <input>
It seems to be an issue from innerHTML which is used in the html() function.
I have looked everywhere and found a solution for this but the page is not available anymore as you see in: http://dev.jquery.it/ticket/3378
Anybody knows how to fix this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…