0

i am new to jquery and need some help.

i have code like this

$(document).ready(function() {
setTimeout(function() {
    $('#error').fadeOut(500);
}, 5000);

so basically it will fade out the error message after 5 seconds. The problem is that the error div is contained within an iframe of the parent doc, and the jquery is running from within an iframe.

how can i target the div within an iframe say "iframe1" is its name and ID. how do I make that target the correct div.

Sorry if this is unclear, but as I said I am very new to jquery and I am not sure how to target elements outside of a given frame to a new frame.

user3005775
  • 306
  • 1
  • 3
  • 14
  • Maybe this helpful http://stackoverflow.com/questions/935127/how-to-access-parent-iframe-from-javascript – Erdogan Oksuz May 12 '17 at 13:51
  • Check this http://stackoverflow.com/questions/14451358/how-to-pick-element-inside-iframe-using-document-getelementbyid – Dash May 12 '17 at 13:53

0 Answers0