-
-
Save resting/46f402acb13344478b653c8722a8be33 to your computer and use it in GitHub Desktop.
Fixing FOUC with jQueryMobile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html class="no-js"> | |
<head> | |
<!-- stuff --> | |
<!-- FOUC fix --> | |
<style type="text/css"> | |
.no-js {display: none;} | |
</style> | |
</head> | |
<body> | |
<!-- all my html --> | |
<!-- load all my javascripts down here --> | |
<script src="../jsc/jquery-1.6.1.js?v=1"></script> | |
<script src="js/jquery.mobile-1.0rc2.js?v=1"></script> | |
<script src="js/jquery-ui-1.8.13.autocomplete.min.js"></script> | |
<script src="../jsc/json2.js"></script> | |
<script src="js/app.js?v=1"></script> | |
<script src="../jsc/jquery.microtemplate.js"></script> | |
<script> | |
// borrowed from Mr. Paul Irish http://paulirish.com/2009/avoiding-the-fouc-v3/ (thanks!) | |
(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement) | |
</script> | |
<script type="text/javascript" > | |
$(document).ready(function() { | |
loadeddocument(); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment