More problems with Jquery src and load()
<p>I am pulling my hair out as to why one of these scripts works, while the other doesn't . Upon clicking the text, the image should change.  And on a side note does the load() command look ok?</p>

<p>What is the difference between these two that's making the first work and the second malfunction?</p>

<p>The functional:
    
    </p>

<pre><code>CageImg=new Image();
CageImg.src="http://cageme.herokuapp.com/css/mrcage.jpg"

function buttonInCompany() 
{
$('#desc').load('incompany.html'); 
$('#midimg').attr("src",CageImg.src); } 

$(document).ready(function() { $("#someID").click(function() { buttonInCompany(); }); }); &lt;/script&gt;

&lt;div id='someID'&gt;Everything is cage's cage.&lt;br&gt;&lt;br&gt;&lt;/div&gt;

&lt;img id="midimg" src="http://3.bp.blogspot.com/-BdfyYy_Y0gY/UP_3y3F2RDI/AAAAAAAAC-Q/eHPCltO8bG8/s1600/TomEngelsnicolas+thing.jpg"&gt;
</code></pre>

<p>The non functional:</p>

<pre><code>    &lt;script src="jquery.src"&gt;&lt;/script&gt;
        &lt;script&gt;
        incompanyImage=new Image(); 
        incompanyImage.src= "images/16581370-group-of-happy-young-business-people-in-a-meeting-at-office.jpg" 

function buttonInCompany()

        {
        $('#desc').load('desc.html #incompany');
        $('#midimg').attr("src",incompanyImage.src); } 

        $(document).ready(function() { $("#incompany").click(function() { buttonInCompany(); }); }); 

        &lt;/script&gt;

        &lt;div id="incompany" class="art-button"&gt;Aulas in-Company&lt;/div&gt;

        &lt;img id="midimg" width="233" height="350" src="images/Fotolia_5170186_X-01.jpg"&gt;&lt;br&gt;&lt;/p&gt;
</code></pre>
