Browse Source

src : refactor new Modernizr

pull/150/head v1.5.11
David DeSandro 13 years ago
parent
commit
a43c74fd3c
  1. 21
      jquery.isotope.js
  2. 2
      jquery.isotope.min.js

21
jquery.isotope.js

@ -102,9 +102,11 @@
}
};
var testName;
if ( Modernizr ) {
// if there's a previous Modernzir, check if there are necessary tests
for ( var testName in tests) {
for ( testName in tests) {
if ( !Modernizr.hasOwnProperty( testName ) ) {
// if test hasn't been run, use addTest to run it
Modernizr.addTest( testName, tests[ testName ] );
@ -112,30 +114,25 @@
}
} else {
// or create new mini Modernizr that just has the 3 tests
window.Modernizr = (function(){
var miniModernizr = {
Modernizr = window.Modernizr = {
_version : '1.6ish: miniModernizr for Isotope'
},
classes = ' ',
result, testName;
};
var classes = ' ';
var result;
// Run through tests
for ( testName in tests) {
result = tests[ testName ]();
miniModernizr[ testName ] = result;
Modernizr[ testName ] = result;
classes += ' ' + ( result ? '' : 'no-' ) + testName;
}
// Add the new classes to the <html> element.
$('html').addClass( classes );
return miniModernizr;
})();
}
// ========================= isoTransform ===============================
/**

2
jquery.isotope.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save