I want to call the second function after first is completed
function first(callback) {
alert('called first');
$('.fillColor1').animate({
height: '50px'
}, 600);
}
function second() {
alert('called second');
$('.fillColor2').animate({
height: '50px'
}, 600);
}
$('button').click(function() {
first(second);
});
Here is the code what i want on jsfiddle
I got this problem then i searched for this and landed to this link
Execute jquery function after another function completes
Please let me know, is any mistake am i doing
Thanks in advance