Przeglądaj źródła

Plugin-correct use of 'this'

Herbert Vojčík 10 lat temu
rodzic
commit
7baa69aa86
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      jquery.xontent.js

+ 2 - 2
jquery.xontent.js

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