Only execute once previous command is triggered
<p>How do I make sure that each of these commands are triggered once the previous command has been triggered and completed?</p>

<pre><code>$('.thumb').unwrap('.wrapper')
$('.thumb').wrapAll("&lt;div class=\"page\"&gt;&lt;/div&gt;");
$('body').prepend('&lt;div class="wrapper"&gt;&lt;/div&gt;');
wrap_thumbs();
</code></pre>
