0

I attach Bootstrap tooltips via

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

When I use a <cfdump>, title tags are attached all over the place. The start of the <cfdump> html looks like this

<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>

Is there a way to keep, the two from stepping on eachother?

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
  • 5
    cfdump is not intended for production applications. It is there to allow you to quickly see your data during development and maintenance. How is this not a simple annoyance? – Dan Bracuk Feb 25 '14 at 17:40

1 Answers1

2

You shouldn't care because cfdump shouldn't be used in production, however you could just reduce the array returned by the jQuery selector. Not sure if this is the best way to do it, but it works:

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

It runs the filter function for each item in the array returned by the selector. If it is within the CFDUMP table (signified by the .cfdump_struct class) it will not return it. You will have to extend this to other cfdump types (queries, etc) but this should get you started.

Again, it really shouldn't matter since you shouldn't be using cfdump in production code anyway.

You can see this in action here: http://jsfiddle.net/seancoyne/rc7TL/

Sean Coyne
  • 3,864
  • 21
  • 24