When it comes to loading my mobile-only CSS, I typically use a media query similar to:
<link rel="stylesheet" type="text/css" media="only screen and (max-device-width: 480px)" href="/includes/css/mobile.css" />
However, in addition to these CSS modifications, I sometimes find the need to rearrange certain parts of the HTML. For example:
$('#moveOne').after($('#theOther');
I prefer this reordering action to be performed only after the browser has successfully loaded the mobile.css file. One method I considered is adding a unique CSS value inside mobile.css and then checking its properties like so:
if($'#notVisible').css('color') == 'red') {
$('#moveOne').after($('#theOther');
}
Do you know of a more effective way to accomplish this task?