资源说明:Swap image with YUI
Introduction ---------------- Swap image with YUI, flexible and easy way. * For YUI 2.x * A-Grade browsers support jQuery version also available: https://github.com/tszming/jquery-swapimage Also have a look at my Metadata plugin for YUI (https://github.com/tszming/yui-metadata), which is a smart way to store data in DOM elements. ---- ### Basic Usage 1. Include the scripts required: 2. Enable the plugin (Refer to the *example.html* in the download package for more examples) // Note: The above method call is equalivant to... YAHOO.plugin.SwapImage.bind(".swapImage", true, true, "mouseover", "mouseout"); /* 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 = mouseover. 5th parameter: Event for swap Out, default = mouseout. Valid events such as: mouseover, mouseout, click, dblclick etc. */ 3. Add your own images 4. Done. ---- ### Using YUI Loader ``` ``` ---- ### Advanced Usage 1. *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. ---- ### License Copyright (c) 2011 tszming (tszming@gmail.com) Dual licensed under the MIT and GPL licenses: http://www.opensource.org/licenses/mit-license.php http://www.gnu.org/licenses/gpl.html
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。