I'm building a component that involves duplicating media fields and I'm wanting the MooTools tooltips to work properly after duplication.
The method to attach the tooltips to the document [
libraries/cms/html/behavior.php, line 305] doesn't seem to allow the tooltip objects to be accessed globally, so amending them later is far more complicated than it could be.
I made a quick, dirty edit to the attachment method, and replaced line 316 with:
var foo = $('$selector').selector;
foo = foo.replace(/\./, '');
this[foo] = new Tips($('$selector').get(), $options);
This allows each tooltip object to be available globally, and they can be easily modified using MooTools' Tips attach() and detach() methods.
There's undoubtedly a neater way of coding it, but is there any reason why the tooltips objects aren't available globally? Or are they, and I'm just being dumb?