Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pop-Out Menu Help

    I was wondering how I can make a menu that pops out when you click something (an arrow). Could someone please post some code below for a single box pop out (right) and a single box pop down (down, duh)? If I have some code, I can easily modify it to suit my needs.

    If you need to know anything else, please let me know!

  • #2
    Regular Coder Nile's Avatar
    Join Date
    Jun 2008
    Posts
    280
    Thanks
    2
    Thanked 46 Times in 46 Posts
    I think that this is what you want except with an onClick:
    http://www.dynamicdrive.com/dynamici...lide/index.htm
    Is that right?
    If it is, to make it onClick:
    The following is in themmenu.js.
    At the top of the code you'll see something like this, the red isn't in the script, add it to the script:
    Code:
    if (typeof window.attachEvent=='object'){
    document.write('<!--[if lte IE 6]>\n'+
    '<script type="text/javascript">\n'+
    'var ie6_or_less=1;\n'+
    '<\/script>\n'+
    '<![endif]-->\n'+
    '<!--[if lt IE 5.5]>\n'+
    '<script type="text/javascript">\n'+
    'var less_than_ie5_5=1;\n'+
    '<\/script>\n'+
    '<![endif]-->')
    }
    
    var menu=[], resizereinit=true;
    var dete;
    function truebody(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
    }
    Add the red in.

    And then almost at the bottom of the page you'll see something like this:
    Code:
    var tb='<div id="'+o.id+'" onmouseover="movein(this);" onmouseout="moveout(this);"><div><table>\n';
    Replace it with this:
    Code:
    var tb='<div id="'+o.id+'" onclick="if(dete) { movein(this); dete = false; } else { moveout(this); dete = true; }"><div><table>\n';
    Last edited by Nile; 08-11-2008 at 07:25 PM.

  • #3
    New Coder
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That's not exactly what I want. If I could hide that under an image, that'd be great.

    I have an arrow. >> and when you click it, I want a menu to pop out to the side and say "hey, blah blah blah". That's more of an "always in your face" type of thing, I want mine to be more subtle and kind of like "if you know about it good, but no one's going to tell you".

    Does that make sense?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •