浏览代码

Plugin-correct use of 'this'

Herbert Vojčík 10 年之前
父节点
当前提交
7baa69aa86
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      jquery.xontent.js

+ 2 - 2
jquery.xontent.js

@@ -12,11 +12,11 @@
                 arg = arg.get(0);
             }
             if (arg instanceof DocumentFragment) {
-                $(this).data('xontent', arg);
+                this.data('xontent', arg);
             }
         }
 
-        return $(this);
+        return this;
     };
 
     function xontent(el) {