jquery插件 cluetip 關(guān)鍵詞注釋
更新時(shí)間:2010年01月12日 00:42:14 作者:
有時(shí),要實(shí)現(xiàn)對于一篇文章的關(guān)鍵詞部分的提示,想實(shí)現(xiàn)的效果比如是,當(dāng)鼠標(biāo)移動到這個(gè)關(guān)鍵詞時(shí),彈出相關(guān)的一段文字或圖片的介紹。
這個(gè)可以用jquery的一個(gè)插件cluetip
地址下載是:plugins.learningjquery.com/cluetip/demo/
下面簡單講解下用法:
1 首先當(dāng)然要放JQUERY的基本JS,和這個(gè)插件的JS了,如:
<a class="title" href="#" title="This is the title|The first set of contents comes after the first delimiter.....
$('a.title').cluetip({splitTitle: '|'});
這樣就會在該連接被點(diǎn)時(shí),彈出一個(gè)框,標(biāo)題是this is the title,內(nèi)容是|號后面的內(nèi)容了
2 也可以彈出的內(nèi)容是個(gè)連接,比如
<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 當(dāng)鼠標(biāo)移動到某連接時(shí)彈出:
<h4 title="Fancy Title!" id="ajax3.htm">Hover over me</h4>
$('h4').cluetip({attribute: 'id', hoverClass: 'highlight'});
5 當(dāng)用戶主動點(diǎn)這個(gè)連接時(shí),才彈出提示
<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});
地址下載是:plugins.learningjquery.com/cluetip/demo/
下面簡單講解下用法:
1 首先當(dāng)然要放JQUERY的基本JS,和這個(gè)插件的JS了,如:
<a class="title" href="#" title="This is the title|The first set of contents comes after the first delimiter.....
$('a.title').cluetip({splitTitle: '|'});
這樣就會在該連接被點(diǎn)時(shí),彈出一個(gè)框,標(biāo)題是this is the title,內(nèi)容是|號后面的內(nèi)容了
2 也可以彈出的內(nèi)容是個(gè)連接,比如
<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 當(dāng)鼠標(biāo)移動到某連接時(shí)彈出:
<h4 title="Fancy Title!" id="ajax3.htm">Hover over me</h4>
$('h4').cluetip({attribute: 'id', hoverClass: 'highlight'});
5 當(dāng)用戶主動點(diǎn)這個(gè)連接時(shí),才彈出提示
<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});
相關(guān)文章
jQuery實(shí)現(xiàn)簡單飛機(jī)大戰(zhàn)
這篇文章主要為大家詳細(xì)介紹了jQuery實(shí)現(xiàn)簡單飛機(jī)大戰(zhàn),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2020-07-07jQuery實(shí)現(xiàn)select下拉框獲取當(dāng)前選中文本、值、索引
本篇文章主要介紹了jQuery實(shí)現(xiàn)select下拉框獲取當(dāng)前選中文本、值、索引以及添加/刪除Select的Option項(xiàng)的相關(guān)知識,具有很好的參考價(jià)值。下面跟著小編一起來看下吧2017-05-05jquery調(diào)取json數(shù)據(jù)實(shí)現(xiàn)省市級聯(lián)的方法
這篇文章主要介紹了jquery調(diào)取json數(shù)據(jù)實(shí)現(xiàn)省市級聯(lián)的方法,可實(shí)現(xiàn)讀取json數(shù)據(jù)綁定到下拉菜單的功能,非常具有實(shí)用價(jià)值,需要的朋友可以參考下2015-01-01jQuery插件Zclip實(shí)現(xiàn)完美兼容個(gè)瀏覽器點(diǎn)擊復(fù)制內(nèi)容到剪貼板
本文將結(jié)合實(shí)例講解如何使用一款基于jQuery的插件——Zclip來實(shí)現(xiàn)復(fù)制內(nèi)容到剪貼板的功能。其實(shí)IE上有個(gè)方法可以實(shí)現(xiàn)點(diǎn)擊復(fù)制,但是由于只是IE獨(dú)有,所以我們不提倡。而Zclip是利用一個(gè)隱藏的flash文件來完成復(fù)制的功能,關(guān)鍵是它兼容當(dāng)前各主流瀏覽器。2015-04-04Jquery中使用setInterval和setTimeout的方法
有時(shí)候需要在jquery中調(diào)用setInterval和setTimeout,直接在ready中調(diào)用其他方法,會提示缺少對象的錯(cuò)誤,解決方法如下2013-04-04jQuery Selectors(選擇器)的使用(六、屬性篇)
本系列文章主要講述jQuery框架的選擇器(Selectors)使用方法,我將以實(shí)例方式進(jìn)行講述,以簡單,全面為基礎(chǔ),不會涉及很深,我的學(xué)習(xí)方法:先入門,后進(jìn)階!2009-12-12