Permalink
Browse files

optimization for old IEs.

  • Loading branch information...
1 parent 7f0dbb4 commit ac223074d4d1702c99b44d6e30c9f622ef1a7be9 @atsumu committed Apr 3, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 jquery.ptmpl.js
View
@@ -63,13 +63,13 @@ try {
function ptmplFn(data, option) {
if (!$.isArray(data)) data = [data];
- var text = "";
+ var text = [];
var template = this[0];
$.each(data, function() {
- text += $.ptmplGetCompiled(template, option)(option, this);
+ text.push($.ptmplGetCompiled(template, option)(option, this));
});
var el = document.createElement('div');
- el.innerHTML = text;
+ el.innerHTML = text.join('');
return $(makeArray(el.childNodes));
}

0 comments on commit ac22307

Please sign in to comment.