So today I was using the 'visible' binding and I really wanted to have some jQuery animation when the bound element was shown/hidden. A few minutes of research and I have a new binding (I _could_ have just extended the built-in one, but I didn't want to touch so that I didn't affect other areas of the application I've already built).
Just drop this javascript in a file that is loaded after the kendo javascript:
Alternatively, it'd be cool if the built-in kendo bindings that controlled element visibility would support animations natively somehow. :-)
Just drop this javascript in a file that is loaded after the kendo javascript:
kendo.data.binders.visible_animated = kendo.data.Binder.extend({
refresh:
function
() {
if
(
this
.bindings.visible_animated.get()) {
$(
this
.element).show(
'fast'
);
}
else
{
$(
this
.element).hide(
'fast'
);
}
}
});
Alternatively, it'd be cool if the built-in kendo bindings that controlled element visibility would support animations natively somehow. :-)