jquery .html() vs div creation
- by Argiropoulos Stavros
Hello
Lets say i have a div
<div id='myDiv'></div>
If i do: $('#myDiv').html('<div id='mySecondDiv'></div>') is it the same as
var mySecondDiv=$('<div></div>');
$('myDiv').add(mySecondDiv);
I'm pretty sure i have syntax errors but you get the idea.Are the two methods same?