How to binding event in Knockout-mvc (mouseover, mouseout, focusin, focusout)?

290 views
Skip to first unread message

Duy Nguyễn Huỳnh

unread,
Jul 23, 2013, 5:12:05 AM7/23/13
to knocko...@googlegroups.com
Hi all,

I'm getting new in knockout-mvc. In knockoutjs, I found that:

<div data-bind="event: { mouseover: enableDetails, mouseout: disableDetails }">
    Mouse over me
</div>

(You can see details in: http://knockoutjs.com/documentation/event-binding.html)

My question:
In knockout-mvc, how can I do that?

Thanks for your answers!

Patrick Yee

unread,
May 3, 2015, 1:26:03 AM5/3/15
to knocko...@googlegroups.com
If you read the home page, you could simply use the data-bind rather than the razor.  The C# logic is converted from code to javascript.
Reply all
Reply to author
Forward
0 new messages