• Increase Resolution of YouTube Thumbnails
  • Final Project
  • Glossary
  • Regular Expressions (Regex)
  • Projects
  • Challenges
  • Essential Tools
  • HTML
  • CSS
  • JavaScript
  • Canvas
  • Web Scraping
  • Learning Analytics
  • Images
  • Download
  • Translations
  • Challenge 13

    Create Some JavaScript Listener Buttons

    JavaScriptBootstrap

    Background

    JavaScript Listeners can be very useful in eLearning development for allowing users to interact with a tool or its content. Listeners might trigger visible changes to the page or behaviors that the user notices, or they might also be used to store data about user behavior for analysis (as with click-level analytics).

    Task

    Create a Bootstrap HTML page with at least 4 buttons. Give each button a unique ID, and make each button do something different when it is clicked. For example, each button might show a different alert message. Or you can also have an AI help you write what you would like to occur by providing it a prompt ike "in JS, add a new class to an HTML element."

    Do something creative and fun! Check out the solution Result tab for an example of a Harry Potter sorting hat.

    Solution

    This content is provided to you freely by EdTech Books.

    Access it online or download it at https://edtechbooks.org/elearning_hacker/create_some_javascript_listener_buttons.