点击关闭按钮是出现的问题~~~请老师解答,谢谢

来源:3-4 按钮点击后的动画

Carrie_IT

2015-08-18 15:59

http://img.mukewang.com/55d2e5b10001a42214380645.jpg

点击关闭按钮时出现错误,没看懂什么意思~~~


代码附上

// JavaScript Document
(function($){
	//定义变量
	var container = $('.container');
	var box = $('.box');
	var buddy = $('.buddy');
	var pop = $('.pop');
	var open = $('.btn');
	var close = $('.close');
	var imgs = pop.find('img');
	//定义由下而上进入的动画
	$.Velocity.RegisterUI('Carrie.slideUpIn',{
		defaultDuration:500,
		calls:[
			[{opacity:[1,0],translateY:[0,100]}]
		]
	});
	//定义由上而下退出的动画
	$.Velocity.RegisterUI('Carrie.slideDownOut',{
		defaultDuration:300,
		calls:[
			[{opacity:[0,1],translateY:[100,0]}]
		]
	});
	//定义图片由小变大进入的动画
	$.Velocity.RegisterUI('Carrie.scaleIn',{
		defaultDuration:300,
		calls:[
			[{opacity:[1,0],scale:[1,0.3]}]
		]
	});
	//定义图片由大变小退出的动画
	$.Velocity.RegisterUI('Carrie.scaleOut',{
		defaultDuration:300,
		calls:[
			[{opacity:[0,1],scale:[0.3,1]}]
		]
	});
	//定义box出现的场景动画
	var seqInit = [{
		elements:container,
		properties:'Carrie.slideUpIn',
		options:{
			delay:300
		}
	},{
		elements:box,
		properties:'Carrie.slideUpIn',
		options:{
			sequenceQueue :false
		}
	},{
		elements:buddy,
		properties:'Carrie.slideUpIn',
		options:{
			sequenceQueue:false,
			delay:60
		}
	}];
	//定义box退出,pop出现的场景
	var seqClick = [{
		elements:container,
		properties:'Carrie.slideDownOut',
	},{
		elements:box,
		properties:'Carrie.slideDownOut',
		options:{
			sequenceQueue :false
		}
	},{
		elements:container,
		properties:'Carrie.slideUpIn',
	},{
		elements:pop,
		properties:'Carrie.slideUpIn',
	},{
		elements:imgs,
		properties:'Carrie.scaleIn',
		options:{
			sequenceQueue :false
		}
	}];
	//定义pop退出,box出现的场景
	var seqClose = [{
		elements:imgs,
		properties:'Carrie.scaleout',
	},{
		elements:container,
		properties:'Carrie.slideDownOut',
	},{
		elements:pop,
		properties:'Carrie.slideDownOut',
		options:{
			sequenceQueue :false
		}
	},{
		elements:container,
		properties:'Carrie.slideUpIn',
	},{
		elements:box,
		properties:'Carrie.slideUpIn',
	}];
	
	$.Velocity.RunSequence(seqInit);
	
	open.on('click',function(){
		$.Velocity.RunSequence(seqClick);
	})
	
	close.on('click',function(){
		$.Velocity.RunSequence(seqClose);
	})
	
})(jQuery);

老师帮忙看一下哪里出错了~~~

写回答 关注

1回答

  • 程序员面试辅导
    2015-08-18 16:07:33
    已采纳

    报错的意思是Carrie.scaleout没有注册,然后看了下,你注册的是Carrie.scaleOut,O是大写的。

    Carrie...

    太粗心粗心了~~~已经好了,谢谢老师,希望再出更多的视频以供学习哈~~~

    2015-08-18 16:10:28

    共 2 条回复 >

Velocity.js实现弹出式相框

超给力动画插件,动画从此信手拈来,从此网页变得生动起来

27005 学习 · 63 问题

查看课程

相似问题