jquery插件 cluetip 關(guān)鍵詞注釋
更新時(shí)間:2010年01月12日 00:42:14 作者:
有時(shí),要實(shí)現(xiàn)對(duì)于一篇文章的關(guān)鍵詞部分的提示,想實(shí)現(xiàn)的效果比如是,當(dāng)鼠標(biāo)移動(dòng)到這個(gè)關(guān)鍵詞時(shí),彈出相關(guān)的一段文字或圖片的介紹。
這個(gè)可以用jquery的一個(gè)插件cluetip
地址下載是:plugins.learningjquery.com/cluetip/demo/
下面簡(jiǎn)單講解下用法:
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: '|'});
這樣就會(huì)在該連接被點(diǎn)時(shí),彈出一個(gè)框,標(biāo)題是this is the title,內(nèi)容是|號(hào)后面的內(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)移動(dòng)到某連接時(shí)彈出:
<h4 title="Fancy Title!" id="ajax3.htm">Hover over me</h4>
$('h4').cluetip({attribute: 'id', hoverClass: 'highlight'});
5 當(dāng)用戶主動(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/
下面簡(jiǎn)單講解下用法:
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: '|'});
這樣就會(huì)在該連接被點(diǎn)時(shí),彈出一個(gè)框,標(biāo)題是this is the title,內(nèi)容是|號(hào)后面的內(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)移動(dòng)到某連接時(shí)彈出:
<h4 title="Fancy Title!" id="ajax3.htm">Hover over me</h4>
$('h4').cluetip({attribute: 'id', hoverClass: 'highlight'});
5 當(dāng)用戶主動(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+PHP+MySQL實(shí)現(xiàn)無(wú)限級(jí)聯(lián)下拉框效果
這篇文章主要介紹了jQuery+PHP+MySQL實(shí)現(xiàn)無(wú)限級(jí)聯(lián)效果的相關(guān)資料,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2016-02-02
jQuery插件DataTables分頁(yè)開發(fā)心得體會(huì)
這篇文章主要為大家分享了jQuery插件DataTables分頁(yè)開發(fā)心得體會(huì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-08-08
jQuery之DOM對(duì)象和jQuery對(duì)象的轉(zhuǎn)換與區(qū)別分析
這篇文章主要介紹了jQuery之DOM對(duì)象和jQuery對(duì)象的轉(zhuǎn)換與區(qū)別分析,對(duì)比分析了DOM對(duì)象和jQuery對(duì)象的原理與用法,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-01-01
jQuery實(shí)現(xiàn)的頁(yè)面詳情展開收起功能示例
這篇文章主要介紹了jQuery實(shí)現(xiàn)的頁(yè)面詳情展開收起功能,涉及jQuery事件綁定及頁(yè)面元素屬性動(dòng)態(tài)修改相關(guān)操作技巧,需要的朋友可以參考下2018-06-06
jquery 與NVelocity 產(chǎn)生沖突的解決方法
有時(shí)候使用jquery 與NVelocity的時(shí)候,會(huì)產(chǎn)生沖突,下面是具體的解決方法,需要的朋友可以參考下。2011-06-06

