87,991
社区成员
发帖
与我相关
我的任务
分享blind:
mode:值为hide/show
direction:值为vertical/horizontal
bounce:
direction: 值为up/down/left/right
distance: 值为数值,默认为20
times: 值为数值,默认为5
duration:值为数值,每个弹跳的速度,默认值250ms
clip:
mode:值为show/hide
direction:值为vertical/horizontal
drop
direction: 值为left/right/top/down
mode: 值为show/hide
distance:值为数值。
explode
pieces: 值为数字,爆炸的块数。默认为9
mode: 值为show/hide/toggle
fade
mode: 值为show/hide
fold
mode:值为show/hide
size: 值为数值,折叠的大小,默认为15
horizFirst:bool值,是否先水平方向折叠
highlight
mode: 值为show/hide
color: 值为颜色值,默认为#ffff99
pulsate
mode:值为show/hide
times:值为数值,跳动的次数
puff
mode:值为show/hide
percent: 值为数值,膨胀的比例,默认为150
scale
mode:值为show/hide
percent: 值为数值
direction:vertical/horizontal/both
origin:原始大小
from: 效果开始的大小
size
mode:值为show/hide
restore: bool类型,默认false
scale:vertical/horizontal/both
origin:原始大小
from:从一定的高度和宽度开始
to:到一定的高度和宽度结束
shake
mode:值为show/hide
direction: 值为left/right/up/down,默认值left
distance: 值为数字,默认值20
times:值为数字
duration:每次效果的速度
slide
mode:值为show/hide
direction: 值为left/right/up/down
distance: 值为数值
transfer
to:目标jQuery对象
className: 需要添加的css样式名称.function runEffect() {
// get effect type from
var selectedEffect = $("#effectTypes").val();
// most effect types need no options passed by default
var options = {};
// some effects have required parameters
if (selectedEffect === "scale") {
options = {
percent: 0
};
} else if (selectedEffect === "transfer") {
options = {
to: "#button",
className: "ui-effects-transfer"
};
} else if (selectedEffect === "size") {
options = {
to: {
width: 200,
height: 60
}
};
}
// run the effect
$("#effect").effect(selectedEffect, options, 500, callback);
};