《JQuery——插件的开发和使用(二)之qTip2 插件的使用》
16lz
2021-01-22
what is qtip?
introducing : qTip is an advanced tooltip plugin for the ever popular jQuery JavaScript framework.
Built from the ground up to be user friendly, yet feature rich, qTip provides you with tonnes of features like rounded corners and speech bubble tips, and best of all… it’s completely free under the MIT license!
How to use it?
simple demo:
- html code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="jquery.qtip.css">
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src = "jquery.qtip.js"></script>
</HEAD>
<BODY>
<a href="#test" title="My tooltip text">Sample link</a>
<script type = "text/javascript">
// Create the tooltips only when document ready
$(document).ready(function () {
// This will automatically grab the 'title' attribute and replace
// the regular browser tooltips for all <a> elements with a title attribute!
$('a[title]').qtip();
});
</script>
</BODY>
</HTML>
- core JavaScript code:
// Create the tooltips only when document ready
$(document).ready(function () {
// This will automatically grab the 'title' attribute and replace
// the regular browser tooltips for all <a> elements with a title attribute!
$('a[title]').qtip();
});
it gose like that:
小结:
到现在为止,知道怎么用别人的插件了吗?赶快来试试吧。
更多相关文章
- Dreamweaver Cs4 jQuery自动提示插件绿色版
- zTree -- jQuery 树插件 使用小结
- Chosen 基于jquery的选择框插件使用方法
- 使用jquery tablesorter插件,有一个选中项目的下拉框
- 非常好用的JQuery自动补全插件bigautocomplete
- 查询下拉框只显示年份(jquery年份插件)
- jquery省市二级联动插件
- jquery插件——仿新浪微博限制输入字数的textarea
- jQuery插件实现网页底部自动加载-类似新浪微博