Here is the fiddle- http://jsfiddle.net/gfWES/59/
When background-image will point to the location where it would not find a image, I want to show an alternate image which is located at below location- http://fancyapps.com/fancybox/demo/1_b.jpg
Ultimately, I have to achieve the above in knockout.
<td class="cell">
<div class="contact-photo" data-bind="click: $parent.onAlertClick, style: { backgroundImage: $parent.photoUrl($data) }, css: { 'has-notifications': $parent.showAlert($data)}, onerror:alert('error')"></div>
</td>
In above code- if "$parent.photoUrl($data)" points to a url where image doesn't exist, I want to point "backgroundImage:" to some other location to show any alternate image.