Permalink
Browse files

moved IE flags to custom file, added "enahnced" class to html

  • Loading branch information...
1 parent b47e124 commit b36630bdf1dbdb8850e489e06cdd0c8c545c4b47 scottjehl committed Apr 12, 2012
Showing with 10 additions and 5 deletions.
  1. +10 −1 _demo/app.enhance.js
  2. +0 −4 app.js
View
@@ -8,7 +8,13 @@
(function( win ){
//re-reference app var locally
- var app = win.app;
+ var app = win.app,
+ docElem = win.document.documentElement;
+
+ // IE browser flags, based on conditional comments
+ app.oldIE = app.hasClass( docElem, "ieOld" );
+ app.ie8 = app.hasClass( docElem, "ie8" );
+
// Add your qualifications for major browser experience divisions here.
// For example, you might choose to only enhance browsers that support document.querySelectorAll (IE8+, etc).
@@ -17,6 +23,9 @@
return;
}
+ // Add "enhanced" class to HTML element
+ docElem.className += " enhanced";
+
// Configure css and js paths, if desirable.
app.basepath.js = app.basepath.css = "_demo/sample-files/";
View
@@ -16,10 +16,6 @@
return elem.className.indexOf( cls ) >= -1
}
- // IE browser flags, based on conditional comments
- app.oldIE = app.hasClass( docElem, "ieOld" );
- app.ie8 = app.hasClass( docElem, "ie8" );
-
// Callback for running logic dependent on a property being defined
// You can use isDefined to run code as soon as the document.body is defined, for example, for body-dependent scripts
// or, for a script that's loaded asynchronously that depends on other scripts, such as jQuery.

0 comments on commit b36630b

Please sign in to comment.