Take an element that is inside an iframe

Posted on

Question :

I needed to get a title that is inside an iframe, I did it with jquery but it takes a lot to fade or even disappear. I did so with jquery:

$(document).ready(function () {

I’ve tried it too, out of $ (document) .ready ():


But it did not help, I think if it goes with css it disappears as soon as the page loads, how could it do with css?
If not, how could I do with jquery that as soon as I entered the page that title was not visible? Home
Please help me,


Answer :

I do not know how to detect DOM loading inside an iframe, but using .on() you can fire the "load" event when the iframe has been fully loaded, and thus remove the desired element:

$('iframe').on("load", function(){


Leave a Reply

Your email address will not be published. Required fields are marked *