Scalable encapsulation to facilitate different effects. The source code provides the fade function and the move function.
One-sentence function call to achieve image switching special effects.
PicChange ("id of the image ul list", switching the image method reference, image switching time, and image moving direction );
Use the simplest call method and the most concise html code to implement this commonly used image switching effect.
Example:
Html code:
Copy codeThe Code is as follows:
<Div id = "win">
<Ul id = "picChange">
<Li> </li>
<Li> </li>
......
</Ul>
</Div>
Call method:
Copy codeThe Code is as follows:
// Directly switch results
PicChange ("picChange ");
// Fade out Effect
PicChange ("picChange", fade, 500 );
// Move up
PicChange ("picChange", move, 500, "up ");
// Downward Removal Effect
PicChange ("picChange", move, 500, "down ");
// Remove the effect from the left
PicChange ("picChange", move, 500, "left ");
// Remove to the right
PicChange ("picChange", move, 500, "right ");
See Demo slam here: http://demo.jb51.net/js/picChange/index.html
Package