I have the following custom binding based on Ryan Niemeyer's blog but I was it doesn't work. Instead of fading him the div just doesn't show at all. I tried adding the "init" function but that did not resolve the issue so I went back to just the simple update function like Ryan has it in the example.
ko.bindingHandlers.fadeInIf = {
update: function(element, valueAccessor) {
ko.bindingHandlers.if.update(element, valueAccessor);
$(element).fadeIn();
}
};
in the html I do the following:
<div data-bind="fadeInIf: show">...</div>
Blog post: http://www.knockmeout.net/2011/07/another-look-at-custom-bindings-for.html