This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ko.bindingHandlers.iCheck = { | |
init: function (element, valueAccessor) { | |
var $el = $(element); | |
var observable = valueAccessor(); | |
$el.iCheck({ | |
radioClass: 'iCheck_radio_class', | |
inheritClass: true | |
}); | |
$el.on('ifClicked', function (e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ko.subscribable.fn.subscribeChanged = function (callback) { | |
var savedValue = this.peek(); | |
return this.subscribe(function (latestValue) { | |
var oldValue = savedValue; | |
savedValue = latestValue; | |
callback(latestValue, oldValue); | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; } | |
.string { color: green; } | |
.number { color: darkorange; } | |
.boolean { color: blue; } | |
.null { color: magenta; } | |
.key { color: red; } |
NewerOlder