|
@ -38,22 +38,6 @@ String.prototype.endsWith = function (search) {
|
38
|
38
|
// Declared outside of scope to maintain an accurate count.
|
39
|
39
|
var uniqueId = 0;
|
40
|
40
|
|
41
|
|
// Provide a unique identifier to an element if one has not already been assigned.
|
42
|
|
// @return {Object} modified jQuery objects
|
43
|
|
$.fn.analyticsUniqueId = function () {
|
44
|
|
if (this.length == 0) {
|
45
|
|
return;
|
46
|
|
}
|
47
|
|
|
48
|
|
return this.each(function () {
|
49
|
|
if (!$(this).attr("id")) {
|
50
|
|
$(this).attr("id", "analytics-id-" + ++uniqueId);
|
51
|
|
}
|
52
|
|
});
|
53
|
|
};
|
54
|
|
})(jQuery);
|
55
|
|
|
56
|
|
(function ($) {
|
57
|
41
|
// Default settings which may be extended upon.
|
58
|
42
|
var settings = {
|
59
|
43
|
attributes: [],
|
|
@ -146,6 +130,20 @@ String.prototype.endsWith = function (search) {
|
146
|
130
|
});
|
147
|
131
|
}
|
148
|
132
|
};
|
|
133
|
|
|
134
|
// Provide a unique identifier to an element if one has not already been assigned.
|
|
135
|
// @return {Object} modified jQuery objects
|
|
136
|
$.fn.analyticsUniqueId = function () {
|
|
137
|
if (this.length == 0) {
|
|
138
|
return;
|
|
139
|
}
|
|
140
|
|
|
141
|
return this.each(function () {
|
|
142
|
if (!$(this).attr("id")) {
|
|
143
|
$(this).attr("id", "analytics-id-" + ++uniqueId);
|
|
144
|
}
|
|
145
|
});
|
|
146
|
};
|
149
|
147
|
|
150
|
148
|
// Plug-in function providing easy access to analytics.
|
151
|
149
|
// @param {Object} options
|