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 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2006
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question folding menu with img how can i have more then 1 img & menu

    hello chozin here,
    I have a js that has a button that lets you click a button and a menu appears: example:
    the script:
    // Menu change
    ns6_index=0

    function change(e){
    if (!document.all&&!document.getElementById)
    return
    if (!document.all&&document.getElementById)
    ns6_index=1

    var source=document.getElementById&&!document.all? e.target:event.srcElement

    if (source.className=="folding"){
    var source2=document.getElementById&&!document.all? source.parentNode.childNodes:source.parentElement.all
    if (source2[2+ns6_index].style.display=="none"){
    source2[0].src="images/m_DownB.gif"
    source2[2+ns6_index].style.display=''
    }
    else{
    source2[0].src="images/m_Down.gif"
    source2[2+ns6_index].style.display="none"
    }
    }
    }
    document.onclick=change

    the html:
    <div align="right">
    <img border="0" src="images/m_Down.gif" class="folding">
    <a href=" " title=" "></a>
    <dl style="display: none">
    <dt><a href="family/familyp.htm">My family photos</a><br>
    <dt><a href="family/familyp1.htm">My family photos 2</a><br>
    <dt><a href="family/familyp2.htm">My family photos 3</a><br>
    <dt><a href="family/vacat.htm">My Vacation</a><br>
    <dt><a href="family/livi.htm">My House</a><br>
    <dt><a href="family/modelc.htm">My Kool Car</a><br>
    <dt><a href="family/relat.htm">My Relatives<a><br>
    <dt><a href="family/about.htm">About My Family</a><br>
    <dt><a href="family/etc.htm">Misc Items</a><br>
    </dl>
    </div>
    <!-- ----------------------------------------------------------------------------------- -->
    is there a way I can get more than one type of button like this:
    <div align="right">
    <img border="0" src="images/m_jokedown.gif" class="folding">
    <a href=" " title=" "></a>
    <dl style="display: none">
    <dt><a href="joke/jokep.htm">Favorite Jokes</a><br>
    <dt><a href="joke/jokep1.htm">Favorite Jokes 2</a><br>
    <dt><a href="joke/jokep2.htm">Favorite Jokes 3</a><br>
    <dt><a href="joke/joke.htm">My jokes</a><br>
    <dt><a href="joke/joker.htm">Blonde Jokes</a><br>
    <dt><a href="joke/jokec.htm">Car Jokes</a><br>
    <dt><a href="joke/jokes.htm">Jokes for Kids<a><br>
    <dt><a href="joke/joket.htm">Bad Jokes</a><br>
    <dt><a href="joke/jokew.htm">Cancelled Jokes</a><br>
    </dl>
    </div>
    <!-- ----------------------------------------------------------------------------------- -->
    the other img would be m_jokedownB.gif
    and if i want have more img & menu's like this on one page:
    Please help? thanks in advance

  • #2
    New Coder
    Join Date
    Jun 2006
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    see thread: Folding menu's w/img please reply?
    Chozin Mr J CF Nut had friendly reply with success thanks Mr J


  •  

    Posting Permissions

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