In a responsive template i have some jquery code to calculate the height of an image proportionally to the screen size. It works in all browser but on Iphone/Ipad when I change from portrait do landscape the image does'nt resize, here is the code, hope someone could help me! Thanks
// for the body resize $(document).ready(function() { var bodywidth = $(document).width(); var ratioheight = (bodywidth/3.582); $("#gallery").height(ratioheight); });
// for the body resize active $(window).resize(function() { var bodywidth = $(document).width(); var ratioheight = (bodywidth/3.582); $("#gallery").height(ratioheight); });