开发者

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

开发者 https://www.devze.com 2023-04-12 09:49 出处:网络
How do i tell qTip to use another attribute than \'title\' as default? The reason i need to use another attribute开发者_StackOverflow中文版, is because when i disable qtip and dynamically add element

How do i tell qTip to use another attribute than 'title' as default?

The reason i need to use another attribute开发者_StackOverflow中文版, is because when i disable qtip and dynamically add elements with "title", the title will show when i hover my mouse over the element. Which i dont want to happen.

Thanks


In our project, we also use qTip and force it to use content of a children instead of Title attribute. The children content is hidden by default (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'
            }
        }
    });
});
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号