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

(Created page with "var pricture_field_resize = function () { var div = $('#picture_field'); var width = div.width(); div.css('height', width * 0.5); $(".break_header").css("top",...")
 
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)+20 + 37);
+
     $(".break_header").css("top",(-width * 0.05) + 37);
 
     $("#menu").css("width", width);
 
     $("#menu").css("width", width);
 
};
 
};

Revision as of 14:26, 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) + 37);
   $("#menu").css("width", width);

};

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