Skip to content
Browse files

Explanatory comments for test cases.

  • Loading branch information...
1 parent 9603073 commit 40429105e449643e3e67987fbcb6043fc489241a @nathansmith nathansmith committed May 16, 2011
Showing with 6 additions and 6 deletions.
  1. +4 −3 test_class.html
  2. +2 −3 test_id.html
View
7 test_class.html
@@ -4,12 +4,16 @@
<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, '');
if (i > -1) {
+ // Add class="range_NUMBER"
html.className += ' range_' + i;
}
@@ -19,9 +23,6 @@
// Edit to suit your needs.
var ADAPT_CONFIG = {
- // Where is your CSS?
- path: 'assets/css/',
-
// false = Only run once, when page first loads.
// true = Change on window resize and page tilt.
dynamic: true,
View
5 test_id.html
@@ -4,7 +4,9 @@
<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
@@ -13,9 +15,6 @@
// Edit to suit your needs.
var ADAPT_CONFIG = {
- // Where is your CSS?
- path: 'assets/css/',
-
// false = Only run once, when page first loads.
// true = Change on window resize and page tilt.
dynamic: true,

0 comments on commit 4042910

Please sign in to comment.
Something went wrong with that request. Please try again.