[Moo] Setting title and text of a tooltip

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Moo] Setting title and text of a tooltip

MooTools Users mailing list
Hi all,

I have a bunch of elements with tooltips. You click these elements to do some work and I wish to PERMANENTLY update the tip text and title to reflect the change.

So far I have been able to set the text and title of the visible tip using;

myTips.text('Whatever')
myTips.title('Whatever')

However I have not been able to permanently reset this and once you lose focus and regain focus the old title and text is used. I have tried detaching the tip, editing the title and rel for the element and then reattaching the tip but I am guessing that it has this in an array somewhere and is using that array when the element is reattached.

Any ideas..?

Fiddle here to show trying to detach and attach tips

http://jsfiddle.net/nb7ofhgc/


Rolf

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Setting title and text of a tooltip

Tim Wienk
You'll want to use the Element Storage if you're changing the tips'
contents after they're attached. When the tips are attached once, the
used title and text are stored in MooTools' Element Storage. How to
use it is described here:

http://mootools.net/more/docs/1.5.1/Interface/Tips#Tips:Storage

Which, in your example, would end up being:
http://jsfiddle.net/nb7ofhgc/1/


On 6 February 2015 at 11:44, 'Roo' via MooTools Users
<[hidden email]> wrote:

> Hi all,
>
> I have a bunch of elements with tooltips. You click these elements to do
> some work and I wish to PERMANENTLY update the tip text and title to reflect
> the change.
>
> So far I have been able to set the text and title of the visible tip using;
>
> myTips.text('Whatever')
> myTips.title('Whatever')
>
> However I have not been able to permanently reset this and once you lose
> focus and regain focus the old title and text is used. I have tried
> detaching the tip, editing the title and rel for the element and then
> reattaching the tip but I am guessing that it has this in an array somewhere
> and is using that array when the element is reattached.
>
> Any ideas..?
>
> Fiddle here to show trying to detach and attach tips
>
> http://jsfiddle.net/nb7ofhgc/
>
>
> Rolf
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "MooTools Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Moo] Re: Setting title and text of a tooltip

MooTools Users mailing list
In reply to this post by MooTools Users mailing list
Thank you, worked perfectly,,,I didnt realise the store was for storing changed titles and text as well I thought it was just for creating the tips in the first instance.

Thanks
Rolf

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.