Jquery: syntax for inserting a function
- by kelly
I'm trying to integrate an animation by using the bezier path plug-in and I can't seem to implement it right.
Stripped down, here's what I have:
$('#next2btn').live('click', function(){
$(this).attr('id','next3btn');
$('#content2').show(300, function() {
$('#account').fadeTo(500,1.0)
var arc_params = {
center: [278,120],
radius: 186,
start: -90,
end: 90,
dir: -1
};
});
$("#account").animate({path : new $.path.arc(arc_params)},1000);
});
So, I'm trying to add this piece of code into what I have:
var arc_params = {
center: [278,120],
radius: 186,
start: -90,
end: 90,
dir: -1
};
});
$("#account").animate({path : new $.path.arc(arc_params)},1000)
which works on its own as does the other.
I'm thinking it's something about declaring that variable and where I do that.
I'm essentially chaining a few different animations/actions upon a button click.
Thanks for any insight-
kj