Sha256: fa4b56f47b10b7e352f0acfd1d094369bd9535cb80f7d7fa1d43e033c2905bdb
Contents?: true
Size: 753 Bytes
Versions: 24
Compression:
Stored size: 753 Bytes
Contents
(function(ko, $) { "use strict"; ko.bindingHandlers.activity = { init: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { var $element = $(element), activityState = ko.unwrap(valueAccessor()); $element.activityButton(); }, update: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { var $element = $(element), activityState = ko.unwrap(valueAccessor()); if (activityState && !$element.activityButton().active()) { $element.activityButton().on(); } else if (!activityState && $element.activityButton().active()) { $element.activityButton().off(); } } }; })(ko, $);
Version data entries
24 entries across 24 versions & 1 rubygems