[jQuery] Getting a variable out of a function
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