Issue in binding click event to <a> tag

2,313 views
Skip to first unread message

Nikhil Ketkar

unread,
Jan 19, 2012, 3:51:30 AM1/19/12
to knock...@googlegroups.com
Hi,

I am facing one weird issue while binding click event to anchor tag. (Knockout 2.0) The same was working fine when I was using old knockout.

Here is my code:
 <td class="style">
     @*<span data-bind="text: Name, visible: !Editing(), click: Edit" style="cursor: pointer"></span>*@
     <a href="#" data-bind="text: Name, visible: !Editing(), click: Edit"></a>
     <input type="text" data-bind="value: Name, visible: Editing"/>
 </td>

If I use span instead of a, it works fine. Can anyone please help me out in this?

Thanks,
Nikhil

rpn

unread,
Jan 20, 2012, 11:56:31 PM1/20/12
to knock...@googlegroups.com
Hello-
Can you reproduce your issue based on this fiddle: http://jsfiddle.net/rniemeyer/VpHEv/?

Reply all
Reply to author
Forward
0 new messages