How to find an element in IFrame using JQuery

Waqas Anwar
01 May 2011
20448 Views

You have an iframe on the page showing some document, and you want to find an element inside the iframe using JQuery. You can combine contents and find method as shown in the following example code.


$("#iFrameID").contents().find("#someDivID").addClass("colorfulborder");