nelsonm - 3:14 am on Jul 17, 2012 (gmt 0)
Yea, sorry about the for loop.
Basically what i'm trying to do is loop through the processWorkorder function until all work orders divs are created, cloned and copied to the print div. After all the work order divs are in the print div, then call the printElement plugin to print all the work orders in the print div.
The problem is that since the ajax method in the processWorkorder function is asynchronous, the printElement plugin gets called before any of the work order divs get put into the print div.
In any case, I'll try your suggestion, however...
I was reading about jQuery.when( deferreds ). Isn't this the proper way to handle this type of asynchronous situation?