client/player/development-bundle/docs/animate.html
changeset 1 436d4791d7ac
equal deleted inserted replaced
0:ecdfc63274bf 1:436d4791d7ac
       
     1 <p>The jQuery UI effects core extends the <a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a> function to be able to animate colors as well. It's heavily used by the class transition feature and it's able to color animate the following properties:
       
     2 </p>
       
     3 <ul><li> <b>backgroundColor</b>
       
     4 </li><li> <b>borderBottomColor</b>
       
     5 </li><li> <b>borderLeftColor</b>
       
     6 </li><li> <b>borderRightColor</b>
       
     7 </li><li> <b>borderTopColor</b>
       
     8 </li><li> <b>color</b>
       
     9 </li><li> <b>outlineColor</b>
       
    10 </li></ul>
       
    11 <p>with one of the following combinations:
       
    12 </p>
       
    13 <ul><li> <b>hex (#FF0000)</b>
       
    14 </li><li> <b>rgb (rgb(255,255,255))</b>
       
    15 </li><li> <b>names ("black")</b>
       
    16 </li></ul>
       
    17 <p><br />
       
    18 </p><p><div class="options list"><table class="options examples" cellspacing="0"><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody>
       
    19 </table><b class="options">Example:</b><table class="options examples" cellspacing="0"><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody>
       
    20 <div class="example">
       
    21 <ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
       
    22 <div id="demo" class="tabs-container" rel="125">
       
    23 A simple color animation.<br />
       
    24 </p>
       
    25 <pre>$(&quot;.block&quot;).<a href="http://docs.jquery.com/Events/toggle" title="Events/toggle">toggle</a>(function() {
       
    26     $(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: &quot;black&quot; }, 1000);
       
    27 },function() {
       
    28     $(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: &quot;#68BFEF&quot; }, 500);
       
    29 });
       
    30 
       
    31 </pre>
       
    32 <p></div><div id="source" class="tabs-container">
       
    33 </p>
       
    34 <pre>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
       
    35                     "<a href="http://www.w3.org/TR/html4/loose.dtd" class="external free" title="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>"&gt;
       
    36 &lt;html&gt;
       
    37 &lt;head&gt;
       
    38   &lt;script src="<a href="http://code.jquery.com/jquery-latest.js" class="external free" title="http://code.jquery.com/jquery-latest.js">http://code.jquery.com/jquery-latest.js</a>"&gt;&lt;/script&gt;
       
    39   
       
    40   &lt;script src=&quot;http://jqueryui.com/latest/ui/effects.core.js&quot;&gt;&lt;/script&gt;
       
    41 
       
    42   &lt;script&gt;
       
    43   $(document).ready(function(){
       
    44     $(&quot;.block&quot;).<a href="http://docs.jquery.com/Events/toggle" title="Events/toggle">toggle</a>(function() {
       
    45     $(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: &quot;black&quot; }, 1000);
       
    46 },function() {
       
    47     $(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: &quot;#68BFEF&quot; }, 500);
       
    48 });
       
    49 
       
    50   });
       
    51   &lt;/script&gt;
       
    52   &lt;style&gt;
       
    53   .block { 
       
    54     color: white;
       
    55     background-color: #68BFEF;
       
    56     width: 150px; 
       
    57     height: 70px;
       
    58     margin: 10px; 
       
    59   }
       
    60   &lt;/style&gt;
       
    61 &lt;/head&gt;
       
    62 &lt;body&gt;
       
    63   &lt;div class=&quot;block&quot;&gt; Click me&lt;/div&gt;
       
    64 &lt;/body&gt;
       
    65 &lt;/html&gt;
       
    66 </pre>
       
    67 <p></div>
       
    68 </p><p></div>
       
    69 </p><p></tbody></table></div>
       
    70 </p><!-- 
       
    71 Pre-expand include size: 3730 bytes
       
    72 Post-expand include size: 5382 bytes
       
    73 Template argument size: 3450 bytes
       
    74 Maximum: 2097152 bytes
       
    75 -->
       
    76 
       
    77 <!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3094-1!1!0!!en!2 and timestamp 20100421092229 -->