Ideally I would like to run these functions sequentially. Formatted like so:
function functionOne() {
$('.div').animate({'height', 200}, 1000);
}
function functionTwo () {
// ...
}
$(document).ready(function() {
functionOne();
functionTwo();
});
I know I can nest functionTwo inside of functionOne's 'complete' callback function (below), but I'd rather not as it can get a little messy.
function functionOne() {
$('.div').animate({'height', 200}, 1000, function() {
functionTwo();
});
}
Any way around this? Cheers
messyabout nesting functions?