简单的tooltip插件: jQuery.popup
2008-04-01 15:45
337 查看
Document
requires: <script type="text/javascript" src="jquery-1.2.3.min.js"></script> <script type="text/javascript" src="jquery.dimensions.pack.js"></script> <script type="text/javascript" src="jquery.popup.js"></script> --------------- example: $('<p>some tooltip here.</p>').popup('this is title.', $('#source'), {widht:200}, {close:'timeout'}); --------------- $.fn.popup = function(title, element, location, closeType, classes){...} --------------- title string, title text of popup --------------- element element, the element that popup's position is based on --------------- location width, height integer, size of the popup space integer, space between element and popup vertical string, one of 'default', 'below', 'above', 'middle' horizontal string, one of 'left', 'right', 'center', 'default' --------------- closeType close string, one of 'timeout', 'mouseout', 'click', 'closeButton' delay integer, when using 'timeout', how long before hiding element element, when using 'mouseout', 'click', the event source element --------------- classes popup string, class of the whole popup title string, class of the title closeButton string, class of the close button content string, class of tooltip content
Example
This is a basic example. Move mouse over this.$(function(){ $('#basic').mouseover(function(){ $('#tip').popup('',$('#basic'),{},{close:'timeout',delay:1000}); }); });
Another Example
This is another example. Click here to show/hide the popup.$(function(){ $('#ex2').click(function(){ $('#tip').popup('This is the title.', $('#ex2'), {space:20, vertical:'above', height:50}, {close:'click'}); }); });
Example 3
This is a third example.span#show$(function(){ $('#show').click(function(){ $('<p>inline popup content.</p>').popup('a title', $('#adv'), {width:300}, {close: 'closeButton'}); }); });
what ever it is!
Download
Click here to download.By: deerchao
相关文章推荐
- 简单实用的jQuery Tooltip提示插件
- qTip--基于JQuery的Tooltip插件
- jquery简单多图片前后滚动插件
- jquery 验证插件的简单入门使用
- 简单实用的jquery分页插件
- ASP.NET jQuery 实例12 通过使用jQuery validation插件简单实现用户注册页面验证功能
- jquery简单插件制作(fn.extend)完整实例
- JQuery插件让图片旋转任意角度且代码极其简单 - 摘自网友
- 基于jquery的一个简单的脚本验证插件
- jQuery插件简单实现方法
- sDashboard:简单的,轻量级的 jQuery 仪表板插件
- 一个简单的全选Jquery插件
- jQuery简单自定义图片轮播插件及用法示例
- 流行的jQuery信息提示插件(jQuery Tooltip Plugin)
- 五滴水:使用Ajax+jQuery来实现前端收到的数据在console上显示+简单的主页设计与bootstrap插件实现图片轮播
- jquery表单验证插件——使用方式非常简单,明了
- 分享10个使用简单的jQuery的拖放插件(drag and drop plugin)
- jquery.qtip插件的简单入门
- jquery的Tooltip插件 qtip使用详细说明
- 【新作】JQuery 无限级超简单之下拉菜单插件iMenu