Suppose I have a page with multiple IFrames :
Main Page
<div id='someDiv1' style='display:none; '>
<iframe id='iframe1' src='iframe1.html'>
<input id='someinput'></input>
</iframe>
</div>
IFrame (iframe1.html)
<input id='someinput'></input>
<script>
function isElementVisible(elem){
}
</script>
In this scenario how do i check if the element is visible/hidden due to the parent div of IFrame hiding it?
I tried using $('#someinput').is(':visible') but I always get true if I run it inside IFrame. I don't have an option to change the page structure nor execute the script inside parent.