1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > qTip 基于JQuery的Tooltip插件[兼容性好]【jquery】

qTip 基于JQuery的Tooltip插件[兼容性好]【jquery】

时间:2020-01-02 14:11:19

相关推荐

qTip 基于JQuery的Tooltip插件[兼容性好]【jquery】

web前端|js教程

JQuery,Tooltip

web前端-js教程

主页:/projects/qtip/

下载:/projects/qtip/download

示例:/projects/qtip/

qTip是一个基于JQuery的Tooltip插件。它几乎支持所有的主流浏览器

例如:

104规约解析 源码,vscode代码提示中文,ubuntu退出当前,tomcat支持远程调试,编程爬虫图片,PHP模块有哪些,山东智能seo推广平台,个人网站免费模板,dedecms游戏模板lzw

Internet Explorer 6.0+

Firefox 2.0+

Opera 9.0+

Safari 3.0+

Google Chrome 1.0+

Konqueror 3.5+

php众筹平台源码,vscode长宽比列,戴尔ubuntu主机,tomcat启动出现繁体,Methanol爬虫,php 下载图片损坏,seo关键词收录,爱情纪念日网站源码,后台缴费管理系统模板lzw

使用qTip可以很轻松的定义tip的位置以及样式,同时qTip还有一个强大的API……

oa系统源码,vscode插件安装出错误,ubuntu打开etc,tomcat 项目重复启动,爬虫描述话语,php 配置文件设置时区,铜川专业的抖音seo团队lzw

使用qTip前,只需引入两个JS文件即可:

下面举几个比较简单的例子。

1、Basic text

html如下所示:

Basic text JS代码:

$(document).ready(function()

{

$(#content a[href]).qtip(

{

content: Some basic content for the tooltip

});

});

2、Title attribute

html如下所示:

Title attribute JS代码:

$(document).ready(function()

{

$(#content a[href][title]).qtip({

content: {

text: false

},

style: cream

});

});

3、Image

html如下所示:

Image JS代码:

$(document).ready(function()

{

$(#content a[href]).qtip({

content: \

});

});

4、Corner values

html如下所示:

Corner values JS代码:

var corners = ottomLeft;

var opposites = opRight;

$(document).ready(function()

{

$(#content a)

.hover(function()

{

$(this).html(opposites)

.qtip({

content: corners,

position: {

corner: {

tooltip: corners,

target: opposites

}

},

show: {

when: false,

ready: true

},

hide: false,

style: {

border: {

width: 5,

radius: 10

},

padding: 10,

textAlign: center,

tip: true,

name: cream

}

});

});

});

5、Fixed tooltips

html如下所示:

JS代码:

$(document).ready(function()

{

$(#content img).each(function()

{

$(this).qtip(

{

content: Edit | Delete,

position: opRight,

hide: {

fixed: true

},

style: {

padding: 5px 15px,

name: cream

}

});

});

});

css代码:

#content img{

float: left;

margin-right: 35px;

border: 2px solid #454545;

padding: 1px;

}

6、Loading html

html如下所示:

Html代码

Click me JS代码:

$(document).ready(function()

{

$(#content a[rel]).each(function()

{

$(this).qtip(

{

content: {

url: $(this).attr( el),

title: {

text: Wiki - + $(this).text(),

button: Close

}

},

position: {

corner: {

target: ottomMiddle,

tooltip: opMiddle

},

adjust: {

screen: true

}

},

show: {

when: click,

solo: true

},

hide: unfocus,

style: {

tip: true,

border: {

width: 0,

radius: 4

},

name: light,

width: 570

}

})

});

});

7、Modal tooltips

html如下所示:

Html代码

Click here

JS代码:

$(document).ready(function()

{

$(a[rel="modal"]:first).qtip(

{

content: {

title: {

text: Modal tooltips sample,

button: Close

},

text: hello world

},

position: {

target: $(document.body),

corner: center

},

show: {

when: click,

solo: true

},

hide: false,

style: {

width: { max: 350 },

padding: 14px,

border: {

width: 9,

radius: 9,

color: #666666

},

name: light

},

api: {

beforeShow: function()

{

$(#qtip-blanket).fadeIn(this.options.show.effect.length);

},

beforeHide: function()

{

$(#qtip-blanket).fadeOut(this.options.hide.effect.length);

}

}

});

$(

)

.css({

position: absolute,

top: $(document).scrollTop(),

left: 0,

height: $(document).height(),

width: 100%,

opacity: 0.7,

backgroundColor: lack,

zIndex: 5000

})

.appendTo(document.body)

.hide();

});

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。