function resizePage() { $(document).ready(function() { var largeurRatio = $("#ratio-iframe-1-col").innerWidth(); var largeurRatio = $("#ratio-iframe-2-col").innerWidth(); $( "#ratio-iframe-1-col" ).css("height", (largeurRatio * 0.56)+"px" ); $( "#ratio-iframe-2-col" ).css("height", (largeurRatio * 0.56)+"px" ); }); } function correctif() { cycle = setTimeout(function(){ resizePage(); }, 100); } resizePage(); $(window).resize(function() { resizePage(); correctif(); }); $(window).load(function() { resizePage(); correctif(); }); $(document).ready(function() { resizePage(); correctif(); });