繁体   English   中英

当单词在不同行中时,jQuery UI工具提示会出现奇怪的行为

[英]jquery ui tooltip wierd behaviour when word is in different line

我正在实现jquery ui工具提示。 但是,当我将鼠标悬停在两个不同的行中时,它将很好地工作。...是否有任何方法可以自定义此行为?

我知道一种可能性是使用track:true我不想使用此...

这是我的jsfiddle,

“香料女孩”是具有怪异行为的工具提示。

$(function () {
$(document).tooltip({
    items: ".oolinks",

    tooltipClass: "tooltip-position",
    content: function () {
        return "<div class='hi'>Hi There.</div>";
    },
    position: {
        my: "bottom-20",
        at: "top",
        using: function (position, feedback) {
            $(this).css(position);
            $("<div>")
                .addClass("arrow")
                .addClass(feedback.vertical)
                .addClass(feedback.horizontal)
                .appendTo(this);
            $('.ui-tooltip-content').click(function (e, ui) {

            });
        }
    },
});});

为什么不按以下方式重新放置br标签:

<strong>The <br/><culink class="oolinks" lang="en" href="http://undefined/en/topic/Spice Girls" style="color:rgb(34, 34, 34)!important;font-size:15px!important;font-weight:bold!important;border-bottom-color:#4de3ce!important">Spice Girls</culink> </strong>about going on a joint<br/>international tour.

我认为您可以做的最好的事情是为每个单词应用两个工具提示,即“香料”和“女孩”。

<strong>The <culink class="oolinks" lang="en" href="http://undefined/en/topic/Spice Girls" style="color:rgb(34, 34, 34)!important;font-size:15px!important;font-weight:bold!important;border-bottom-color:#4de3ce!important">Spice </culink> <culink class="oolinks" lang="en" href="http://undefined/en/topic/Spice Girls" style="color:rgb(34, 34, 34)!important;font-size:15px!important;font-weight:bold!important;border-bottom-color:#4de3ce!important">Girls </culink> </strong>

这是小提琴

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM