当前位置: 首页 > 图文教程 > 网络编程 > Javascript > jquery插件 cluetip 关键词注释

Javascript
form中限制文本字节数js代码
use jscript with List Proxy Server Information
use jscript List Installed Software
List Installed Software Features
List Information About the Binary Files Used by an Application
List the Codec Files on a Computer
List the UTC Time on a Computer
List Installed Hot Fixes
excel操作之Add Data to a Spreadsheet Cell
Add Formatted Data to a Spreadsheet
Apply an AutoFormat to an Excel Spreadsheet
JavaScript语法着色引擎(demo及打包文件下载)
类之Prototype.js学习
一款JavaScript压缩工具:X2JSCompactor
iis6+javascript Add an Extension File
jscript之Open an Excel Spreadsheet
jscript之Read an Excel Spreadsheet
jscript之List Excel Color Values
去除图像或链接黑眼圈的两种方法总结
Add a Formatted Table to a Word Document

Javascript 中的 jquery插件 cluetip 关键词注释


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-20   浏览: 304 ::
收藏到网摘: n/a

有时,要实现对于一篇文章的关键词部分的提示,想实现的效果比如是,当鼠标移动到这个关键词时,弹出相关的一段文字或图片的介绍。 这个可以用jquery的一个插件cluetip
地址下载是:plugins.learningjquery.com/cluetip/demo/
下面简单讲解下用法:
1 首先当然要放JQUERY的基本JS,和这个插件的JS了,如:
<a class="title" href="#" title="This is the title|The first set of contents comes after the first delimiter.....
$('a.title').cluetip({splitTitle: '|'});
这样就会在该连接被点时,弹出一个框,标题是this is the title,内容是|号后面的内容了
2 也可以弹出的内容是个连接,比如
<a class="basic" href="ajax.htm" rel="ajax.htm">
$('a.basic').cluetip();
3 定义弹出框的高度大小等:
<a class="custom-width" href="ajax3.htm" rel="ajax3.htm">
$('a.custom-width').cluetip({width: '200px', showTitle: false});

4 当鼠标移动到某连接时弹出:
<h4 title="Fancy Title!" id="ajax3.htm">Hover over me</h4>
$('h4').cluetip({attribute: 'id', hoverClass: 'highlight'});

5 当用户主动点这个连接时,才弹出提示
<a href="ajaxclick.htm" rel="ajax5.htm" title="active ingredients">
$('#clickme').cluetip({activation: 'click', width: 650});
6 圆角的
<a href="ajax4.htm" title="|first line body|second line body">
$('ol.rounded a:eq(0)').cluetip({splitTitle: '|', dropShadow: false, cluetipClass: 'rounded', showTitle: false});