Git Product home page Git Product logo

week3.day1.userinput's Introduction

week3.day1.userInput

Instructions

  1. Fork and clone this repo: week3.day1.userInput
  2. Do NOT alter the HTML or CSS and do not use an outside library.
  3. Using what you know about the DOM and JavaScript, modify the website in the following ways:
    • WHILE typing in the #title_input field, the #main_title is updated
      • Hint: try key events
    • When the user clicks on the #submit_button Button:
      • If the user has any field left blank, send an alert() informing the user to “Please fill in all fields”
      • If the user has all fields filled out:
        • Parse the inputs into the following “Ad Lib” text, putting the corresponding inputs in the appropriate spots: “Last night I ate a {#noun}, and today I just had to {#verb}. What a {#adjective} day!”
        • Hide the .form_container
        • Populate #story_result with the finalized text
      • Tip: Remember to .preventDefault() or else the button will attempt to submit the form, refreshing the page

Extra Credit

  • Customize the Ad Lib text and include additional input fields.
  • Instead of making the .form_container disappear suddenly, have it fade out slowly over .5 second
    • Note: you do not need to use an outside library to do this.
    • Once you have it working...try using jQuery to accomplish the same thing!
    • jQuery is a library that makes document traversal, manipulation, and event handling easier for developers. Ask your instructional team how to set this up properly!

Helpful Resources

week3.day1.userinput's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.