title: Calling Knockout function from outside ViewModel
body: <p>In my specific example, there are several different widgets that have their own encapsulated ViewModel. I need a global Save button that saves each individual ViewModel. I can't seem to figure out how to call functions on the individual ViewModels.</p>
  
  <p>Example - how can I call the Save function on each ViewModel: <a href="http://jsfiddle.net/sNSh2/4/" rel="noreferrer">http://jsfiddle.net/sNSh2/4/</a></p>
  
  <pre><code>var ViewModel1 = function() {
      var self = this;
      self.firstName = ko.observable('');
      self.lastName = ko.observable('');
  
      self.firstName('John');
      self.lastName('Doe');
  
      self.Save = function () {
          alert(ko.toJSON(self));
      };
  };
  ko.applyBindings(new ViewModel1(), document.getElementById("person"));
  
  var ViewModel2 = function() {
      var self = this;
      self.subscriptionLevel = ko.observable('');
  
      self.subscriptionLevel('premier');
  
      self.Save = function () {
          alert(ko.toJSON(self));
      };
  };
  ko.applyBindings(new ViewModel2(), document.getElementById("subscription"));
  
  $('#save').on('click', function() {
  
  });
  </code></pre>