How can I wait for complete execution of a function and then call another function like
<script src="whereMyfunctionIs.js"></script>
<script>
$(window).ready(start());
function start (){
myfunction().WhenFunctionDone(myOtherFunction());
}
</script>
I wanna know if there is a method(js or jQuery) that can wait til myfunction
completes, I've already used done, ready and load, an it doesn't wait.
Error messages:
jQuery.Deferred exception: Cannot read property 'ready' of undefined
jQuery.Deferred exception: Cannot read property 'load' of undefined
jQuery.Deferred exception: Cannot read property 'done' of undefined