0
var iframeContent = $("#<%= iframeID %>").contents();
iframeContent.off("mouseover", "#divImgSize").on("mouseover","#divImgSize", function() {
       //some code
    });

this function working normal, but

iframeContent.off("mouseout", "#divImgSize").on("mouseout", "#divImgSize", function(event) {
    //some code
});

or

iframeContent.off("mouseleave ", "#divImgSize").on("mouseleave ", "#divImgSize", function(event) {
    //some code
});

working in Firefox, Chrome, but not Internet Explorer.

Evgeniy
  • 75
  • 1
  • 9

1 Answers1

1

After reviewing another post on accessing content of an iframe, the contents must be on the same domain otherwise it's not possible. To make this possible try the following.

var iframeContent = $("#<%= iframeID %>").contents();

iframeContent.find("#divImgSize")
    .on("mouseover", doSomeThing())
    .on("mouseleave", doSomeThing());

function doSomeThing(){
    // Your code
}
Community
  • 1
  • 1
Stokedout
  • 11,003
  • 5
  • 24
  • 30