Ho creato un test case al http://jsperf.com/jquery-html-vs-empty-append-test per confrontare le prestazioni di $.html()
con $.empty().append()
. Mi sono chiesto che .empty().append()
sia più veloce.prestazioni jquery html() vs empty(). Append()
Qualcuno può spiegare questo divario di prestazioni?
Grazie.
è lo stesso in entrambi i casi. –
Ma restituisce un oggetto jquery vuoto. –