Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Javascript: I created a function that allows the user to click on the menu which will dropdown and provides different href sources. However, I have

Javascript: I created a function that allows the user to click on the menu which will dropdown and provides different href sources. However, I have no idea what to do next. Now, what I want to do as the demo below. I want to provide an option to the user that will allow multiple selection the Menu items which they can add/remove as a favorite which the demo has Myapps: A function should allow the user to do after the menu is dropdown.

1) When the user click on the select items in the Menu. The user will have the option to click on the Favorite button to add or remove the item list to the Myapps.

image text in transcribed

  • Bing
  • Images
  • Politics
  • Health
  • Sports

MyApp:

function myFunction() {

document.getElementById("myDropdown").classList.toggle("show");

}

window.onclick = function(event) {

if (!event.target.matches('.dropbtn')) {

var dropdowns = document.getElementsByClassName("dropdown-content");

var i;

for (i = 0; i

var openDropdown = dropdowns[i];

if (openDropdown.classList.contains('show')) {

openDropdown.classList.remove('show');

}

}

}

}

Menu Big Images olitics Health Sports Favorite MyApp Microsoft Edge. Try it today OS Maps News l MSN Office Online OU Bin

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions