I have the below piece of code:
$("some_html_stuff").insertAfter('.some_element');
I then have other JS code which I need to be sure will execute AFTER the insertAfter function has finished its business. How can a achieve this? I looked at closures and a bunch of other stuff, but I don't seem to be able to figure this out.