/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function fontResize() { //Set default resolution and font size var resolution = 1024; var font = 13; //Get window width var width = $(window).width(); //Set new font size var newFont = font * (width/resolution); $('body').css('font-size', newFont); }; $(document).ready(function() { fontResize(); $(window).bind('resize', function() { fontResize(); }); } );