2010-01-19
tiptip 一款jquery插件 实现完美自适应的提示框工具
栏目:UX , javascript , web前端share
623 views
3 枚回复
tiptip 是一款实现提示框自适应的jquery的非常轻量级别的插件。
特点:
能自适应窗口的大小,调节显示位置,让提示框内容显示在窗口可是范围内
没有任何图片,完全由css创建样式。
tiptip遵守双重协议MIT 和GPL ,minify后端大小为3.5kb很小。
使用方法:
在显示提示框的标签中,加一个属性title ,然后在title中加入提示框要显示的内容。
然后在js中加入对应的tipTip方法即可
举个例子:
比如标签<span class=”system-tip” title=”天天欢迎大家”>天天 </span>
对应js:
$(".system-tip").tipTip();
注意:tipTip方法有默认的参数:demo:$(".system-tip").tipTip({maxWidth: "auto", edgeOffset: 10});
Options
- maxWidth: string (“200px” by default) – CSS
max-widthproperty for the TipTip element. This is a string so you can apply a percentage rule or ‘auto’. - edgeOffset: number (3 by default) – Distances the TipTip popup from the element with TipTip applied to it by the number of pixels specified.
- delay: number (400 by default) – Number of milliseconds to delay before showing the TipTip popup after you
mouseoveran element with TipTip applied to it. - fadeIn: number (200 by default) – Speed at which the TipTip popup will fade into view.
- fadeOut: number (200 by default) – Speed at which the TipTip popup will fade out of view.
- enter: callback function – Custom function that is run each time you
mouseoveran element with TipTip applied to it. - exit: callback function – Custom function that is run each time you
mouseoutof an element with TipTip applied to it.
468 X 60 广告位
标签: javascript , jquery , plugin , tiptip
转载注明:转自有米啦
本站遵循:署名-非商业性使用-禁止演绎 3.0 共享协议
收藏分享:
QQ书签 /
百度收藏 /
Google书签 /
收藏到鲜果 /
Digg /
Del.icio.us


