How can I access the contents of an iframe with JavaScript/jQuery?

If the <iframe> is from the same domain, the elements are easily accessible as

$("#iFrame").contents().find("#someDiv").removeClass("hidden");

Reference

Leave a Comment