December 26 2022

Author: Test-Templates (edited Beetemplate)
This menu does not carry any new ideas, but I tried to make it very simple in terms of code and understanding. I will not give HTML and CSS code - you can easily figure them out yourself, since there are simple elementary lists. I'll just give you the jQuery code that we need to make the menu work:


 jQuery Code

$(document).ready(function() {
    
    // Vertical Menu
    $(".tt-menu li").hover(
        function() {
            $(this).find("ul:first").fadeIn(200);
            $(this).addClass("active");
        }, function() {
            $(this).find("ul:first").fadeOut(0);
            $(this).removeClass("active");
    });
    
    $(".tt-menu li:has(ul)").addClass("level-item");
    
    // Horizontal Menu
    $(".tt-menu-horizontal li").hover(
        function() {
            $(this).find("ul:first").fadeIn(200);
            $(this).addClass("active");
        }, function() {
            $(this).find("ul:first").fadeOut(0);
            $(this).removeClass("active");
    });
    
    $(".tt-menu-horizontal li:has(.tt-menu-horizontal-right)").addClass("level-item2");
    $(".tt-menu-horizontal-right li:has(ul)").addClass("level-item");
    
});


When hovering the mouse over any item in the list (the li tag), we look for the first ul element (submenu) in it and if this element is present, then we show it. For convenience, we add typical arrows to those lists that contain submenus, which seem to hint that there is something to fall out =) The level-item (right arrow) and level-item2 (down arrow) classes are responsible for these arrows.


To connect the menu, you need to add the following code between the tags and
 Code
<script type="text/jаvascript" src="{THEME}/js/active.js"></script>

 Vertical menu code

<div style="clear: both;height: 100px;"></div>

<ul class="tt-menu">
    <li><a href="#">First level 1111</a></li>
<li>
        <a href="#">First level 2222</a>
        <ul>
            <li><a href="#">Second level 1111</a></li>
            <li>
                <a href="#">Second level 2222</a>
                <ul>
                    <li><a href="#">Third level 1111</a></li>
                    <li><a href="#">Third level 2222</a></li>
                    <li><a href="#">Third level 2222</a></li>
                    <li>
                        <a href="#">Third level 3333</a>
                        <ul>
                            <li><a href="#">Fourth level 1111</a></li>
                            <li><a href="#">Fourth level 2222</a></li>
                            <li><a href="#">Fourth level 3333</a></li>
                            <li><a href="#">Fourth level 4444</a></li>
                        </ul>
                    </li>
                    <li><a href="#">Third level 4444</a></li>
                </ul>
            </li>
        </ul>
    </li>
    <li><a href="#">First level 3333</a></li>
<li><a href="#">First level 4444</a></li>
</ul>
</div>

 Horizontal menu code

<div style="min-height: 500px;">
<ul class="tt-menu-horizontal">
    <li><a href="#">First level 1111</a></li>
<li>
        <a href="#">First level 2222</a>
        <ul class="tt-menu-horizontal-right">
            <li><a href="#">Second level 1111</a></li>
            <li>
                <a href="#">Second level 2222</a>
                <ul>
                    <li><a href="#">Third level 1111</a></li>
                    <li><a href="#">Third level 2222</a></li>
                    <li><a href="#">Third level 2222</a></li>
                    <li>
                        <a href="#">Third level 3333</a>
                        <ul>
                            <li><a href="#">Fourth level 1111</a></li>
                            <li><a href="#">Fourth level 2222</a></li>
                            <li><a href="#">Fourth level 3333</a></li>
                            <li><a href="#">Fourth level 4444</a></li>
                        </ul>
                    </li>
                    <li><a href="#">Third level 4444</a></li>
                </ul>
            </li>
        </ul>
    </li>
    <li><a href="#">First level 3333</a></li>
<li><a href="#">First level 4444</a></li>
</ul>

Information

Visitors who are in the group Guests they can't download files.
Log in to the site under your login and password or if you are a new user go through the process registrations on the website.

Comments:

This publication has no comments yet. You can be the first!

Information the publication:

Related News

12 November 2022
PrestaShop script / Modules PrestaShop
Mega Menu PRO v2.2.4

The most powerful Prestashop mega menu module, stunning design, super ease of use, excellent display on mobile

Read more
13 December 2022
Joomla modifications
Vertical Menu v4.0.278

Vertical Menu is a convenient, fully customizable, multi-purpose menu module for Joomla. It is easily installed on

Read more
24 November 2022
WordPress / WordPress Plugins
Hero Mega Menu v1.16.0

Create your own WordPress menu in a few simple steps. HeroMenu allows you to easily and intuitively create a

Read more
26 December 2022
DLE hacks
Changes in DLE templates

The hack will allow you to display, in the admin panel of the Dle 10.2-10.3 engine, Changes in the DataLife Engine

Read more
17 November 2022
VBulletin / Mods for vBulletin
[3.8.x] vBPublications

The version has been updated to RC1!!! So, what is it and why. The hack is intended for those who, like me, don't

Read more

Information

Users of visitor are not allowed to comment this publication.

Site Search

Site Menu


☑ Scripts Software

Calendar

«    May 2024    »
MonTueWedThuFriSatSun
 12345
6789101112
13141516171819
20212223242526
2728293031 

Advertisement

Survey on the website

Evaluate the work of the site
 

Statistics

  • +6 Total articles 5578
  • +16 Comments 3149
  • +32 Users : 4130