Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets-error-binder
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ed27a033
authored
2016-09-01 12:54:30 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use a jquery event namespace(rivets-error-bind) to stop listening for
all element events at once.
1 parent
20bc656b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/scripts/rivets-error-binder.js
src/scripts/rivets-error-binder.js
View file @
ed27a03
...
...
@@ -59,7 +59,7 @@ define(function(require) {
}
}
};
$
(
el
).
on
(
'focus
'
,
holder
.
focus
).
on
(
'blu
r'
,
holder
.
blur
);
$
(
el
).
on
(
'focus
.rivets-error-binder'
,
holder
.
focus
).
on
(
'blur.rivets-error-binde
r'
,
holder
.
blur
);
rivetsBinderCall
(
this
,
this
.
args
[
0
],
'bind'
,
arguments
);
render
(
el
,
'bind'
);
},
...
...
@@ -67,7 +67,7 @@ define(function(require) {
var
holder
=
this
.
validationHolder
;
render
(
el
,
'unbind'
);
$
(
this
.
validationHolder
.
marker
).
after
(
el
).
remove
();
$
(
el
).
off
(
'
focus'
,
holder
.
focus
).
off
(
'blur'
,
holder
.
blur
);
$
(
el
).
off
(
'
.rivets-error-binder'
);
if
(
holder
.
observer
.
target
)
{
holder
.
observer
.
target
.
off
(
'validated'
,
holder
.
validated
);
}
...
...
Please
register
or
sign in
to post a comment