Hi Matthew,
thanks for your patience.

As I pointed out in my first post I want to pass a variable to the
request function.
This variable I want to get from the tooltip element(currently hovered
element).

It says in the docs(Yes, I did take a look at them :) "The default
function for the show event, passes the tip element and the currently
hovered element."

Thats why I thought I could do sth like this:

 ...onShow: function(tip,el) {
                var term = el.getAttribute('term');...
or this:

 ...onShow: function(tip,el) {
                var term = $(el).get('rel');...

But that does not work.
So I came up with all that crazy stuff.
Any help is appreciated.





On Mar 23, 11:29 pm, "Matthew Hazlett" <[email protected]> wrote:
> Why are you using an each loop then, just update one not all :/  
> (RTFM might help too) :-)
>
> http://mootools.net/docs/core
>
> Instead of:
>
>     onShow: function(tip,el) {
>         tip.fade('in');
>         var ttips = $$('a.tips');
>         ttips.each(function(element,index) {
>                 get_content(element.getAttribute('term'));
>       });
>    },
>
> Just use:
>
>     onShow: function(tip,el) {
>        tip.fade('in');
>        get_content(tip);
>     },
>
>
>
> -----Original Message-----
> From: [email protected]
>
> [mailto:[email protected]] On Behalf Of soundseller
> Sent: Tuesday, March 23, 2010 2:50 PM
> To: MooTools Users
> Subject: [Moo] Re: Tooltips / JSON Question
>
> Hi Matthew,
> thanks for your help.
> The problem is, that if I have several links with tooltips attached,
> everytime one of them
> is hovered, the requests for all of them are fired.
>
> http://mootools.net/shell/RVAeU/6/
>
> Hmmm...
> Any help is appreciated.
>
> On Mar 23, 10:01 pm, "Matthew Hazlett" <[email protected]> wrote:
> > Yes, your code makes no sense.
>
> > When you hover and show the tool tip you are adding an event to reset the
> > tool tip next time it is shown.
> > You need to execute the updater on that iteration not the next one.
>
> >http://mootools.net/shell/RVAeU/5/
>
> > -----Original Message-----
> > From: [email protected]
>
> > [mailto:[email protected]] On Behalf Of soundseller
> > Sent: Tuesday, March 23, 2010 12:55 PM
> > To: MooTools Users
> > Subject: [Moo] Re: Tooltips / JSON Question
>
> > So I tried sth else, which is terrible code, but maybe you can see
> > what I am
> > trying to do and give me some support.
> > It works only on the second hover.
>
> >http://mootools.net/shell/RVAeU/4/
>
> > Thnx
>
> > To unsubscribe from this group, send email to
> > mootools-users+unsubscribegooglegroups.com or reply to this email with the
> > words "REMOVE ME" as the subject.
>
> To unsubscribe from this group, send email to
> mootools-users+unsubscribegooglegroups.com or reply to this email with the
> words "REMOVE ME" as the subject.

To unsubscribe from this group, send email to 
mootools-users+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to