I want to get id of an appended element by jquery, but i cant, this is my code: append elements:
$(document).ready(function(){
$("#addSlide").click(function(){
var slideId="slide"+n;
var nslide="<td><img class='projImgs'id='"+slideId+"'onclick='openCustomRoxy()' src='' style='width:75px;height:55px'/> <input id='sldAddr' name='"+slideId+"' type='hidden' value='' /> </td>";
$("#slideTr").append(nslide);
});
and The code that get atrribute 'id' :
$(".projImgs").click(function(){
var id= $(this).attr('id');
console.log(id);
var source= "http://localhost/exx/admin/fileman/index.html?integration=custom&type=files&img="+id;
console.log(source);
$("#frame").attr('src',source);
});