i was reading way out to attach mouse over and out with Knockoutjs and then i got a page http://knockoutjs.com/documentation/event-binding.html
from here i got a code for attaching mouse over and out with event binding in Knockoutjs. i try to paste the code in jsfiddle and try to run but nothing happen when i run the code. here is the jsfiddle link https://jsfiddle.net/tridip/6u4veobj/
<div>
<div data-bind="event: { mouseover: enableDetails, mouseout: disableDetails }">
Mouse over me
</div>
<div data-bind="visible: detailsEnabled">
Details
</div>
</div>
var viewModel = {
detailsEnabled: ko.observable(false),
enableDetails: function() {
alert('over');
this.detailsEnabled(true);
},
disableDetails: function() {
alert('out');
this.detailsEnabled(false);
}
};
ko.applyBindings(viewModel);
just tell me why the mouseover and mouseout is not working ??
--
You received this message because you are subscribed to the Google Groups "KnockoutJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knockoutjs+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.