Actions and Effects
From Documentation
[since 5.0.6]
Here we describe how to provide more effects for client-side actions.
The allowed effects are actually the names of methods defined in Actions. Thus, To add a new effect, you have to add a new method to it. For example,
zk.eff.Actions.fooIn = function (n, opts) {
//your own effect to make the node visible, such as
//zk(n).slideIn(this, opts);
};
Then, you could use it in the client-side action:
<div action="show: fooIn">
....
</div>
The signature of an effect method is as follows.
function (DOMElement n, Map opts);
where n is the DOM element to apply the action, and opts is the options specified in the client-side action.
Notice that, before invoking jQuery's effects, you shall invoke jqzk.defaultAnimaOpts(Widget, Map, Array, boolean) to prepare the initial options for animation. For example,
this.defaultAnimaOpts(wgt, opts, prop, true)
.jq.css(css).show().animate(anima, {
queue: false, easing: opts.easing, duration: opts.duration || 400,
complete: opts.afterAnima
});
Version History
Version | Date | Content |
---|---|---|
5.0.6 | December 2010 | This feature was introduced in 5.0.6 |