Certain js File Not Working in Drupal I'm trying to render one div before another.

I've tested the js on my local machine to make sure it works by creating a simple page. The code is as follows:

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id="QWERTY"&gt;
        &lt;div class="content"&gt;   
            &lt;div class="field-name-field-image-one"&gt;IMAGE&lt;/div&gt;
            &lt;div class="body"&gt;BODY&lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;       
&lt;script&gt;$('.content .body').insertBefore('.content .field-name-field-image-one'); // check before() examples&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;


I've added the following code to a js file on my Drupal site:

(function ($, Drupal, window, document, undefined) {

    $('.content .body').insertBefore('.content .field-name-field-image-one'); // check before() examples

})(jQuery, Drupal, this, this.document);


My .info file links to the js and it is loading. Other elements that require javascript are working too. I've even tried adding the script in the html.tpl file, but that did not work either.

The divs I am trying to affect are nested deep within the html markup, and have several classes applied to them, compared to the simple version I have made. Could that be the reason? Am I not being specific enough?
This will help you

(function ($) {


Drupal.behaviors.exampleModule = {
attach: function (context, settings) {
  $('.content .body').insertBefore('.content .field-name-field-image-one'); // check before() examples

}


};
})(jQuery);


Read this https://drupal.org/node/756722 It will definitely help you.