Home > Web Front-end > JS Tutorial > body text

picChange function code for picture switching effects_javascript skills

WBOY
Release: 2016-05-16 18:28:06
Original
1230 people have browsed it

picChange function code for picture switching effects_javascript skills

Extensible encapsulation method to facilitate the realization of different special effects. The source code provides the implementation method of the fade-out effect (fade function) and the move-out effect (move function).

One sentence function call to achieve image switching special effects.
picChange("id of picture ul list", method reference for switching pictures, picture switching time, picture moving direction);
Use the simplest calling method and the most concise html code to implement this commonly used picture switching Effect.
Usage example:

html code:

Copy code The code is as follows:



  • ””

  • ””

  • ……



Calling method:
Copy code The code is as follows :

//Direct switching effect
picChange("picChange");
//Fade out effect
picChange("picChange",fade,500);
/ /Move the effect up
picChange(“picChange”,move,500,”up”);
//Move the effect down
picChange(“picChange”,move,500,”down”);
//Move the effect to the left
picChange(“picChange”,move,500,”left”);
//Move the effect to the right
picChange(“picChange”,move,500,”right ”);

Watch the demo here: http://demo.jb51.net/js/picChange/index.html

Package download address
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template