public
Description: A jQuery port of the humanized dialog display technique. (http://www.humanized.com/weblog/2006/09/11/monolog_boxes_and_transparent_messages/)
Clone URL: git://github.com/andykent/jquery-humanize-messages-plugin.git
Search Repo:
Backported a bunch of IE fixes from Amnesty. mostly related to layout.
andykent (author)
Wed Jul 02 02:45:39 -0700 2008
commit  7f4c748b973459c79d804260db144ad2b22aad19
tree    5a66683755bb2d81540e401aab35db374e28d4bc
parent  e4fe8b1a63c9ecaaf7545b660c74438a90c5cfa4
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
19
 
20
 
21
22
 
23
...
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
21
22
23
24
 
25
26
0
@@ -1,23 +1,26 @@
0
 .feedback {
0
- display: block;
0
- position: fixed;
0
- top: 100px;
0
- left: 25%;
0
- width: 43%;
0
- z-index: 100000;
0
- padding: .75em;
0
- font-size: 28px;
0
- color: #fff;
0
- background: #000;
0
- text-align: center;
0
- text-shadow: #333 -1px -1px 1px;
0
- -moz-border-radius: 8px;
0
- -webkit-border-radius: 8px;
0
- border: 2px solid #000;
0
+ font-size: 2.8em;
0
+ position: absolute;
0
+ left: 25%;
0
+ width: 50%;
0
+ top: 100px;
0
+ left: 25%;
0
+ width: 43%;
0
+ padding: .75em;
0
+ color: white;
0
+ background: #000;
0
+ text-align: center;
0
+ z-index: 100000;
0
+ text-shadow: #333 -1px -1px 1px;
0
+ -moz-border-radius: 8px;
0
+ -webkit-border-radius: 8px;
0
+ border: 2px solid #000;
0
 }
0
+
0
 .positive {
0
- border: 2px solid #00ff00;
0
+ border: 2px solid #00ff00;
0
 }
0
+
0
 .negative {
0
- border: 2px solid #ff0000;
0
+ border: 2px solid #ff0000;
0
 }
...
17
18
19
 
20
21
22
 
23
24
25
26
27
28
29
 
 
30
31
 
32
33
34
 
35
36
37
38
 
39
40
41
42
 
43
44
45
...
17
18
19
20
21
22
 
23
24
25
26
27
28
29
 
30
31
32
 
33
34
35
 
36
37
 
 
 
38
39
40
41
 
42
43
44
45
0
@@ -17,29 +17,29 @@
0
     } else {
0
       var o = $.extend($.humanize.defaults, msg||{});
0
     };
0
+ $.humanize.mouseCatch = o.movementThreshold;
0
     $(o.baseSelector).css('opacity',0)
0
     .animate({opacity:o.opacity},o.fadeIn);
0
- $(window).mousemove($.humanize.remove).click($.humanize.remove).keypress($.humanize.remove)
0
+ $(document).mousemove($.humanize.remove).click($.humanize.remove).keypress($.humanize.remove)
0
   };
0
   $.humanize.defaults = {
0
     baseSelector : '.feedback',
0
     container : '<p class="feedback">&nbsp;</p>',
0
     fadeIn : {easing:'swing', duration:1000},
0
     fadeOut : {easing:'swing', duration:1000},
0
- opacity : 0.8
0
+ opacity : 0.7,
0
+ movementThreshold : 3
0
   };
0
- $.humanize.mouseCatch = true; // a horrid hack for Safari because it triggers a mousemove event on refresh.
0
+ $.humanize.mouseCatch = 3;
0
   $.humanize.remove = function(e) {
0
     if(e.type=='mousemove' && $.humanize.mouseCatch) {
0
- $.humanize.mouseCatch=false;
0
+ $.humanize.mouseCatch-=1;
0
      return
0
- } else {
0
- $.humanize.mouseCatch=true;
0
- }
0
+ };
0
     var o = $.humanize.defaults;
0
       $(o.baseSelector)
0
       .animate({opacity:0},o.fadeOut);
0
- $(window)
0
+ $(document)
0
         .unbind('mousemove',$.humanize.remove)
0
         .unbind('click',$.humanize.remove)
0
         .unbind('keypress',$.humanize.remove)

Comments

    No one has commented yet.