Javascript examples for jQuery Method and Property:fadeTo
Write A Simple Click Opacity Fade
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> </head> <body> <div id="soilink"> soilink/*from w ww . j av a 2 s. c o m*/ </div> <h1 id="soi">SOI</h1> <script> var fades=[0,1], f=0; $('#soilink').click(function() { $('#soi').stop().fadeTo(300, fades[f++%2]); }); </script> </body> </html>