aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorEvan Winslow <evan.b.winslow@gmail.com>2010-08-13 07:03:23 +0000
committerEvan Winslow <evan.b.winslow@gmail.com>2010-08-13 07:03:23 +0000
commitf836bb2d109261a9b1bcdb2de4d6f8274df73e38 (patch)
treec7738d721b254dfcc5ac3037bfc7152cd26ca1eb /views/default
parent58a11a216ffb1f34984d47ffbda6eaa23763dd6e (diff)
downloadelgg-f836bb2d109261a9b1bcdb2de4d6f8274df73e38.tar.gz
elgg-f836bb2d109261a9b1bcdb2de4d6f8274df73e38.tar.bz2
Add's Modernizr (html5 feature detection library) + support for placeholders in browsers that don't support it natively.
Diffstat (limited to 'views/default')
-rw-r--r--views/default/js/html5.php12
-rw-r--r--views/default/scripts/html5.php3
2 files changed, 12 insertions, 3 deletions
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 @@
+<?php
+global $CONFIG;
+
+include $CONFIG->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('<script src="<?php echo $placeholder_script; ?>"></script>');
+}
diff --git a/views/default/scripts/html5.php b/views/default/scripts/html5.php
deleted file mode 100644
index 82ad63146..000000000
--- a/views/default/scripts/html5.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<!--[if lt IE 9]>
-<script src="http://html5shim.googlecode.com/svn/trunk/html5-els.js"></script>
-<![endif]--> \ No newline at end of file