affiliate_link

Tuesday, July 5, 2011

Displaying iFrame content in a DIV

if your images are outside of your iFrame, of course your dropdown menu will not show up since you are trying to tell the dropdown menu to go out of its windows. iframe is a different window inside your html, therefore any overflow of the window will never go out, elements inside the iframe is not affected with the z-index.

what you could do is, if your http://website.com/dropdown.html has the dropdown content only, you can call it by jQuery

<div id="myDropDown">
</div>


<script type="text/javascript">
    $(document).ready(function() {
        $("#myDropDown").load("http://website.com/dropdown.html");
    });  
</script>

this will append the content of your dropdown.html into the div

No comments: