jquery-tmpl icon indicating copy to clipboard operation
jquery-tmpl copied to clipboard

{{each}} is slow when not wrapped with element

Open psayre23 opened this issue 13 years ago • 1 comments

http://jsfiddle.net/psayre23/982qD/

The {{each}} command is pretty slow when used with the newest forms of jQuery. In jQuery 1.5 and up the following template is very slow.

{{each elems}}
  <p>{item}</p>
{{/each}}

Right now, the fix is to wrap the {{each}} in an element:

<div>
{{each elems}}
  <p>{item}</p>
{{/each}}
</div>

The reason for this speed issue seems to be a change in how jQuery compares siblings.

psayre23 avatar May 06 '11 23:05 psayre23

Thanks for taking the time to submit this issue. Just wanted to let you know this plugin is no longer being actively developed or maintained by the jQuery team. See README for more info.

rdworth avatar Oct 08 '11 06:10 rdworth