|
|
@ -1,5 +1,5 @@ |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Isotope v1.4.110629 |
|
|
|
* Isotope v1.4.110630 |
|
|
|
* An exquisite jQuery plugin for magical layouts |
|
|
|
* An exquisite jQuery plugin for magical layouts |
|
|
|
* http://isotope.metafizzy.co
|
|
|
|
* http://isotope.metafizzy.co
|
|
|
|
* |
|
|
|
* |
|
|
@ -9,6 +9,7 @@ |
|
|
|
* Copyright 2011 David DeSandro / Metafizzy |
|
|
|
* Copyright 2011 David DeSandro / Metafizzy |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*jshint curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, undef: true */ |
|
|
|
/*global Modernizr: true */ |
|
|
|
/*global Modernizr: true */ |
|
|
|
|
|
|
|
|
|
|
|
(function( window, $, undefined ){ |
|
|
|
(function( window, $, undefined ){ |
|
|
@ -62,57 +63,45 @@ |
|
|
|
* http://www.modernizr.com/license/
|
|
|
|
* http://www.modernizr.com/license/
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* This version whittles down the script just to check support for |
|
|
|
* This version whittles down the script just to check support for |
|
|
|
* CSS transitions, transforms, and 3D transforms. |
|
|
|
* CSS transitions, transforms, and 3D transforms. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
var tests = [ |
|
|
|
var tests = { |
|
|
|
{ |
|
|
|
csstransforms: function() { |
|
|
|
name : 'csstransforms', |
|
|
|
return !!transformProp; |
|
|
|
getResult : function() { |
|
|
|
}, |
|
|
|
return !!transformProp; |
|
|
|
|
|
|
|
} |
|
|
|
csstransforms3d: function() { |
|
|
|
}, |
|
|
|
var test = !!getStyleProperty('perspective'); |
|
|
|
{ |
|
|
|
// double check for Chrome's false positive
|
|
|
|
name : 'csstransforms3d', |
|
|
|
if ( test ) { |
|
|
|
getResult : function() { |
|
|
|
var vendorCSSPrefixes = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '), |
|
|
|
var test = !!getStyleProperty('perspective'); |
|
|
|
mediaQuery = '@media (' + vendorCSSPrefixes.join('transform-3d),(') + 'modernizr)', |
|
|
|
// double check for Chrome's false positive
|
|
|
|
$style = $('<style>' + mediaQuery + '{#modernizr{height:3px}}' + '</style>') |
|
|
|
if ( test ) { |
|
|
|
.appendTo('head'), |
|
|
|
var vendorCSSPrefixes = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '), |
|
|
|
$div = $('<div id="modernizr" />').appendTo('html'); |
|
|
|
mediaQuery = '@media (' + vendorCSSPrefixes.join('transform-3d),(') + 'modernizr)', |
|
|
|
|
|
|
|
$style = $('<style>' + mediaQuery + '{#modernizr{height:3px}}' + '</style>') |
|
|
|
test = $div.height() === 3; |
|
|
|
.appendTo('head'), |
|
|
|
|
|
|
|
$div = $('<div id="modernizr" />').appendTo('html'); |
|
|
|
$div.remove(); |
|
|
|
|
|
|
|
$style.remove(); |
|
|
|
test = $div.height() === 3; |
|
|
|
} |
|
|
|
|
|
|
|
return test; |
|
|
|
$div.remove(); |
|
|
|
}, |
|
|
|
$style.remove(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return test; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name : 'csstransitions', |
|
|
|
|
|
|
|
getResult : function() { |
|
|
|
|
|
|
|
return !!getStyleProperty('transitionProperty'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
i, len = tests.length |
|
|
|
csstransitions: function() { |
|
|
|
; |
|
|
|
return !!getStyleProperty('transitionProperty'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
if ( window.Modernizr ) { |
|
|
|
if ( window.Modernizr ) { |
|
|
|
// if there's a previous Modernzir, check if there are necessary tests
|
|
|
|
// if there's a previous Modernzir, check if there are necessary tests
|
|
|
|
for ( i=0; i < len; i++ ) { |
|
|
|
for ( var testName in tests) { |
|
|
|
var test = tests[i]; |
|
|
|
if ( !Modernizr.hasOwnProperty( testName ) ) { |
|
|
|
if ( !Modernizr.hasOwnProperty( test.name ) ) { |
|
|
|
|
|
|
|
// if test hasn't been run, use addTest to run it
|
|
|
|
// if test hasn't been run, use addTest to run it
|
|
|
|
Modernizr.addTest( test.name, test.getResult ); |
|
|
|
Modernizr.addTest( testName, tests[ testName ] ); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -123,15 +112,13 @@ |
|
|
|
_version : '1.6ish: miniModernizr for Isotope' |
|
|
|
_version : '1.6ish: miniModernizr for Isotope' |
|
|
|
}, |
|
|
|
}, |
|
|
|
classes = ' ', |
|
|
|
classes = ' ', |
|
|
|
test, result,
|
|
|
|
result, testName; |
|
|
|
className; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Run through tests
|
|
|
|
// Run through tests
|
|
|
|
for ( i=0; i < len; i++ ) { |
|
|
|
for ( testName in tests) { |
|
|
|
test = tests[i]; |
|
|
|
result = tests[ testName ](); |
|
|
|
result = test.getResult(); |
|
|
|
miniModernizr[ testName ] = result; |
|
|
|
miniModernizr[ test.name ] = result; |
|
|
|
classes += ' ' + ( result ? '' : 'no-' ) + testName; |
|
|
|
classes += ' ' + ( result ? '' : 'no-' ) + test.name; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Add the new classes to the <html> element.
|
|
|
|
// Add the new classes to the <html> element.
|
|
|
|