title: Can I data-bind an element's width only if the element has a specific css class?
body: <p>I want to data-bind the width of a Div element to a property of the viewModel, but only if the  Div has a specific css class.</p>
  
  <p>So something like this:</p>
  
  <p><code>&lt;div data-bind="style: {width : $element.hasClass('dynamicWidth') ? getWidth : ''}"&gt;</code></p>
  
  <p>Anyone know if there is a way to do this?</p>