Carrie_IT
2015-08-18 15:59
点击关闭按钮时出现错误,没看懂什么意思~~~
代码附上
// 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);
老师帮忙看一下哪里出错了~~~
报错的意思是Carrie.scaleout没有注册,然后看了下,你注册的是Carrie.scaleOut,O是大写的。
Velocity.js实现弹出式相框
27005 学习 · 63 问题
相似问题
回答 2
回答 1