diff --git a/knockout.activity.js b/knockout.activity.js index 19d73d4..25fd636 100644 --- a/knockout.activity.js +++ b/knockout.activity.js @@ -15,14 +15,8 @@ throw 'Knockout is required, please ensure it is loaded before loading the activity plug-in'; } - var defaultOptions = { - activityClass: 'fa fa-spinner fa-spin', - container: 'i', - inactiveClass: '' - }; - function getOptions(overrides) { - var options = ko.utils.extend({}, defaultOptions); + var options = ko.utils.extend({}, ko.bindingHandlers.activity.defaultOptions); return ko.utils.extend(options, overrides); } @@ -55,4 +49,10 @@ } } }; + + ko.bindingHandlers.activity.defaultOptions = { + activityClass: 'fa fa-spinner fa-spin', + container: 'i', + inactiveClass: '' + }; }));