為什么在頁面沒有效果?
$.Velocity.RegisterEffect('lixin.pulse', {
? defaultDuration:300,
? calls: [
? ? ?[{scalex:2.1},0.5],
? ? ?[{scalex:1.0},0.5]
? ]
?});
?$('#div3').on('mouseover',function(){
? $(this).velocity('lixin.pulse');
?});
$.Velocity.RegisterEffect('lixin.pulse', {
? defaultDuration:300,
? calls: [
? ? ?[{scalex:2.1},0.5],
? ? ?[{scalex:1.0},0.5]
? ]
?});
?$('#div3').on('mouseover',function(){
? $(this).velocity('lixin.pulse');
?});
2017-05-20
舉報
2017-05-30
// "callout.customPulse" 只是示例,可以隨便命名 比如"superSlide"
$.Velocity.RegisterEffect("callout.customPulse", { ? ?defaultDuration: 900, ? ?calls: [ ? ? ? ?[ { scaleX: 1.5 }, 0.50 ], // 0.50 為 動畫總時間的50% ? ? ? ?[ { scaleX: 1 }, 0.50 ] ? ?] });
// 調用
$element.velocity("callout.customPulse");
你沒有調用函數