Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何移动引导弹出框';谁的位置下降了?_Javascript_Jquery_Css_Twitter Bootstrap - Fatal编程技术网

Javascript 如何移动引导弹出框';谁的位置下降了?

Javascript 如何移动引导弹出框';谁的位置下降了?,javascript,jquery,css,twitter-bootstrap,Javascript,Jquery,Css,Twitter Bootstrap,所以基本上我有一个Boostrap Popover,它是在父对象中创建的,用于悬停。通过这种方式,用户可以启动popover,然后将鼠标悬停在popover上并在其周围单击其中的链接 尽管如此,我还是需要将这个popover向下移动大约10px(最大值+10px),这样用户就可以轻松地将鼠标移动到popover上。目前,将鼠标移动到popover的唯一方法是跟随popover下方的小箭头 以下是一个例子: jQuery: $('td.chartSection').each(function ()

所以基本上我有一个Boostrap Popover,它是在父对象中创建的,用于悬停。通过这种方式,用户可以启动popover,然后将鼠标悬停在popover上并在其周围单击其中的链接

尽管如此,我还是需要将这个popover向下移动大约10px(最大值+10px),这样用户就可以轻松地将鼠标移动到popover上。目前,将鼠标移动到popover的唯一方法是跟随popover下方的小箭头

以下是一个例子:

jQuery:

$('td.chartSection').each(function () {
    var $thisElem = $(this);
    $thisElem.popover({
        placement: 'auto',
        trigger: 'hover',
        html: true,
        container: $thisElem,
        animation: true,
        title: 'Name goes here',
        content: 'This is the popover content. You should be able to mouse over HERE.'
    });
});
<table>
    <tr>
        <td class="chartSection">Chart 1</td>
    </tr>
    <tr>
        <td class="chartSection">Chart 2</td>
    </tr>
    <tr>
        <td class="chartSection">Chart 3</td>
    </tr>
</table>
HTML:

$('td.chartSection').each(function () {
    var $thisElem = $(this);
    $thisElem.popover({
        placement: 'auto',
        trigger: 'hover',
        html: true,
        container: $thisElem,
        animation: true,
        title: 'Name goes here',
        content: 'This is the popover content. You should be able to mouse over HERE.'
    });
});
<table>
    <tr>
        <td class="chartSection">Chart 1</td>
    </tr>
    <tr>
        <td class="chartSection">Chart 2</td>
    </tr>
    <tr>
        <td class="chartSection">Chart 3</td>
    </tr>
</table>

非常简单:

演示


啊,太容易了,很好的发现。谢谢