没有任何数据可供显示
| 开源项目社区 | 当前位置 : |
|
| www.trustie.net/open_source_projects | 主页 > 开源项目社区 > jquery-swapimage |
|
jquery-swapimage
|
| 1 | 0 | 13 |
| 贡献者 | 讨论 | 代码提交 |
Swap image with jQuery, flexible and easy way.
For jQuery 1.2 to 1.4.1 A-Grade browsers support, and Google Chrome YUI version now also available: http://code.google.com/p/yui-swapimage/
Basic Usage1. Include the scripts required:
2. Enable the plugin (Refer to the example.html in the download package for more examples)
$.swapImage(".swapImage");
Note: The above method call is equalivant to...
$.swapImage(".swapImage", true, true, "mouseenter", "mouseleave");
/*
1st parameter: Images to be selected.
2nd parameter: Preload the image or not, default = true.
3rd parameter: Repeat the effect or not, default = true.
4th parameter: Event for swap In, default = mouseenter.
5th parameter: Event for swap Out, default = mouseleave.
Valid events such as: mouseenter, mouseleave, click, dblclick.
*/3. Add your own images
4. Done.
Advanced Usage1. Disjoint rollovers (1): When cursor is entering the image, beside itself, elements specified in sin array will swap by themselve; when cursor is leaving the image, those elements will restore.
2. Disjoint rollovers (2) : When cursor is entering the image, elements specified in sin array will load the image after the colon; when mouse is leaving the image, those image elements will be replaced again.
Documentions and demoPlease view the source code of this link: http://labs.xddnet.com/jquery-swapimage/example/example.html
ContactFeedback and suggestions are always welcome, you can reach me at tszming at gmail dot com.
标签:
