fd434ad2 by Michael Richards

Use jQuery's .val(…) in the value binder's routine function if window.jQuery is …

…present. [Closes #133]
1 parent 790f145e
......@@ -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()
......