Change how the outer divs are added to the document

Using .add() caused some tests to fail with jQuery 1.9 running on PhantomJS.