<button
type = "button"
class = "btn btn-success btn-xs pop"
data-container = "body"
data-toggle = "popover"
data-placement = "right"
data-content = "hello world"
data-original-title = ""
title = "">help</button>
答案 0 :(得分:0)
添加:
$(".test div").each(function() {
if ($(this).hasClass('has-error')) {
console.log($(this).hasClass('has-error'))
console.log($(this).parent().attr("class"))
}
})
答案 1 :(得分:0)
一个从右到左方向的段落:
<div class="popover" role="tooltip" direction="rtl"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> </div>
对于您的情况,并且如bootstrap中所述,您可以选择通过属性data-template更改popover tempate
rtl
在您的代码中,添加此属性并在标题和正文中将方向设置为<button data-template='<div class="popover" role="tooltip" dir="rtl"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' ...>
Help
<button>
filter
答案 2 :(得分:0)