Using "data-href" to load an image into a DIV
<p>I am trying to get a link that, when clicked, will load an image into a DIV. Here's what I have so far:</p>

<p><a href="http://jsfiddle.net/AndyMP/kgvux/" rel="nofollow">http://jsfiddle.net/AndyMP/kgvux/</a></p>

<p>JQuery</p>

<pre><code>$(function () {
    $(".link").click(function (e) {
        var url = $(this).data('href')
        $('.enclosure').load(url)
        return false;
    });
});
</code></pre>

<p>HTML</p>

<pre><code>.enclosure {
    width: 400px;
    height: 200px;
    border: 1px solid black;
    overflow: hidden;
}
.link {
    cursor: pointer;
}
</code></pre>

<p>HTML</p>

<pre><code>&lt;div class="enclosure"&gt;
    &lt;img src="http://news.bbcimg.co.uk/media/images/67419000/jpg/_67419697_hull-getty.jpg"&gt;
&lt;/div&gt;
&lt;div class="link" data-href="http://news.bbcimg.co.uk/media/images/67424000/jpg/_67424686_67424685.jpg"&gt;Click me&lt;/div&gt;
</code></pre>
