I have an ordinary table in html in an iframe and I would like to access it from the parent page (yes they are on the domain and server) I've tried every kind of:
$("#Iframe").contents().find("#mytable td");
I don't have the impression it detects my table cell or table at all. I would like indeed to do an event on it.
$("#mytable td")
.mousedown(function ()
{
isMouseDown = true;
$(this).toggleClass("highlighted");
isHighlighted = $(this).hasClass("highlighted");
return false;
})
.mouseover(function () {
if (isMouseDown) {
$(this).toggleClass("highlighted", isHighlighted);
}
})
This event works perfectly on a single page with the css style linked but how should I do it when using an iframe? What's the correct sentence to detect my table in the iframe?