jQuery imgDesc

jQuery imgDesc
 点击下载
Description
This plugin is written with the develpment of PageTalks, accidently. As PageTalks is based on jQuery Libary, jQuery code is required.
Requirements
jQuery Libary, just downlaod from
imgDesc script file(oops……)
a little knowledge on xhtml and js
Features
This plugin will automatically take title attribute in IMG tag as the description of the image. If IMG is not wrapped by a Anchor tag, the plugin will wrap it with one. This plugin currently support two parameters, all of which are optional.
autohide if the plugin should automatically hide the description and show it when mouseover. Default "yes"
text Customize the value of description. Default value is the title attribut of IMG tag
Usage
Load jQuery Libary
You can directly add the following code in <head> tag:
  1. <script type="text/javascript" src="jquery..js"></script> 
Load imgDesc Plugin
  1. <script type="text/javascript" src="jquery.imgdesc.js"></script> 
Assing the target object

follow the jQuery code style:$("img").imgDesc();You can, of course , apply some change, customizing the way it show up and the value of description:$("img").imgDesc({autohide: "yes", text : "This is a sample text!"}); 

转载请注明:代码家园 » jQuery imgDesc

评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)