Reputation: 1151
What is the best way to run this? I get all kind the erros
I need to add a function after the sequence is finished.
Using jquery with velocity.js
$(".close").click(function(){
var mySequence = [
{ e: $(".bt_1"), properties: 'fadeIn' },
{ e: $(".bt_2"), options: complete: function() { alert("123"); } }
];
$.Velocity.RunSequence(mySequence);
});
Upvotes: 0
Views: 535
Reputation: 782
There are a number of problems in your code.
Firstly, 'properties' need to have css properties, so in your case it would be
properties: { opacity: 1 }
to have a fadeIn effect
Also 'options' must be an object
options: {
complete: function () {
{ alert("123"); }
}
}
Here's your corrected, working code. http://codepen.io/shubhra/pen/yyPPrp Read the documentation - http://julian.com/research/velocity/#uiPack
Hope this helps.
Upvotes: 1