What is the most efficient way to create HTML elements using jQuery?

后端 未结 12 2612
甜味超标
甜味超标 2020-11-22 06:40

Recently I\'ve been doing a lot of modal window pop-ups and what not, for which I used jQuery. The method that I used to create the new elements on the page has overwhelming

12条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 07:02

    Someone has already made a benchmark: jQuery document.createElement equivalent?

    $(document.createElement('div')) is the big winner.

提交回复
热议问题