Skip to content

Commit 6c188dd

Browse files
author
Tom Hanoldt
committed
dist
1 parent a016874 commit 6c188dd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dist/jquery.input.validator.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
this.prepareElements = bind(this.prepareElements, this);
156156
this.init = bind(this.init, this);
157157
this.config = this.constructor.config;
158+
this.ns = 'inputvalidator';
158159
this.init(config);
159160
}
160161

@@ -170,31 +171,30 @@
170171
};
171172

172173
InputValidator.prototype.prepareElements = function(context) {
173-
var $elements, ns;
174+
var $elements;
174175
if (context == null) {
175176
context = null;
176177
}
177178
if (context == null) {
178179
context = this.context;
179180
}
180-
ns = 'inputvalidator';
181181
$elements = this.elementsFor(context);
182182
if (this.config.validateOnFocusOut) {
183-
$elements.off("focusout." + ns).on("focusout." + ns, (function(_this) {
183+
$elements.off("focusout." + this.ns).on("focusout." + this.ns, (function(_this) {
184184
return function(e) {
185185
return _this.validateElement(e.target);
186186
};
187187
})(this));
188188
}
189189
if (this.config.removeHintOnFocus) {
190-
$elements.off("focus." + ns).on("focus." + ns, (function(_this) {
190+
$elements.off("focus." + this.ns).on("focus." + this.ns, (function(_this) {
191191
return function(e) {
192192
return _this.resetElement(e.target);
193193
};
194194
})(this));
195195
}
196196
if (this.config.validateOnKeyUp) {
197-
$elements.off("keyup." + ns).on("keyup." + ns, (function(_this) {
197+
$elements.off("keyup." + this.ns).on("keyup." + this.ns, (function(_this) {
198198
return function(e) {
199199
if ($(e.target).data('invalid')) {
200200
return _this.validateElement(e.target);
@@ -203,7 +203,7 @@
203203
})(this));
204204
}
205205
if (this.config.validateOnClick) {
206-
return $elements.off("click." + ns).on("click." + ns, (function(_this) {
206+
return $elements.off("click." + this.ns).on("click." + this.ns, (function(_this) {
207207
return function(e) {
208208
return _this.validateElement(e.target);
209209
};

0 commit comments

Comments
 (0)