jquerysimpletip插件使用title属性

jquerysimpletip插件使用title属性,jquery,simpletip,Jquery,Simpletip,当您将每个元素的title属性应用于一组元素时,如何让插件使用工具提示文本的属性 $('td[title]').simpletip({ content : << this element's title attribute >> }); $('td[标题]).simpletip({ 内容:我找到了一个解决方法: 在Simpletip源代码中,大约第25行: // change this line: .html(conf.content) // to this .

当您将每个元素的
title
属性应用于一组元素时,如何让插件使用工具提示文本的
属性

$('td[title]').simpletip({
    content : << this element's title attribute >>
});
$('td[标题]).simpletip({

内容:我找到了一个解决方法:

在Simpletip源代码中,大约第25行:

// change this line:
.html(conf.content)
// to this
.html(conf.content ? conf.content : elem.attr('title'))
然后调用simpletip函数时:

$('td[title]').simpletip({
    content: false
});

是的,有点黑,但它能用。

我找到了一种黑方法:

在Simpletip源代码中,大约第25行:

// change this line:
.html(conf.content)
// to this
.html(conf.content ? conf.content : elem.attr('title'))
然后调用simpletip函数时:

$('td[title]').simpletip({
    content: false
});

是的,这有点老套,但很管用。

我想这对你有用

$('td[title]').each(function() {
    $(this).simpletip({
        content : $(this).attr('title')
    });
});

我想这对你有用

$('td[title]').each(function() {
    $(this).simpletip({
        content : $(this).attr('title')
    });
});

哎哟!输了38秒!代码(几乎)完全相同。不过,我的代码没有语法错误。;如果你投我的票,那就投你的票吧哈哈。总之,我也错过了;一开始。我还以为“这家伙偷了我的帖子,打字错误等等!”)哎哟!输了38秒!输了(几乎)同样的代码。我的没有语法错误。如果你投我的票,那就投你的票。哈哈。不管怎么说,我也错过了;一开始也是。我以为“这家伙偷了我的帖子,打字错误等等!”;)