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

Javascript
Add a Table to a Word Document
Add Formatted Text to a Word Document
用jscript实现新建word文档
用jscript实现新建和保存一个word文档
Open and Print a Word Document
Use Word to Search for Files
Convert Seconds To Hours
Sample script that deletes a SQL Server database
Sample script that displays all of the users in a given SQL Server DB
firefox中用javascript实现鼠标位置的定位
div+css实现鼠标放上去,背景跟图片都会变化。
Locate a File Using a File Open Dialog Box
Save a File Using a File Save Dialog Box
用jscript实现列出安装的软件列表
List the Stored Procedures in a SQL Server database
Display SQL Server Login Mode
Display SQL Server Version Information
List all the Databases on a SQL Server
用jscript启动sqlserver
Stop SQL Server

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-20   浏览: 331 ::
收藏到网摘: 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});