Hi,

the function You create, is a callback method. When the task is done,
the callback gets called. You need to update the HTML of the TEST in
the callback. Impossible to use return value of a callback in code
which assigns it.

$('.TEST').html( false );

$('.menulink').mouseover( function(active) {
          $('.TEST').html( true );
});


Hope that clarifies !

--
Henri Hovi
http://www.patidure.com







On Jul 4, 6:02 pm, pixelvoodoo <webdesigner.p...@googlemail.com>
wrote:
> Hi,
>
> New to JQuery and hope this question has an easy solution.
>
> At present I am trying to assign a global variable from a function
> which is called on a mouseover event, fired by going over a hyperlink
> with a specific class.
>
> The code:
>
> [b]     active = "false"
>
>         $('.menulink').mouseover( function(active) {
>                 active = "true"
>                 return active
>         });
>
>         $('.TEST').html( active )[/b]
>
> At present I keeping getting undefined errors and I can't figure out
> why.
>
> Would appreciate any help!
>
> Chris

Reply via email to