TEST is just some html text to show me something has happened.

I am trying to accomplish a drop down menu. All I want is to be able
to if menu is active don’t hide menu, if menu is not active but menu
link is then don’t hide, if menu link and menu inactive then hide
menu.

Code below

function fcDefineMenuDiv(varAttribute) { var varAttribute_1 = ”.” + ( $
(varAttribute).attr(“title”) ); return varAttribute_1 }

function fcHideDiv(varAttribute) { $(varAttribute).hide(); }

$(window).load(function(){

var varMenuDiv
var menulinkactive
var menuactive$('.menulink').mouseover( function() {
    varMenuDiv = fcDefineMenuDiv(this)var position = $(this).position
();var left = position.left
var top = position.topleft = left - 20
top = top - 8$(varMenuDiv).css({'left' : left, 'top' : top});$
(varMenuDiv).show();});$('.menulink').mouseleave(function()
{menulinkactive="false"$(varMenuDiv).mouseover(function()
{menuactive="true"});if(menuactive == "false") {
    alert(varMenuDiv)
} else {
    $(varMenuDiv).hide();
    alert(varMenuDiv)
}});})


On Jul 4, 10:49 pm, waseem sabjee <waseemsab...@gmail.com> wrote:
> hi there.
>
> 1. ensure the script refference to JQuery is correct
>
> <script type="text/javascript" src="JQuery.js"></script>
> ensure the path is correct as well as the spelling
>
> if  your script refference is correct and the errors continue try this. when
> executing your js
>
> <script type="text/javascript">
> $(function() {
>
> // ensure all the JQuery your do runs inside of this
>
> var active = 'false'; // when declaring a variable say *var myVariableName =
> value;*
>
> $(".menulink").mouseover(function() { // there is no need to include
> (active)
> // perform these methods while mouseover menu link
> active = 'true';
> $(".TEST")>html(active);
>
> });
> });
>
> </script>
>
> I also noticed you [b] [/b] tags - do not use them
> On Sat, Jul 4, 2009 at 5: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- Hide quoted text -
>
> - Show quoted text -

Reply via email to