jQuery Plugin Poshy Tip 使用 统一提示信息
项目到了后期,发现前端的提示信息不统一,解决思路如下:
1.回顾系统中tip出现的场景:表单验证提示信息、数据列表中随填随显
2.确定问题域:多条提示信息层叠、信息显示风格不统一
3.结论:找出一款合适的tip插件进行整合快速的响应项目的需要
google关键词:jquery tooltip,检索了好多tip插件,最终选择了Poshy Tip,理由如下:
1.多种不同的外观。
2.同时可以作为 Form Tooltips使用
3.可以自定义气泡出现的位置
先来一个直观的认识:
Poshy Tip tooltip jquery
详细的参数说明如下:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
$.fn.poshytip.defaults = {// 提示内容默认为元素的标题,可以使指定的字符串、元素、回调函数、jquery对象content:'[title]',// 指定的tips class样式className:'tip-yellow',//按照像素计算背景图片和显示内容的内边距bgImageFrameSize:10,showTimeout:500,// 延时多久开始显示hideTimeout:100,// 延时多久开始隐藏timeOnScreen:0,// 自动隐藏之前延时多久//显示方式 支持'hover'鼠标划入、'focus' 获取焦点、'none'手动显式调用showOn:'hover',liveEvents:false,// 支持live 事件 同样可以对未来元素进行影响alignTo:'cursor',// 和谁进行对齐 ('cursor' 鼠标, 'target' 目标元素)// 水平方向对齐方式 可选参数://('right', 'center', 'left', 'inner-left', 'inner-right')alignX:'right',// 垂直方向对齐方式 可选参数://('bottom', 'center', 'top', 'inner-bottom', 'inner-top')alignY:'top',offsetX:-22,// 水平偏移量offsetY:18,// 垂直方向偏移量//hover显示方式下,允许鼠标离开元素仍然显示提示信息allowTipHover:true,// 提示信息随着鼠标移动 只在满足hover显示方式下,对齐方式为alignTo:'cursor' 才有效followCursor:false,fade:true,// 使用动画slide:true,// 使用slie效果slideOffset:8,// slide 动画的偏移量// 动画显示的时间间隔 如果不想动画效果,设置为0即可showAniDuration:300,// 动画隐藏的时间间隔 如果不想动画效果,设置为0即可hideAniDuration:300}; |
核心方法
|
1
2
3
4
5
6
7
8
9
10
11
|
.poshytip('show') 手动显示tip.poshytip('hide') 手动隐藏tip.poshytip('update', content, [ dontOverwriteOption ] ) 手动更新tip.poshytip('disable') tip不可用.poshytip('enable') tip可用.poshytip('destroy') 销毁tip |
官方网址:
http://vadikom.com/tools/poshy-tip-jquery-plugin-for-stylish-tooltips/
jQuery Plugin Poshy Tip 使用 统一提示信息的更多相关文章
- jQuery插件之-Poshy Tip
jQuery插件Poshy Tip是一个强大的jQuery Tooltips插件,它有多种不同的外观.同时可以作为 Form Tooltips使用,并且可以自定义气泡出现的位置.在处理表单验证提示上能 ...
- The ultimate jQuery Plugin List(终极jQuery插件列表)
下面的文章可能出自一位奥地利的作者, 列出很多jQuery的插件.类似的网站:http://jquerylist.com/原文地址: http://www.kollermedia.at/archiv ...
- JQuery Plugin 开发
学习 JQuery 插件开发之后, 可以将自己平时常用的功能封装成插件, 便于在不同的项目之间使用. JQuery 官网上的 插件开发教程就很不错, 简单易懂. 参考网址: http://learn. ...
- JQuery plugin ---- simplePagination.js API
CSS Themes "light-theme" "dark-theme" "compact-theme" How To Use Step ...
- jQuery plugin: Autocomplete 参数及实例
官网:jQuery plugin: Autocomplete (注:此插件已经不再更新.它的继任者是jQuery UI的一部分,) 此插件依赖于 jquery 1.2.6 --- j ...
- Signs of a poorly written jQuery plugin 翻译 (Jquery插件开发注意事项,Jquey官方推荐)
原文链接:http://remysharp.com/2010/06/03/signs-of-a-poorly-written-jquery-plugin/ 原文作者:remy sharp So far ...
- JQuery Plugin 1 - Simple Plugin
1. How do you write a plugin in jQuery? You can extend the existing jQuery object by writing either ...
- [jQuery] 自做 jQuery Plugin - Part 1
有時候寫 jQuery 時,常會發現一些簡單的效果可以重複利用.只是每次用 Copy & Paste 大法似乎不是件好事,有沒有什麼方法可以讓我們把這些效果用到其他地方呢? 沒錯,就是用 jQ ...
- ollicle.com: Biggerlink – jQuery plugin
ollicle.com: Biggerlink – jQuery plugin Biggerlink – jQuery plugin Purpose Demo Updated for jQuery 1 ...
随机推荐
- POJ3621Sightseeing Cows
Sightseeing Cows Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10595 Accepted: 3632 ...
- 文件上传框的美化+预览+ajax
1.文件上传基本写法: <input type="file" name="" id="" value="" /&g ...
- Python-通过socket实现一个小型的端口检测工具
实验机器IP:192.168.220.139,端口开放情况 代码 # -*- coding:utf-8 -*- __author__ = "MuT6 Sch01aR" import ...
- MY_SQLCode
一.SPC查询 根据日期查询 应用到了随机函数 NEWID()可以随机生成一个列值实现随机抓取记录 CONVERT(varchar(100),列名, 23) AS TestDat ...
- C语言连接mysql -select
C语言实现查询mysql数据库的行数,列的属性,以及每条记录. /* select.c */ #include <stdio.h> #include <stdlib.h> #i ...
- fsck修复系统断电或非正常关机导致的系统磁盘问题
问题描述: unexpected inconsistency; run fask mannally. (i.e., without -a or -p options) fsck repaire man ...
- 【转】eclipse中window->preference选项中没有tomcat的解决方法
eclipse中window->preference选项中没有tomcat的解决方法 2011-09-09 13:46:35| 分类: eclipse|字号 订阅 其实一共有好几种方法,这只是 ...
- 新编html网页设计从入门到精通 (龙马工作室) pdf扫描版
新编html网页设计从入门到精通共分为21章,全面系统地讲解了html的发展历史及4.0版的新特性.基本概念.设计原则.文件结构.文件属性标记.用格式标记进行页面排版.使用图像装饰页面.超链接的使用. ...
- 1.jQuery入口函数 与javaScript入口函数
1.jQuery入口函数 与javaScript入口函数 JQ入口函数: $(document).ready(function(){ }); 或者 $(function(){ }) Js入口函数: w ...
- ProtoBuf练习(六)
JSON类型 工程目录结构 $ ls proto/ proto文件 $ cat proto/style.proto syntax = "proto3"; import " ...