Permalink
Browse files

Merge pull request #3 from shalecraig/patch-2

Position:fixed (IE6 javascript fallback), with pointer-events:none
  • Loading branch information...
2 parents 374278a + 2ebc9cb commit 677b61a7df2e6f83b6b4437fecb027fb94359f26 @peol committed Feb 17, 2012
Showing with 16 additions and 7 deletions.
  1. +6 −1 releases/latest/960.gridder.src.css
  2. +10 −6 releases/latest/960.gridder.src.js
@@ -5,7 +5,7 @@
/* SETUP */
#g-setup {
- position: absolute;
+ position: fixed;
top: 150px;
left: -310px;
padding: 6px;
@@ -15,6 +15,11 @@
background-color: #d1cfe6;
border: 2px solid #a19bd1;
z-index: 2100;
+ pointer-events: none;
+}
+
+* html #g-setup {
+ position: absolute!important;
}
#g-setup * {
@@ -3,7 +3,7 @@
*/
/*!
- * Copyright (c) Andrée Hansson (peolanha AT gmail DOT com)
+ * Copyright (c) Andr�e Hansson (peolanha AT gmail DOT com)
* MIT License - http://www.opensource.org/licenses/mit-license.php
* Idea loosely based on JASH, http://billyreisinger.com/jash/
*
@@ -168,7 +168,9 @@ function Grid() {
}
// Hook the show/hide text to toggle
- jQuery('#g-setup').css('top', jQuery(window).scrollTop() + 150);
+ if (!jQuery.support.fixedPosition) {
+ jQuery('#g-setup').css('top', jQuery(window).scrollTop() + 150);
+ }
jQuery('#g-setup-tab a').click(function () {
me.toggleSetupWindow();
});
@@ -199,10 +201,12 @@ function Grid() {
}
});
- // FIXME: I wan't to remove this, replace it with position: fixed;
- jQuery(window).scroll(function () {
- jQuery('#g-setup').css('top', jQuery().scrollTop() + 150);
- });
+ // Falls back to scrolling it manually (for #IE6)[ugh, I know]
+ if(!jQuery.support.fixedPosition) {
+ jQuery(window).scroll(function () {
+ jQuery('#g-setup').css('top', jQuery().scrollTop() + 150);
+ });
+ }
}
// We're checking if CTRL+ALT and one of toggle keys has been pressed

0 comments on commit 677b61a

Please sign in to comment.