是否有可能告诉qTip 2.0使用其他属性而不是'title'为默认

Is it possible to tell qTip 2.0 to use other attribute than 'title' as default?

本文关键字:默认 属性 title 其他 有可能 qTip 是否      更新时间:2023-09-26

如何告诉qTip使用另一个属性而不是'title'作为默认值?

我需要使用另一个属性的原因是,当我禁用qtip并动态添加带有"title"的元素时,当我将鼠标悬停在元素上时,标题将显示。这是我不希望发生的事。

谢谢

在我们的项目中,我们还使用qTip并强制它使用子属性的内容而不是Title属性。默认情况下,子内容是隐藏的(CSS -> display:none;)

$('.tipped').each(function()
{
    $elem = $(this);
    $elem .qtip({
        content: $elem.children('.tiptext').html(),
        show: 'mouseover',
        hide: 'mouseout',
        position: {
            corner: {
                target: 'bottomMiddle',
                tooltip: 'topMiddle'
            }
        },
        style: {
            tip: true,
            name: 'blue',
            color: '#A04242',
            background: '#EEEEEE',
            border: {
                width: 1,
                radius: 3,
                color: '#4F81BD'
            }
        }
    });
});