title: binding not working in knockout JS
body: <p>HTML code.</p>
  
  <pre><code>&lt;ul id="cat-list" data-bind="foreach: catList()"&gt;
      &lt;li data-bind="text: name, click: $parent.setCurrentCat"&gt; &lt;/li&gt;
  &lt;/ul&gt;
  &lt;div id="cat" data-bind="with: currentCat()"&gt;
  
      &lt;h2 data-bind="text: name" id="cat-name"&gt;&lt;/h2&gt;
  
      &lt;div data-bind="text: clickCount" id="cat-count"&gt;&lt;/div&gt;
      &lt;img src="" data-bind="click: $parent.incrementCount, attr: {src: imgSrc}" id="cat-img" alt="cute cat"&gt;
      &lt;h4&gt;NickNames&lt;/h4&gt;
      &lt;ul data-bind="foreach: nickNames"&gt;
          &lt;li data-bind="text: $data"&gt;&lt;/li&gt;
      &lt;/ul&gt;
  
  &lt;/div&gt;
  &lt;script src="js/lib/knockout-3.2.0.js"&gt;&lt;/script&gt;
  &lt;script src="js/app.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>The JS code:</p>
  
  <pre><code>var ViewModel = function() {
       var self = this;
  
      this.catList = ko.observableArray([]);
      initialCats.forEach(function(catItem) {
          self.catList.push( new Cat(catItem) );
      });
  
      this.currentCat = ko.observable( this.catList()[0]);
  
      this.incrementCount = function(){
          self.currentCat().clickCount(self.currentCat().clickCount()+1);
      };
      this.setCurrentCat = function(cat) {
  
      self.currentCat = ko.observable(cat);
      console.log(self.currentCat);
  }
  
  var Cat = function(data) {
      this.clickCount = ko.observable(data.clickCount);
      this.name = ko.observable(data.name);
      this.imgSrc = ko.observable(data.imgSrc);
      this.imgAttribution = ko.observable(data.imgAttribution);
      this.nickNames = ko.observable(data.nickNames);
  }
  
  ko.applyBindings(new ViewModel())
  </code></pre>
  
  <p>The initialCats in ViewModel is an array with all cat information.
  An example element of catlist is</p>
  
  <pre><code>{
      clickCount: 0,
      name: 'Tabby',
      imgSrc: 'tabby.jpg',
      imgAttribution: 'Aman',
      nickNames: ['Tabtab', 'T-bone', 'Mr. T', 'Tabitha Tab Tabby']
  }
  </code></pre>
  
  <p>Althouch clicking on the li elements change the current cat but the corresponding view is not rendered. And the default cat (the first cat) in only rendered. Did i miss something. ?</p>