From f836bb2d109261a9b1bcdb2de4d6f8274df73e38 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 13 Aug 2010 07:03:23 +0000 Subject: Add's Modernizr (html5 feature detection library) + support for placeholders in browsers that don't support it natively. --- views/default/js/html5.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 views/default/js/html5.php (limited to 'views/default/js') diff --git a/views/default/js/html5.php b/views/default/js/html5.php new file mode 100644 index 000000000..ba2a517d9 --- /dev/null +++ b/views/default/js/html5.php @@ -0,0 +1,12 @@ +pluginspath.'html5/js/Modernizr-1.5.min.js'; + +$placeholder_script = $vars['url'].'mod/html5/js/jquery.placeholder-1.0.1.js'; +?> + +if (!Modernizr.input.placeholder) { + $(function() { $('[placeholder]').placeholder({className:'html5-placeholder'}); }); + document.write(''); +} -- cgit v1.2.3