Skip to content
Browse files

Backported a bunch of IE fixes from Amnesty. mostly related to layout.

  • Loading branch information...
1 parent e4fe8b1 commit 7f4c748b973459c79d804260db144ad2b22aad19 @andykent committed Jul 2, 2008
Showing with 28 additions and 25 deletions.
  1. +20 −17 jquery.humanize.css
  2. +8 −8 jquery.humanize.js
View
37 jquery.humanize.css
@@ -1,23 +1,26 @@
.feedback {
- display: block;
- position: fixed;
- top: 100px;
- left: 25%;
- width: 43%;
- z-index: 100000;
- padding: .75em;
- font-size: 28px;
- color: #fff;
- background: #000;
- text-align: center;
- text-shadow: #333 -1px -1px 1px;
- -moz-border-radius: 8px;
- -webkit-border-radius: 8px;
- border: 2px solid #000;
+ font-size: 2.8em;
+ position: absolute;
+ left: 25%;
+ width: 50%;
+ top: 100px;
+ left: 25%;
+ width: 43%;
+ padding: .75em;
+ color: white;
+ background: #000;
+ text-align: center;
+ z-index: 100000;
+ text-shadow: #333 -1px -1px 1px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border: 2px solid #000;
}
+
.positive {
- border: 2px solid #00ff00;
+ border: 2px solid #00ff00;
}
+
.negative {
- border: 2px solid #ff0000;
+ border: 2px solid #ff0000;
}
View
16 jquery.humanize.js
@@ -17,29 +17,29 @@
} else {
var o = $.extend($.humanize.defaults, msg||{});
};
+ $.humanize.mouseCatch = o.movementThreshold;
$(o.baseSelector).css('opacity',0)
.animate({opacity:o.opacity},o.fadeIn);
- $(window).mousemove($.humanize.remove).click($.humanize.remove).keypress($.humanize.remove)
+ $(document).mousemove($.humanize.remove).click($.humanize.remove).keypress($.humanize.remove)
};
$.humanize.defaults = {
baseSelector : '.feedback',
container : '<p class="feedback">&nbsp;</p>',
fadeIn : {easing:'swing', duration:1000},
fadeOut : {easing:'swing', duration:1000},
- opacity : 0.8
+ opacity : 0.7,
+ movementThreshold : 3
};
- $.humanize.mouseCatch = true; // a horrid hack for Safari because it triggers a mousemove event on refresh.
+ $.humanize.mouseCatch = 3;
$.humanize.remove = function(e) {
if(e.type=='mousemove' && $.humanize.mouseCatch) {
- $.humanize.mouseCatch=false;
+ $.humanize.mouseCatch-=1;
return
- } else {
- $.humanize.mouseCatch=true;
- }
+ };
var o = $.humanize.defaults;
$(o.baseSelector)
.animate({opacity:0},o.fadeOut);
- $(window)
+ $(document)
.unbind('mousemove',$.humanize.remove)
.unbind('click',$.humanize.remove)
.unbind('keypress',$.humanize.remove)

0 comments on commit 7f4c748

Please sign in to comment.
Something went wrong with that request. Please try again.