Web Analytics Made Easy -
StatCounter mouseover menu - CodingForum

Announcement

Collapse
No announcement yet.

mouseover menu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mouseover menu

    what is the idea behind hidding menu on settimeout?

    This question related to navigation menu

  • #2
    Could you explain that a little more, i don't really understand you question
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

    Comment


    • #3
      what i normally do for mouseover navigation is putting blank layers so that when person mouse over on it menu hides

      now what i want is i want menu hide on basis of settime out

      Comment


      • #4
        you can do that in a couple of ways.

        1) By Using Time -- count downs and count ups

        2) by using arrays

        like:
        var c="0"

        function go(){
        var a = new Array()
        a[1]="hidden"
        a[2]="hidden"
        a[3]="visible"
        a[4]="visible"

        c=(c==4)?1:++c

        document.all.mylayer.style.visibility=a[c]

        setTimeout("go()",100)
        }


        Hope this has helped

        Or am i way off the mark?
        CYWebmaster.com - See why we dot com!!
        ACJavascripts.com - Cut & Paste Javascripts!
        SimplyProgram.com - Personal Blog

        Comment


        • #5
          I think, you are talking about a simple layer-based navigation menu. As long as your mouse is over the link that shows the menu, the menu will be visible. The idea behind using setTimeout() is to make the menu visible for some time before it hides onMouseout.
          Scripting | JavaScripts | PerlScripts | Python Scripts | Articles | My Journal

          Comment


          • #6
            The general idea behind that is this: a mouseout event will always be fired first when the mouse leaves a menu element; then, assuming you've moved to another element (still over the menu, i.e.) a mouseover will fire on the new element. Obviously, you need to reverse the order of these events if you want to use the over (still over the menu) to cancel the result of an out (hiding the menu). A timer delay does this, giving you a sufficient period to clearTimeout() and cancel the mouseout action. It also can allow for user navigation between non-contiguous (separated) menu panels. Generally it can help to avoid hyper-active, 'flickering' menu systems.

            Comment

            Working...
            X