0

我通过附加引导工具提示

$("[title]").tooltip({ html: true });

当我使用 a<cfdump>时,标题标签会附在所有地方。html的开头<cfdump>看起来像这样

<table class="cfdump_struct">
        <tr><th class="struct" colspan="2" onClick="cfdump_toggleTable(this);" style="cursor:pointer;" title="click to collapse">struct</th></tr> 
                <tr>
                <td class="struct" onClick="cfdump_toggleRow(this);" style="cursor:pointer;" title="click to collapse">Cause</td>
                <td>

有没有办法让两人不踩对方?

4

1 回答 1

2

你不应该关心,因为 cfdump 不应该在生产中使用,但是你可以减少 jQuery 选择器返回的数组。不确定这是否是最好的方法,但它有效:

$("[title]").filter(function(){
    return ($(this).closest(".cfdump_struct").length == 0);
}).tooltip({ html: true });

它为选择器返回的数组中的每个项目运行过滤器函数。如果它在 CFDUMP 表中(由 .cfdump_struct 类表示),则不会返回它。您必须将其扩展到其他 cfdump 类型(查询等),但这应该可以帮助您入门。

同样,这真的无关紧要,因为无论如何您都不应该在生产代码中使用 cfdump。

你可以在这里看到这个:http: //jsfiddle.net/seancoyne/rc7TL/

于 2014-02-25T17:44:35.060 回答