Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 738187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:48:27+00:00 2026-05-14T07:48:27+00:00

So I’m trying to adapt this Dropdown menu on Joomla the styles work great

  • 0

So I’m trying to adapt this Dropdown menu on Joomla the styles work great as expected so I’ll post the javascript includes on the head of my website:

            <script type='text/javascript' src='js/jquery.js'></script>
                <script type='text/javascript' src='js/dropdown.js'></script>

                <script type='text/javascript'>
                  $(function() {
                    $('.menu').droppy();
                  });
                </script>

                <script type='text/javascript'>
                  $(function() {
                    $('.menu').droppy({speed: 100});
                  });
                </script>

ok I don’t know why its is not working I’ll post the dropdown.js should I post the jQuery too? it’s really big!

                $.fn.droppy = function(options) {

                  options = $.extend({speed: 250}, options || {});

                  this.each(function() {

                    var root = this, zIndex = 1000;

                    function getSubnav(ele) {
                      if (ele.nodeName.toLowerCase() == 'li') {
                        var subnav = $('> ul', ele);
                        return subnav.length ? subnav[0] : null;
                      } else {
                        return ele;
                      }
                    }

                    function getActuator(ele) {
                      if (ele.nodeName.toLowerCase() == 'ul') {
                        return $(ele).parents('li')[0];
                      } else {
                        return ele;
                      }
                    }

                    function hide() {
                      var subnav = getSubnav(this);
                      if (!subnav) return;
                      $.data(subnav, 'cancelHide', false);
                      setTimeout(function() {
                        if (!$.data(subnav, 'cancelHide')) {
                          $(subnav).slideUp(options.speed);
                        }
                      }, 500);
                    }

                    function show() {
                      var subnav = getSubnav(this);
                      if (!subnav) return;
                      $.data(subnav, 'cancelHide', true);
                      $(subnav).css({zIndex: zIndex++}).slideDown(options.speed);
                      if (this.nodeName.toLowerCase() == 'ul') {
                        var li = getActuator(this);
                        $(li).addClass('hover');
                        $('> a', li).addClass('hover');
                      }
                    }

                    $('ul, li', this).hover(show, hide);
                    $('li', this).hover(
                      function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); },
                      function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); }
                    );

                  });

                };

My question here is: Why is it not working! I know that this is really complex (I don’t anything about JavaScript) but if you help me I’ll post a tutorial and edited files that will help a lot of people!

By the way I’ve download jQuery from the original site so I don’t think that this can be the problem!

Thanks in advance!

Here is the HTML generated from 2 levels til the UL:

            <div id="topmenu">  
            <div class="moduletabledropdown">
            <ul class="menu">
            <li id="current" class="first level0 home active"><a href="http://www.mundosoftware.com.br/templatex/" title="Home"><span>Home</span></a></li>
            <li class="level0 parent faq"><a href="/templatex/index.php?option=com_content&amp;view=section&amp;id=3&amp;Itemid=41" title="FAQ"><span>FAQ</span></a><ul class="level1">
            <li class="first last level1 item-01"><a href="http://www.google.com" title="Item 01"><span>Item 01</span></a></li></ul></li>
            <li class="level0 parent the-news"><a href="/templatex/index.php?option=com_content&amp;view=category&amp;layout=blog&amp;id=1&amp;Itemid=50" title="The News"><span>The News</span></a><ul class="level1"><li class="first last level1 item-02"><a href="http://www.google.com" title="Item 02"><span>Item 02</span></a></li></ul></li>
            <li class="level0 web-links"><a href="/templatex/index.php?option=com_weblinks&amp;view=categories&amp;Itemid=48" title="Web Links"><span>Web Links</span></a></li><li class="last level0 parent news-feeds"><a href="/templatex/index.php?option=com_newsfeeds&amp;view=categories&amp;Itemid=49" title="News Feeds"><span>News Feeds</span></a><ul class="level1"><li class="first last level1 item-03"><a href="http://www.google.com" title="Item 03"><span>Item 03</span></a></li></ul></li></ul></div>

Here is the HTML for a page that does work pure HTML CSS:

                <html>
                  <head>
                    <title>droppy - Nested drop down menus</title>
                    <meta name="description" content="" />
                    <meta name="keywords" content="" />
                      <script type='text/javascript' src='assets/jquery.js'></script>
                    <link rel="stylesheet" href="assets/project-page.css" type="text/css" />

                    <!-- per Project stuff -->
                      <script type='text/javascript' src='javascripts/jquery.droppy.js'></script>
                      <link rel="stylesheet" href="stylesheets/droppy.css" type="text/css" />
                    <!-- END per project stuff -->

                  </head>
                  <body>
                    <div id='container'>
                      <h1>
                        droppy
                        <span class='subtitle'> - Nested drop down menus</span>
                      </h1>

                      <div id='sidebar'>
                        <ul id='project-nav'>
                          <li><a href='#overview'>Overview</a></li>
                          <li><a href='#example'>Example</a></li>
                          <li><a href='#usage'>Usage</a></li>
                          <li><a href='#download'>Download</a></li>
                          <li><a href='#known-issues'>Known Issues</a></li>
                        </ul>
                        <ul id='ohoa-nav'>
                          <li><a href='http://onehackoranother.com/projects/'>Back to projects &raquo;</a></li>
                          <li><a href='http://onehackoranother.com/'>Back to onehackoranother.com &raquo;</a></li>
                        </ul>
                        <a href='http://thepixeltrap.com' id='pixel-trap' title='The Pixel Trap: New Directory for Web Professionals'>
                              <img src='http://onehackoranother.com/images/pixel-16.png' alt='' /> The Pixel Trap - A New Directory for Web Professionals
                            </a>
                      </div>

                      <div id='main'>

                <h2 class='first' id='overview'>Overview</h2>

                <p>Quick and dirty nested drop-down menu in the jQuery styleee. I needed a nav like
                  this for a recent project and a quick Googling turned up nothing that really suited,
                  so droppy was born. It hasn't been designed with flexibility in mind - if you like
                  what you see, great, integration should be a breeze - otherwise I'd look for something
                  more configurable elsewhere.</p>

                <h2 id='example'>Example</h2>

                <ul id='nav'>
                  <li><a href='#'>Top level 1</a></li>
                  <li><a href='#'>Top level 2</a>
                    <ul>
                      <li><a href='#'>Sub 2 - 1</a></li>
                      <li>
                        <a href='#'>Sub 2 - 2</a>
                        <ul>
                          <li>
                            <a href='#'>Sub 2 - 2 - 1</a>
                            <ul>
                              <li><a href='#'>Sub 2 - 2 - 1 - 1</a></li>
                              <li><a href='#'>Sub 2 - 2 - 1 - 2</a></li>
                              <li><a href='#'>Sub 2 - 2 - 1 - 3</a></li>
                              <li><a href='#'>Sub 2 - 2 - 1 - 4</a></li>
                            </ul>
                          </li>
                          <li><a href='#'>Sub 2 - 2 - 2</a></li>
                          <li>
                            <a href='#'>Sub 2 - 2 - 3</a>
                            <ul>
                              <li><a href='#'>Sub 2 - 2 - 3 - 1</a></li>
                              <li><a href='#'>Sub 2 - 2 - 3 - 2</a></li>
                              <li><a href='#'>Sub 2 - 2 - 3 - 3</a></li>
                              <li><a href='#'>Sub 2 - 2 - 3 - 4</a></li>
                            </ul>
                          </li>
                        </ul>
                      </li>
                      <li><a href='#'>Sub 2 - 3</a></li>
                    </ul>
                  </li>
                </ul>

                <script type='text/javascript'>
                  $(function() {
                    $('#nav').droppy();
                  });
                </script>

                <h2 id='usage'>Usage</h2>

                <p>No mandatory configuration options or nothin' here, just use include the Javascript/CSS
                  resources and insert the following code in your document head, or any other
                  suitable place:</p>

                <div class='caption'>Javascript:</div>
                <pre>&lt;script type='text/javascript'&gt;
                  $(function() {
                    $('#nav').droppy();
                  });
                &lt;/script&gt;</pre>

Don’t mind unclosed divs that is not the full code!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:48:28+00:00Added an answer on May 14, 2026 at 7:48 am

    Can you post some of your drop down menu HTML?

    Right now you are applying the droppy plugin to the selector ‘.menu’, which looks for an element on your page that has the CSS class ‘menu’, is that what you intended? If you want to apply the dropdown to an element with id=”menu” you would use $(‘#menu’).

    Update

    I would recommend using superfish instead, the mechanics of drop down menus are really hard to get right to make the menus easy to use. Superfish does an excellent job of being very forgiving for the site visitors.

    I can’t find anything particularly wrong with the code, seems to work ok. The only change I had to do to get it to work was to initially set the submenus to hidden using CSS. Try this out, you’ll need to add your CSS back into the HTML. I would suggest using Firefox, Firebug and Firequery. This will give you insight into what exactly is breaking if there are any JavaScript errors.

    <html>
    <head>
        <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="javascripts/jquery.droppy.js"></script>
        <style>
            ul#nav li ul {
                display: none;
            }
        </style>
    </head>
    <body>
        <h2 id='example'>
            Example</h2>
        <ul id='nav'>
            <li><a href='#'>Top level 1</a></li>
            <li><a href='#'>Top level 2</a>
                <ul>
                    <li><a href='#'>Sub 2 - 1</a></li>
                    <li><a href='#'>Sub 2 - 2</a>
                        <ul>
                            <li><a href='#'>Sub 2 - 2 - 1</a>
                                <ul>
                                    <li><a href='#'>Sub 2 - 2 - 1 - 1</a></li>
                                    <li><a href='#'>Sub 2 - 2 - 1 - 2</a></li>
                                    <li><a href='#'>Sub 2 - 2 - 1 - 3</a></li>
                                    <li><a href='#'>Sub 2 - 2 - 1 - 4</a></li>
                                </ul>
                            </li>
                            <li><a href='#'>Sub 2 - 2 - 2</a></li>
                            <li><a href='#'>Sub 2 - 2 - 3</a>
                                <ul>
                                    <li><a href='#'>Sub 2 - 2 - 3 - 1</a></li>
                                    <li><a href='#'>Sub 2 - 2 - 3 - 2</a></li>
                                    <li><a href='#'>Sub 2 - 2 - 3 - 3</a></li>
                                    <li><a href='#'>Sub 2 - 2 - 3 - 4</a></li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                    <li><a href='#'>Sub 2 - 3</a></li>
                </ul>
            </li>
        </ul>
    
        <script>
            $(function() {
                $('#nav').droppy();
            });
        </script>
    
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Seemingly simple, but I cannot find anything relevant on the web. What is the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.