Skip to content

Instantly share code, notes, and snippets.

View thangtq1009's full-sized avatar

Thắng Trần Quyết thangtq1009

  • Vuathitruong
  • Ha Noi
View GitHub Profile
@thangtq1009
thangtq1009 / knockout.autonumeric.js
Last active September 8, 2015 04:10 — forked from bonza-labs/knockout.autonumeric.js
Knockout.js and autoNumeric.js bindings
ko.bindingHandlers.autoNumeric = function ($) {
function getElementValue(el) {
return parseFloat(el.autoNumericGet(), 10);
}
function getModelValue(accessor) {
return parseFloat(ko.utils.unwrapObservable(accessor()), 10);
}