Difference between revisions of "Template:NTNU Trondheim/JS/picture field resize"

Line 3: Line 3:
 
     var width = div.width();
 
     var width = div.width();
 
     div.css('height', width * 0.5);
 
     div.css('height', width * 0.5);
     $(".break_header").css("top",(-width * 0.05) + 37);
+
     $(".break_header").css("top",(-width * 0.05) + 27);
 
     $("#menu").css("width", width);
 
     $("#menu").css("width", width);
 
};
 
};

Revision as of 14:35, 30 June 2017

var pricture_field_resize = function () {

   var div = $('#picture_field');
   var width = div.width();
   div.css('height', width * 0.5);
   $(".break_header").css("top",(-width * 0.05) + 27);
   $("#menu").css("width", width);

};

//Call on window resize and document startup window.onresize = pricture_field_resize; $(pricture_field_resize);