I have a div id = "tabs2"
which contains 4 iframe, I want when I click on an iframe, I recovered its id, I did that but it did not work:
$("document").ready(function() {
elm= document.getElementById("tabs2");
frames=elm.getElementsByTagName("iframe");
for(var i=0; i<frames.length; i++){
frames[i].click(function(){
alert(this.id);
})
}
});