浏览代码

this by class binding for root item

Ivan Asmer 7 年之前
父节点
当前提交
992a009854
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      static/nb.js

+ 1 - 1
static/nb.js

@@ -56,7 +56,7 @@ function nbInit(a,b){
             var items = searchElement(root, selector);
             for (var i=0,item=items[i];i<items.length;i++,item=items[i]){
                 if (direction == "write" &&  Array.isArray($s[selector]) && (item.children.length == 0 || (items.length == $s[selector].length && items.length > 1))){
-                    callback(item, $s, selector, $s[selector][i]);
+                    callback(item, $s, selector, $s[selector][i], undefined, true);
                 }
                 else {
                     var res = callback(item, $s, selector);