How to provide hyperlinks to the dynamically generated elements through JQuery?
<p>Actually i wanted to generate images dynamically with hyperlinks through jquery which is appended in <code>&lt;div id='data'&gt;&lt;/div&gt;</code>.</p>

<p>Through this code now i am able to create images but i am not getting idea to provide hyperlinks to the generated images. Just for the sake of simplicity, here I have inserted only a single image.</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script src="jquery.min.js" type='text/javascript'&gt;&lt;/script&gt;
&lt;script type='text/javascript'&gt;
$('#gallery h3').click(function(){{
$('&lt;img&gt;&lt;/img&gt;')
.attr('src', 'photo.jpg')
.hide()
.load(function() {
    $(this).fadeIn(4000);
    })
.appendTo($('#data'));
  }
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id='gallery'&gt;
&lt;h3 id='gdata'&gt;&lt;a href='#'&gt;Browsers&lt;/a&gt;&lt;/h3&gt;
&lt;div id='data'&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;&lt;/html&gt;
</code></pre>
