summaryrefslogtreecommitdiff
path: root/misc/drupal.js
diff options
context:
space:
mode:
Diffstat (limited to 'misc/drupal.js')
-rw-r--r--misc/drupal.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/misc/drupal.js b/misc/drupal.js
index 79f9f755c..9f4327cf0 100644
--- a/misc/drupal.js
+++ b/misc/drupal.js
@@ -331,7 +331,21 @@ $('html').addClass('js');
// 'js enabled' cookie.
document.cookie = 'has_js=1; path=/';
-// Attach all behaviors.
+/**
+ * Additions to jQuery.support.
+ */
+$(function () {
+ /**
+ * Boolean indicating whether or not position:fixed is supported.
+ */
+ if (jQuery.support.positionFixed === undefined) {
+ var el = $('<div style="position:fixed; top:10px" />').appendTo(document.body);
+ jQuery.support.positionFixed = el[0].offsetTop === 10;
+ el.remove();
+ }
+});
+
+//Attach all behaviors.
$(function () {
Drupal.attachBehaviors(document, Drupal.settings);
});