対象Nodeの指定した部分の色を、現在の色から目的の色まで8ステップで推移させる。
タッチデバイスでは動作しないサンプル。(マウスオーバーに反応)
HTML :
<button type="button" onmouseover="$aniColor($id('sample1'),'backgroundColor','31b1bc')" onmouseout="$aniColor($id('sample1'),'backgroundColor','rgba(#c6dbde,0.3)')">背景色を変更</button>
<button type="button" onmouseover="$aniColor($id('sample1'),'txt','#31b1bc')" onmouseout="$aniColor($id('sample1'),'txt','#000')">文字色を変更</button>
<button type="button" onmouseover="$aniColor('sample1','bc','31b1bc')" onmouseout="$aniColor('sample1','bc','edf2f3')">ボーダー色を変更</button>
<button type="button" onmouseover="$aniColor('sample1','bt bb','#31b1bc')" onmouseout="$aniColor('sample1','bt bb','#edf2f3')">上下のボーダー色を変更</button>
<div id="sample1">SAMPLE BOX</div>
タッチデバイスでも動作するサンプル。(クリック/タップに反応)
HTML :
<button type="button" onclick="$aniColor('sample2','backgroundColor','#31b1bc',true)">背景色を変更</button>
<button type="button" onclick="$aniColor('sample2','backgroundColor','rgba(#c6dbde,0.3)',true)">背景色を戻す</button>
<button type="button" onclick="$aniColor('sample2','bl br','31b1bc',true)">左右のボーダー色を変更</button>
<button type="button" onclick="$aniColor('sample2','bl br','#edf2f3',true)">左右のボーダー色を戻す</button>
<div id="sample2">SAMPLE BOX</div>