Sha256: dd8ee6441413effc96df67e478e3c9387ddba3dc9c842859082a117543d42edd
Contents?: true
Size: 1.01 KB
Versions: 8
Compression:
Stored size: 1.01 KB
Contents
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Animate Visual Test : Animate backgroundColor rgb</title> <link rel="stylesheet" href="../visual.css" type="text/css" /> <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css"> <script type="text/javascript" src="../../../jquery-1.5.1.js"></script> <script type="text/javascript" src="../../../ui/jquery.effects.core.js"></script> <script type="text/javascript"> function randomColorRGB() { return 'rgb(' + Math.floor(Math.random()*256) + ', ' + Math.floor(Math.random()*256) + ', ' + Math.floor(Math.random()*256) + ')'; } $(function() { $("#go").click(function() { $("#animate-backgroundColor").stop().animate({ backgroundColor: randomColorRGB() }, "fast"); }); }) </script> <style type="text/css"> #animate-backgroundColor { width: 100px; height: 100px; background-color: gray; } </style> </head> <body> <div id="animate-backgroundColor"></div> <button id="go">Go</button> </body> </html>
Version data entries
8 entries across 7 versions & 1 rubygems