It seems like the isTablet function returns true at later point. Why, and how do I fix it so isTablet says it is a tablet when the CSS media query does.
function isTablet() {
return $(window).width() >= 768;
}
and
<link href="css/tablet-default.css" media="all and (min-width: 768px)" rel="stylesheet" type="text/css" />