0
Just logical
var a = $ ("<div></div>").text("Hi"); $("#demo").before(a);
1 Resposta
+ 2
I don't use JQuery, but I don't think that "<div></div>" is a valid selector to give at argument of $() function, and neither the correct way to create a new <div> element ^^