Java script add event help needed 5) In the "myPage" section, select the fifth // button and assign a "click" listener. When // clicked, it should toggle the class named // "fourthPara" for the fifth paragraph // in the "myPage" section. // 6) In the "myPage" section, select the sixth // button and assign a "click" listener. When // clicked, it should change the text content // of the sixth paragraph in the "myPage" // section to: // "Event Bubbling. Stopping propagation." // Your event listener should be set to // Event Bubbling. You should stop the // event propagation.   HERE IS THE INDEX HTML :       Practice Assignment 11                 One       Two       Three       Four       Five       Six               Paragraph One.       Paragraph Two.       Paragraph Three.       Paragraph Four.       Paragraph Five.       Paragraph Six.                       One       Two       Three       Four       Five       Six               Paragraph One.       Paragraph Two.       Paragraph Three.       Paragraph Four.       Paragraph Five.       Paragraph Six.                               Refresh this page to see your score update         after you have made changes to your Javascript code in the main.js file.                     When you are ready to submit your assignment, click the submit button.             Submit Your Assignment

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Java script add event help needed

5) In the "myPage" section, select the fifth
// button and assign a "click" listener. When
// clicked, it should toggle the class named
// "fourthPara" for the fifth paragraph
// in the "myPage" section.

// 6) In the "myPage" section, select the sixth
// button and assign a "click" listener. When
// clicked, it should change the text content
// of the sixth paragraph in the "myPage"
// section to:
// "Event Bubbling. Stopping propagation."
// Your event listener should be set to
// Event Bubbling. You should stop the
// event propagation.

 

HERE IS THE INDEX HTML :

<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Practice Assignment 11</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/8.1.1/mocha.css"
    integrity="sha512-Ytt2foRGKdIInPXwyS3gxRvfTv4n2wi7uB7neCLH1LjExT+PKBeQu6LNVB4QpHaJqx7m2btagBs4kqxYC1QNFg=="
    crossorigin="anonymous" />
  <link rel="stylesheet" href="./css/style.css" />
</head>

<body>
  <section id="hiddenSection" class="hiddenSection">
    <div class="buttons-container">
      <button>One</button>
      <button>Two</button>
      <button>Three</button>
      <button>Four</button>
      <button>Five</button>
      <button>Six</button>
    </div>
    <div class="para-container">
      <p>Paragraph One.</p>
      <p>Paragraph Two.</p>
      <p>Paragraph Three.</p>
      <p>Paragraph Four.</p>
      <p>Paragraph Five.</p>
      <p>Paragraph Six.</p>
    </div>
    <hr />
  </section>
  <section id="myPage" class="myPage">
    <div class="buttons-container">
      <button id="button1">One</button>
      <button id="button2">Two</button>
      <button>Three</button>
      <button>Four</button>
      <button>Five</button>
      <button>Six</button>
    </div>
    <div class="para-container">
      <p id="p1">Paragraph One.</p>
      <p id="p2">Paragraph Two.</p>
      <p>Paragraph Three.</p>
      <p>Paragraph Four.</p>
      <p>Paragraph Five.</p>
      <p>Paragraph Six.</p>
    </div>
    <hr />
  </section>
  <section id="tests">
    <div class="directions">
      <p>
        <span id="reloadPage">Refresh this page</span> to see your score update
        after you have made changes to your Javascript code in the main.js file.
      </p>
      <p>
        When you are ready to submit your assignment, click the submit button.
      </p>
      <button id="submitButton">Submit Your Assignment</button>
    </div>
    <div id="mocha"></div>
  </section>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/8.1.1/mocha.min.js"
    integrity="sha512-vOMXB+Rjob/NIG88cgEK+t6Uuf0zJIzQrfKH8VFc7AW18y/rzszRXaKPNAPf1ePv2hQ3eYR8yEu4S85Np3DhLA=="
    crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/chai/4.2.0/chai.min.js"
    integrity="sha512-x3BwhuxT44pOQZanacQyDnrB2r1L1AUfjUaefYArTHR9sHEvvy3NSnnm5Z7GAl5YPc3+GEWFT0S34obDSzUvaQ=="
    crossorigin="anonymous"></script>
  <script>
    mocha.setup("bdd");
  </script>
  <script src="main.js"></script>
  <script src="https://serene-roentgen-345cd7.netlify.app/tests/practice11Test.min.js"></script>
  <script>
    mocha.run();
  </script>
  <script src="https://serene-roentgen-345cd7.netlify.app/util/util11.min.js"></script>
</body>

</html>

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY