I have the following scenario:
I have a div = "#div1"
which is coded in html. I have populated this div with some data coming from a script service [ which means the "a's" are not there initially], and the data is appended to this div as
<a href=''>data1</a>
<a href=''>data2</a>
I have a jQuery selector like :
$(document).ready(function(){
$("#div1 a").click(function(){
// do something
});
});
This is not selecting the element. How do I overcome this problem?