我有一个$("#settings")div与多个引导工具提示附加到子元素.
例如,
<div id="settings" style="display: flex;">
<tbody>
<tr>
<td width="25%" class="left Special" style="font-size:150%">Content:</td>
<td width="5%"></td>
<td width="70%" class="Special settingswrong" style="font-size:200%"><div style="display:inline" data-toggle="tooltip" data-placement="right" title="" data-original-title="This is not what you are looking for!">Content</div></td>
</tr>
<tr>
<td width="25%" class="left Special" style="font-size:150%">Content:</td>
<td width="5%"></td>
<td width="70%" class="Special settingswrong" style="font-size:200%"><div style="display:inline" data-toggle="tooltip" data-placement="right" title="" data-original-title="This is not what you are looking for!">Content</div></td>
</tr>
</tbody>
</div>
Run Code Online (Sandbox Code Playgroud)
我想要$("#settings").tooltip('destroy')按下按钮上的所有这些工具提示,但它不起作用,我假设因为工具提示实际上不在设置div上,而是在其中.
但是我也试过了$('#settings').find('*').tooltip('destroy'),但也没用.
是因为我如何初始化它们?
$(document).ready(function() {
$("body").tooltip({ selector: '[data-toggle=tooltip]' });
});
Run Code Online (Sandbox Code Playgroud)
访问div中所有工具提示的快速简便方法是什么?
javascript jquery twitter-bootstrap twitter-bootstrap-tooltip
我有一个复杂的问题.
这里有两个要素:
(1).选择时$(".steps li")我希望整体<li>改变颜色rgb(66, 81, 95).然后它必须改回原来的状态.
这部分我已经完成了,使用.data().
第二部分是棘手的部分:
(2).当我选择一个<a>相同<li>的颜色时,我希望颜色保持不变并使用下划线.因此,我希望"世界大会"文本保持绿色,加下划线,其余部分为<li>白色,灭活颜色.
有没有办法在悬停功能中使用回调来做到这一点?
我需要(1)和(2)同时工作.
我只是徘徊在$(".steps li a")上,但这不起作用,因为第一部分工作,必须删除该类.
无论如何,我不确定这一点.任何意见,将不胜感激.
代码如下:
CSS:
html, body {
background: #000;
color: #e7e7e7;
font-family:"Helvetica", "Arial", "Bitstream Vera Sans", "Verdana", sans-serif;
margin:0;
padding:0;
}
a {
color: rgb(66, 81, 95);
text-decoration:none;
}
a:hover {
/*color:#a0a0a0;*/
text-decoration:none;
}
.wa a {
color: rgb(68, 118, 67);
}
.steps {
width:400px;
margin:0 auto;
text-align:left;
line-height: 200%;
} …Run Code Online (Sandbox Code Playgroud)