Skip to content

Commit

Permalink
Updated backbone.stickit.js
Browse files Browse the repository at this point in the history
Updated backbone.stickit.js method updateViewBindEl so that radio button selector on value uses a quoted string to reduce possibility for errors in naming value naming conventions.
  • Loading branch information
jthoms1 committed Dec 21, 2012
1 parent eceb0b6 commit bf1cc47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backbone.stickit.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
// Don't update the view if `updateView` returns false.
if (!evaluateBoolean(view, config.updateView, val)) return;

if (isRadio($el)) $el.filter('[value='+val+']').prop('checked', true);
if (isRadio($el)) $el.filter('[value="'+val+'"]').prop('checked', true);
else if (isCheckbox($el)) $el.prop('checked', !!val);
else if (isInput($el) || isTextarea($el)) $el.val(val);
else if (isContenteditable($el)) $el.html(val);
Expand Down Expand Up @@ -345,4 +345,4 @@
});
};

})(window.jQuery || window.Zepto);
})(window.jQuery || window.Zepto);

0 comments on commit bf1cc47

Please sign in to comment.