Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets
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
fd434ad2
authored
2013-04-07 17:04:40 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use jQuery's .val(…) in the value binder's routine function if window.jQuery is …
…present. [Closes #133]
1 parent
790f145e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
src/rivets.coffee
src/rivets.coffee
View file @
fd434ad
...
...
@@ -313,6 +313,12 @@ Rivets.binders =
unbind
:
(
el
)
->
unbindEvent
el
,
'change'
,
@
currentListener
routine
:
(
el
,
value
)
->
if
window
.
jQuery
?
el
=
jQuery
el
if
value
?
.
toString
()
isnt
el
.
val
()
?
.
toString
()
el
.
val
if
value
?
then
value
else
''
else
if
el
.
type
is
'select-multiple'
o
.
selected
=
o
.
value
in
value
for
o
in
el
if
value
?
else
if
value
?
.
toString
()
isnt
el
.
value
?
.
toString
()
...
...
Please
register
or
sign in
to post a comment