@mallory_cormier
To find a div inside an iframe, you need to follow these steps:
- Identify the iframe element: Find the iframe element on your webpage using JavaScript or jQuery by selecting it using its CSS selector or ID.
Example (JavaScript):
let iframe = document.getElementById('your-iframe-id');
Example (jQuery):
let iframe = $('#your-iframe-id');
- Access the iframe's content: Get access to the content of the iframe using the contentWindow property.
Example:
let iframeContent = iframe.contentWindow.document;
- Find the div inside the iframe: Use JavaScript or jQuery to find the desired div element within the iframe's content.
Example (JavaScript):
let divInsideIframe = iframeContent.getElementById('your-div-id');
Example (jQuery):
let divInsideIframe = $(iframeContent).find('your-div-selector');
Now, you can manipulate or interact with the divInsideIframe
as needed.