Created
September 7, 2012 13:59
-
-
Save jimmynotjim/3666470 to your computer and use it in GitHub Desktop.
Use Modernizr to conditionally use Columnizer.js when css columns aren't supported
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
// | |
// Requires Modernizr, jquery, and columnizer.js | |
// http://modernizr.com (Requires a production version, demo doesn't include yep/nope) | |
// http://jquery.com | |
// http://welcome.totheinter.net/columnizer-jquery-plugin/ | |
// | |
// Replace [url], [target], and [options] w/ your specific needs | |
// | |
Modernizr.load({ | |
test: Modernizr.csscolumns, | |
nope: '[url]/jquery.columnizer.min.js', | |
complete: function() { | |
if ($('html').hasClass('no-csscolumns')) { | |
$('[target]').columnize({[options]}); | |
} | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment