I am working on a new project that uses js knockout. I set up a small table that displays images and information entered into a form that fills the observed array. I have images wrapped with a link tag and I upload it to href via KO data binding. See below.
<a data-bind="attr: {href: imgUrl}" target="_blank"><img class="imgThumb" data-bind="attr: {src: imgUrl}"/></a>
All of this displays as expected, but none of the links actually move to the location of the image.
The array entry is as follows:
col1: 'Bert', col2: 'Muppet', col3: 'Sesame Street', imgUrl: 'http://images3.wikia.nocookie.net/__cb20101210195428/muppet/images/4/40/Bert1970s.jpg'
The HTML presented is as follows:
<a data-bind="attr: {href: imgUrl}}" target="_blank" href="http://images3.wikia.nocookie.net/__cb20101210195428/muppet/images/4/40/Bert1970s.jpg"><img class="imgThumb" data-bind="attr: {src: imgUrl}" src="http://images3.wikia.nocookie.net/__cb20101210195428/muppet/images/4/40/Bert1970s.jpg"></a>
Once again, none of my links work, they will not jump to the image location as I expect. Can someone help me here and point out what I am missing. In addition, note, I also tried to add click: function(){ return true; } click: function(){ return true; } , and that didn't help either. Thanks in advance, and the demo can be found here: http://dev.voidbase.com/working.html
source share