I\'ve written out a very basic script to add/remove a class on load or when a window is resized.
I was just wondering if there was a better way of doing this or if i
function resize() { if ($(window).width() < 514) { $('html').addClass('mobile'); } else {$('html').removeClass('mobile');} } $(document).ready( function() { $(window).resize(resize); resize(); });