Here is my function:
loadChildNodes($('#budgetline' + id)); $('.child-of-budgetline' + id).each(function(){ $(this).expandTreeNode(); console.log("test"); }); loadChildNodes($element) function makes an ajax call. I want to wait until this function is completed and then only execute the lines after it. But doesnot happen so. How can i make the other lines execute only after the function loadChildNodes has completed.
loadChildNodesfunction too? What does it return?loadChildNodes($element)returns anything? can you post the code of this method?