Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 25 lines (23 sloc) 0.692 kb
576f19b @jo makes jscolor a polyfill
authored
1 <html>
2 <head>
3 <title>jscolor demo using modernizr</title>
4 </head>
5 <script type="text/javascript" src="modernizr.custom.js"></script>
6 <body>
7 Click here: <input type="color" value="66ff00">
8
9 <script>
10 Modernizr.load([{
11 // Test if Input Color is supported using Modernizr
12 test: Modernizr.inputtypes.color,
13 // If colors are not supported, load the jscolor.js script
14 nope: 'jscolor.min.js',
15 // initialize jscolor once its loaded,
16 // because the builtin jscolor.install hook is bind to window.load,
17 // which has already happend
18 callback: function(id, testResult) {
19 jscolor.init();
20 }
21 }]);
22 </script>
23 </body>
24 </html>
Something went wrong with that request. Please try again.