Commit:    a5847c30c63284ca3aa623d5ee0222a1093126a3
Author:    Ben Scholzen <[email protected]>         Wed, 8 Jan 2014 13:33:37 
+0100
Parents:   a1173b6333445a08e374690847e2cb47f2e85532
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=a5847c30c63284ca3aa623d5ee0222a1093126a3

Log:
Do usernote fading with CSS transitions instead of jQuery

Changed paths:
  M  js/common.js
  M  styles/theme-medium.css


Diff:
diff --git a/js/common.js b/js/common.js
index b5afc96..6b2127c 100755
--- a/js/common.js
+++ b/js/common.js
@@ -545,12 +545,12 @@ $(document).ready(function() {
       if (event.type === 'mouseleave' && $note.data('opacity') !== undefined) 
{ 
         opacity = $note.data('opacity');
       }
-      $note.fadeTo('fast', opacity);
+      $note.css('opacity', opacity);
     }).find('.note').each(function() {
       $(this).find('.tally:contains("-")').each(function(){
         var id = this.id.replace('V', 'Hcom');
         var v = mapper.normalize(this.innerHTML.toInt());
-        $('#' + id).fadeTo(0, v).data("opacity", v);
+        $('#' + id).css('opacity', v).data("opacity", v);
       });
     });
   }
diff --git a/styles/theme-medium.css b/styles/theme-medium.css
index c37669f..c6c38ad 100755
--- a/styles/theme-medium.css
+++ b/styles/theme-medium.css
@@ -215,6 +215,12 @@ div.warning:before {
   box-shadow:
     inset 1px 0 1px -1px #CCC,
     inset -1px 0 1px -1px #CCC;
+
+  -webkit-transition: opacity 0.4s;
+  -moz-transition: opacity 0.4s;
+  -o-transition: opacity 0.4s;
+  -ms-transition: opacity 0.4s;
+  transition: opacity 0.4s;
 }
 #usernotes .note .votes .tally {
   color: #262626;


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to