title: jQuery Knockout run computed for each item in array
body: <p>I have a <code>ko.computed</code> function which determines if a current item from a <code>ko.observableArray()</code> is valid.</p>
  
  <p>However, the computed function doesn't gets executed for each item in the array</p>
  
  <p><a href="http://jsfiddle.net/79nuW/1/" rel="nofollow">jsfiddle</a></p>
  
  <p>JavaScript:</p>
  
  <pre><code>var viewModel = {
      items: ko.observableArray(["value 1", "value 2", "value 3"]),
  };
  viewModel.isValid = ko.computed(function() {
      // doesn't gets executed for each item
      console.log(this);
  
      return true;
  }, viewModel);
  ko.applyBindings(viewModel);
  </code></pre>
  
  <p>Html:</p>
  
  <pre><code>&lt;script type="text/html" id="item-template"&gt;
      &lt;span data-bind="css: { 'valid': $root.isValid }, text: $data"&gt;&lt;/span&gt;
  &lt;/script&gt;
  
  &lt;!-- ko template: { foreach: items, name: 'item-template' } --&gt;&lt;!-- /ko --&gt;
  </code></pre>