To move to 1.2 without changing your 1.11 code, try this:

window.addEvent('domready',function() {
        // store tooltip title and text
        $$('.Tip').each(function(el) {
                var title = el.getProperty('title').split('::');
                if (title.length == 1) {
                        el.store('tip:title',title[0]);
                        el.store('tip:text','');
                } else {
                        el.store('tip:title', title[0].trim());
                        el.store('tip:text', title[1].trim());
                }
        });

        // add tips
        var tip = new Tips($$('.Tip'), {
                className:'tool-tip',
                showDelay: 400,
                hideDelay: 400,
                onShow:function(tip) {
                                tip.fade('in');
                },
                onHide:function(tip) {
                        tip.fade('out');
                }
        });
});

On Sep 24, 8:34 am, nutron <[EMAIL PROTECTED]> wrote:
> MooTools 1.11 took the data in the title tag and split it into body and title
> using "::", for example:
>
> foo.jpg
>
> MooTools 1.2 no longer does this for you. Instead, it uses title and rel for
> the title and body:
>
> foo.jpg
>
> Not that you can also use element storage to set these values:
>
> $('myImg').store('tip:title', 'The title').store('tip:text', 'The body');
>
> If the Tips class can't find a caption and the target element has an href
> property, it uses that as the body.
>
>
>
> pixelmanya wrote:
>
> > Hello community,
>
> > I got problems with tool-tips... After upgrading mootools to 1.2 a really
> > cryptic thing happend:
>
> >  http://n2.nabble.com/file/n1115568/Bild%2B3.png
>
> > I don't know where the second line (url) is coming from? It seems that
> > anything takes the href-attribute and push them into the
> > title-attribute...
>
> > Where is that happening???
>
> > Here is the html :
>
> > a href="http://development/dominik/xxxxxx/index.php/search/set/text";
> > class="tips" title="nur Text" >TipMe
>
> > Here the javascript:
>
> > var tooltips = new Tips($$('.tips', '.listArrows'), {
> >     className: 'custom-tip'
> > });
>
> > and at least the css:
>
> > .custom-tip {
> >    color: #fff;
> >    z-index: 13000;
> >    font-size: 11px;
> >    background: #000;
> >    padding: 8px;
> > }
>
> > .custom-title {
> >    display: none;
> > }
>
> > .custom-text {
> >    font-size: 11px;
> >    padding: 8px;
> >    background: #000;
> >    display: none;
> > }
>
> > Maybe anyone has an idea where the problem is?
>
> -----
> The MooTools Tutorial:  http://www.mootorial.comwww.mootorial.com
> CNET Clientside:  http://clientside.cnet.comclientside.cnet.com
> --
> View this message in 
> context:http://n2.nabble.com/Got-problems-with-tool-tips-tp1115568p1115660.html
> Sent from the MooTools Users mailing list archive at Nabble.com.

Reply via email to