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 9178181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:29:31+00:00 2026-06-17T17:29:31+00:00

How can this be achieved using vanilla javascript? Following uses jQuery syntax. $(function(){ $(ul.dropdown

  • 0

How can this be achieved using vanilla javascript? Following uses jQuery syntax.

$(function(){
    $("ul.dropdown li").hover(
        function(){
            $(this).addClass("hover"); 
            $('ul:first',this).css('visibility', 'visible');
        },
        function(){
            $(this).removeClass("hover");
            $('ul:first',this).css('visibility', 'hidden');
        }
    );
    $("ul.dropdown li ul li:has(ul)").find("a:first").append(" » "); 
});
  • 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-06-17T17:29:33+00:00Added an answer on June 17, 2026 at 5:29 pm

    Something like this is similar:

    document.body.addEventListener(
        'load',
        function(){
            var elements = document.querySelectorAll("ul.dropdown li");
            for(var i = 0, l = elements.length; i < l; i++){
                var e = elements[i];
                e.addEventListener('mouseover', function(e){
                    e.setAttribute('class', e.getAttribute('class') + ' hover');
                    document.querySelector("ul.dropdown li").style.visibility = 'visible';
                    e.style.visibility = 'visible';
                })
                e.addEventListener('mouseout',  function(e){
                    e.setAttribute('class', e.getAttribute('class').replace(' hover',''));
                    document.querySelector("ul.dropdown li").style.visibility = 'hidden';
                    e.style.visibility = 'hidden';
                })
            }
            document.querySelector("ul.dropdown li ul li:has(ul)").querySelector("a:first").innerHTML += " &raquo; "; 
        }
    )
    

    (But not the same)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to work out how this can be achieved using jQuery, I have
can anybody help me understand how Honda achieved this effect: http://testdays.hondamoto.ch/ I mean the
How can I achieve this behaviors onclick with jquery : default state: <a href=something.html>Anchor</a>
Can this be done quickly in jQuery before I start looping through them? Or
I want to attach SQL Server 2005 database at runtime. Can this be achieved
I need a calendar to be displayed on a textbox. This can be achieved
I want to hide framelayout dynmically in android, How I can achieve this.
How can I achieve this view with CSS: ------------------TITLE or TITLE------------------ I have <div
Can't seem to achieve this simple functionality! All I want is to clear a
I try that a User can be member of several associations. To achieve this

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.