> Brian Miller schrieb:
>> Since you're asking... :)
>>
>> It would be nice if I could declare the tip body HTML with a string,
>> rather than requiring a bodyHandler function.  This way, for static
>> tooltip content, I can be lazy and type a little bit less.
>>
> Sounds good, can you explain that a bit more? Maybe just post how your
> code and markup using the feature would look like.

Right now you have this:
if ( settings.bodyHandler ) {
        tTitle.hide();
        tBody.html( settings.bodyHandler.call(this) ).show();
} else if (...) {

I'm thinking of adding something like:
} else if ( settings.bodyHTML ) {
        tTitle.hide();
        tBody.html( settings.bodyHTML ).show();
} else if (...) {

This way, if I wanted to simply state what the content of a particular
tooltip is with a static HTML string, I could do that.

If you wanted to be really complete about it, you could scan the HTML in
order to properly handle tables and other HTML that doesn't render very
well using innerHTML in IE.  But, that seems like a lot of work for not a
lot of benefit.

Maybe you can also have a settings.bodyNode, so that people can use
something like jQuick or Taconite to build a proper DOM node, and the
tooltip plugin can simply drop it where the tip body goes.

Just throwing some ideas out there, to see which ones stick.  :)

- Brian


Reply via email to