I’ve got 2 ways I can create a <div>
using jQuery
.
Either:
var div = $("<div></div>");
$("#box").append(div);
Or:
$("#box").append("<div></div>");
What are the drawbacks of using second way other than re-usability?
I’ve got 2 ways I can create a <div>
using jQuery
.
Either:
var div = $("<div></div>");
$("#box").append(div);
Or:
$("#box").append("<div></div>");
What are the drawbacks of using second way other than re-usability?