javascript - Auto resize innerWidth & innerHeight based on the viewport when using the Colorbox jquery plugin -


i using latest version of colorbox jquery plugin open iframe - i'd have open , resize correctly depending on size of viewport, have far

$(document).ready(function(){    $(".youtube").colorbox({iframe:true, innerwidth:640, innerheight:390}); }); 

any ideas have open @ suitable size mobile etc..

you didn't specify meant exactly. make 100% no matter what.

$(document).ready(function(){      var w = $(window).innerwidth();     var h = $(window).innerheight();     $(".youtube").colorbox({iframe:true, innerwidth: w, innerheight:h}); });  $(window).resize( function(){       var w = $(window).innerwidth();     var h = $(window).innerheight();     $('.youtube').css('width',w,'height',h)  }); 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -