function isMobil() { return(/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini|windows phone/i.test(navigator.userAgent)); } $(document).ready(function(e) { $('#headerContent').load('header.html'); $('#footerContent').load('footer.html'); }); $(window).load(function(e) { if (isMobil()) { $('head').append(''); } $('#looksContent').height($(document).height()); });