Skip to content

Instantly share code, notes, and snippets.

@sibaberpollo
Last active January 25, 2016 19:43
Show Gist options
  • Save sibaberpollo/4a03f80ef726e2c278ad to your computer and use it in GitHub Desktop.
Save sibaberpollo/4a03f80ef726e2c278ad to your computer and use it in GitHub Desktop.
Cambiar el tamaño de un iframe al alto completo de una página
<script type="text/javascript">
$ = jQuery;
$(document).ready(function () {
updateContainer();
$(window).resize(function() {
updateContainer();
});
});
function updateContainer() {
var alto = window.innerHeight - 50;
console.log (alto);
$("#epos").css("height", alto);
}
</script>
<iframe style="margin:0px;padding:0px;" width='100%' frameborder='0' src='http://travelmapping.co/epos/test-1/' id="epos" frameborder="0"></iframe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment