Permalink
Browse files

Moved <style> above <script>.

  • Loading branch information...
1 parent d7fe259 commit 5baafb1149bde624736fc3b3e8dea1e064da5243 @nathansmith committed May 16, 2011
Showing with 75 additions and 75 deletions.
  1. +42 −42 test_class.html
  2. +33 −33 test_id.html
View
84 test_class.html
@@ -3,48 +3,6 @@
<head>
<meta charset="utf-8" />
<title>Adapt.js - HTML Class Test</title>
-<script>
-// Called by Adapt.js
-function myCallback(i, width) {
- // Alias HTML tag.
- var html = document.documentElement;
-
- // Find all instances of range_NUMBER and kill 'em.
- html.className = html.className.replace(/(\s+)?range_\d/g, '');
-
- // Check for valid range.
- if (i > -1) {
- // Add class="range_NUMBER"
- html.className += ' range_' + i;
- }
-
- // Note: Not making use of width here, but I'm sure
- // you could think of an interesting way to use it.
-}
-
-// Edit to suit your needs.
-var ADAPT_CONFIG = {
- // false = Only run once, when page first loads.
- // true = Change on window resize and page tilt.
- dynamic: true,
-
- // Optional callback... myCallback(i, width)
- callback: myCallback,
-
- // First range entry is the minimum.
- // Last range entry is the maximum.
- // Separate ranges by "to" keyword.
- range: [
- '0 to 760',
- '760 to 980',
- '980 to 1280',
- '1280 to 1600',
- '1600 to 1920',
- '1920'
- ]
-};
-</script>
-<script src="assets/js/adapt.min.js"></script>
<style>
* {
@@ -88,6 +46,48 @@
display: block;
}
</style>
+<script>
+// Called by Adapt.js
+function myCallback(i, width) {
+ // Alias HTML tag.
+ var html = document.documentElement;
+
+ // Find all instances of range_NUMBER and kill 'em.
+ html.className = html.className.replace(/(\s+)?range_\d/g, '');
+
+ // Check for valid range.
+ if (i > -1) {
+ // Add class="range_NUMBER"
+ html.className += ' range_' + i;
+ }
+
+ // Note: Not making use of width here, but I'm sure
+ // you could think of an interesting way to use it.
+}
+
+// Edit to suit your needs.
+var ADAPT_CONFIG = {
+ // false = Only run once, when page first loads.
+ // true = Change on window resize and page tilt.
+ dynamic: true,
+
+ // Optional callback... myCallback(i, width)
+ callback: myCallback,
+
+ // First range entry is the minimum.
+ // Last range entry is the maximum.
+ // Separate ranges by "to" keyword.
+ range: [
+ '0 to 760',
+ '760 to 980',
+ '980 to 1280',
+ '1280 to 1600',
+ '1600 to 1920',
+ '1920'
+ ]
+};
+</script>
+<script src="assets/js/adapt.min.js"></script>
</head>
<body>
<p>
View
66 test_id.html
@@ -3,39 +3,6 @@
<head>
<meta charset="utf-8" />
<title>Adapt.js - HTML ID Test</title>
-<script>
-// Called by Adapt.js
-function myCallback(i, width) {
- // Replace HTML tag's ID.
- document.documentElement.id = 'range_' + i;
-
- // Note: Not making use of width here, but I'm sure
- // you could think of an interesting way to use it.
-}
-
-// Edit to suit your needs.
-var ADAPT_CONFIG = {
- // false = Only run once, when page first loads.
- // true = Change on window resize and page tilt.
- dynamic: true,
-
- // Optional callback... myCallback(i, width)
- callback: myCallback,
-
- // First range entry is the minimum.
- // Last range entry is the maximum.
- // Separate ranges by "to" keyword.
- range: [
- '0 to 760',
- '760 to 980',
- '980 to 1280',
- '1280 to 1600',
- '1600 to 1920',
- '1920'
- ]
-};
-</script>
-<script src="assets/js/adapt.min.js"></script>
<style>
* {
@@ -79,6 +46,39 @@
display: block;
}
</style>
+<script>
+// Called by Adapt.js
+function myCallback(i, width) {
+ // Replace HTML tag's ID.
+ document.documentElement.id = 'range_' + i;
+
+ // Note: Not making use of width here, but I'm sure
+ // you could think of an interesting way to use it.
+}
+
+// Edit to suit your needs.
+var ADAPT_CONFIG = {
+ // false = Only run once, when page first loads.
+ // true = Change on window resize and page tilt.
+ dynamic: true,
+
+ // Optional callback... myCallback(i, width)
+ callback: myCallback,
+
+ // First range entry is the minimum.
+ // Last range entry is the maximum.
+ // Separate ranges by "to" keyword.
+ range: [
+ '0 to 760',
+ '760 to 980',
+ '980 to 1280',
+ '1280 to 1600',
+ '1600 to 1920',
+ '1920'
+ ]
+};
+</script>
+<script src="assets/js/adapt.min.js"></script>
</head>
<body>
<p>

0 comments on commit 5baafb1

Please sign in to comment.