title: Knockout data-bind if else condition
body: <p>In my current project, I have a knockout binding where the layout height should be applied according to the value received as true or false. Following is my binding code</p>
  
  <pre><code>data-bind="style: {height: showOld ? '392px' : '275px'}"
  </code></pre>
  
  <p>The <code>showOld</code> gives either <code>true</code> or <code>false</code> correctly, but, regardless what it returns, it always take <code>392px</code>. If the <code>showOld</code> gives <code>true</code> then <code>392px</code> should return else <code>275px</code> should return. Any help to fix this issue is highly appreciate. </p>
  
  <p>Thanks</p>