Write CSS and JavaScript (JS) code that allows users to view and interact with N
ID: 3564670 • Letter: W
Question
Write CSS and JavaScript (JS) code that allows users to view and interact with NBA news.
Data: Each news item is stored as one row. Each news item has an id, title, details, date, and a picture. Write JS
code that iterates through the data, and displays it in the top marquee. The marquee only shows
the news titles.
Marquee: Write CSS that shows the the news headlines as a marquee. Between each news heading is the NBA icon. Further, to the right of the marquee is a play/pause icon. In the beginning, the icon shows a pause sign. When it is clicked, the marquee pauses, and the icon becomes a play icon. When the play icon is clicked, the
marquee runs, and the icon becomes a pause icon. Write JS code that allows that behavior.
News Details: Underneath the news marquee is the news details. When a news
heading in the marquee is clicked, the news detail box shows details about the clicked news. The
details are the heading, the details of the news, the date, and a picture.
Explanation / Answer
var paragraphs = document.getElementsByTagName("p"); for (var i = 0; iRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.