gpt4 book ai didi

jquery - qtip2:更改 'this' 选择器

转载 作者:行者123 更新时间:2023-12-01 07:26:54 26 4
gpt4 key购买 nike

$('.selector').qtip({
content: {
text: function(api) {
return $(this).children('.tip').clone();
}
},
style: {
classes: 'ui-tooltip-rounded',
width: 210
},
position: {
my: 'bottom center',
at: 'bottom center',
viewport: $(window)
},
hide: {
fixed: true,
delay: 500
},
events: {
show: function(event, api) {
$('.selector').css('border', '1px solid black');
}
}

});

我正在使用 qtip 2 插件,但我想更改特定选择器(“this”)而不是所有选择器。

上面的代码在页面上的所有“提示”图标周围绘制黑色边框...有没有办法(使用 qtip2)引用特定的“提示”图形('.selector')?

最佳答案

在您的表演事件中,获取当前的 qTip 并将样式应用于它。您可以通过以下方式访问它:

api.elements.tooltip

关于jquery - qtip2:更改 'this' 选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8916722/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com