|
6 | 6 | (function (window, document, Element, undefined) {
|
7 | 7 | 'use strict';
|
8 | 8 |
|
| 9 | + var prev_$ = window.$, |
| 10 | + DATAKEYPROP = '__jqlight_data__', |
| 11 | + matches = Element.matches || Element.matchesSelector || Element.mozMatchesSelector || Element.msMatchesSelector || Element.oMatchesSelector || Element.webkitMatchesSelector; |
| 12 | + |
9 | 13 | function Wrapper(collection) {
|
10 | 14 | if (collection) {
|
11 | 15 | for (var i = 0, length = collection.length; i < length; i++) {
|
|
28 | 32 | length: 0
|
29 | 33 | };
|
30 | 34 |
|
31 |
| - $.fn.extend = $.extend = function (target) { |
32 |
| - var options, name, copy, i = 0, length = arguments.length; |
33 |
| - if (length <= 1) { |
34 |
| - target = this; |
35 |
| - } else { |
36 |
| - i = 1; |
| 35 | + $.fn.extend = $.extend = function () { |
| 36 | + var options, name, copy, target = this, i = 0, length = arguments.length; |
| 37 | + if (length > 1) { |
| 38 | + target = arguments[i++]; |
37 | 39 | }
|
38 | 40 | for (; i < length; i++) {
|
39 | 41 | options = arguments[i];
|
|
47 | 49 | return target;
|
48 | 50 | };
|
49 | 51 |
|
50 |
| - var prev_$ = window.$; |
51 |
| - window.$ = $; |
52 |
| - |
53 | 52 | $.extend({
|
54 | 53 | noConflict: function () {
|
55 | 54 | window.$ = prev_$;
|
|
105 | 104 | }
|
106 | 105 | });
|
107 | 106 |
|
108 |
| - var DATAKEYPROP = '__jqlight_data__'; |
109 | 107 | $.fn.extend({
|
110 | 108 | each: function (callback) {
|
111 | 109 | $.each(this, function (index, elem) {
|
|
207 | 205 | }
|
208 | 206 | });
|
209 | 207 |
|
| 208 | + window.$ = $; |
| 209 | + |
210 | 210 | function eachClass(obj, value, callback) {
|
211 | 211 | var classes = ( value || '' ).match(/\S+/g) || [],
|
212 | 212 | elem, cur, clazz, j, origValue, finalValue,
|
|
229 | 229 | return obj;
|
230 | 230 | }
|
231 | 231 |
|
232 |
| - var matches = Element.matches || Element.matchesSelector || Element.mozMatchesSelector || Element.msMatchesSelector || Element.oMatchesSelector || Element.webkitMatchesSelector; |
233 |
| - |
234 | 232 | function delegateHandler(selector, handler, event) {
|
235 | 233 | var node = event.target;
|
236 | 234 | while (node && node !== this) {
|
|
0 commit comments