I don't think this is a tip, as jQuery docs themselves mention it. http://api.jquery.com/jquery/#example-1-1.
A tip would be something unusual, that helped an original problem.
Also, $('<div/>', { ... }) is an incredibly slow method. $( document.createElement('div'), { ... }) can be a more faster alternative.
$('<div/>', { ... })
$( document.createElement('div'), { ... })
Also, if you had reference to document in a local variable, say doc, doc.createElement would be more optimised.
document
doc
doc.createElement
I don't think this is a tip, as jQuery docs themselves mention it.
http://api.jquery.com/jquery/#example-1-1.
A tip would be something unusual, that helped an original problem.
Also,
$('<div/>', { ... })
is an incredibly slow method.$( document.createElement('div'), { ... })
can be a more faster alternative.Also, if you had reference to
document
in a local variable, saydoc
,doc.createElement
would be more optimised.