Explorar el Código

Plugin-correct use of 'this'

Herbert Vojčík hace 10 años
padre
commit
7baa69aa86
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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) {