SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Help with drop down menu

  1. #1
    SitePoint Addict
    Join Date
    Jun 2006
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with drop down menu

    Hi Folks,

    I would like each parent item to link to its own page, at the moment it just displays the child pages. If you click on the Medicines Management tab, you will see what I mean.

    http://tinyurl.com/av4cbpm

    Can anyone please help?

    Many thanks

  2. #2
    Grüße aus'm Pott
    SitePoint Award Recipient Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    2,482
    Mentioned
    40 Post(s)
    Tagged
    3 Thread(s)
    Hi there,

    This is what a menu point looks like that links to its own page:

    HTML Code:
    <li class="item-779"><a href="/publications">Publications</a></li>
    This is what "Medecines management" looks like:

    HTML Code:
    <li class="item-797 deeper parent">
      <a href="/medmanp">Medicines Management</a>
      <ul>
        <li class="item-798"><a href="/medmanp/contacts">Contacts</a></li>
        <li class="item-799"><a href="/medmanp/community-pharmacy-information">Community Pharmacy Information</a></li>
        <li class="item-801"><a href="/medmanp/formulary">Formulary</a></li>
        <li class="item-800"><a href="/medmanp/medicinces-management-useful-links">Medicinces Management Useful Links</a></li>
      </ul>
    </li>
    So, if I was you, I'd just remove the nested <ul> element and the class names "deeper" and "parent" and all should be good.
    How well do you know your JavaScript from your jQuery?
    Check out SitePoint's latest JavaScript challenge


    My blog

Bookmarks

Posting Permissions

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