onclick instead of onmouse

Posted on 2007-10-05
Last Modified: 2010-05-18
I've found this script from dynamicdrive.con and it's really great, lite and meets my needs perfectly. But I need to change a little thing in it. Which is, the links appear on the top - the main categories link - change their sub categories when I move the mouse on it while I want to let it change when I click on it. Here is a link to the script:

2. if someone can modify the script so it memorize the sub links when I move from a page to another.
3. The default now is that there are no sub menus appear for the sub categories, can someone change it to make menu[0] is the default for example?

Best regards,
Question by:Shopies
    LVL 15

    Expert Comment

    Find this comment in the DD code, and alter the line below it  it similarly to what I have here:

    <!--Links used to initiate the sub menus. Pass in the desired submenu index numbers (ie: 0, 1) -->
    <a href="javascript:void(0);" onclick="showit(0)">JavaScript Kit</a> | <a href="javascript:void(0);" onclick="showit(1)">Freewarejava</a><br>

    Author Comment

    Hey mr_egyptian,
    Thank you so much. Your solution was so easy to apply. Could you please see if you can modify the code regarding the second and the third issues.??

    LVL 1

    Accepted Solution

    PAQed with points refunded (500)

    EE Admin

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Both jQuery and Mootools offer some nice, easy to use scripts. Mootools is best known for their interactive slideshows and jQuery for their menus, but both have many other uses as well.   jQuery is basically a toolkit with many DOM (http://en.wik…
    Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now