Git Product home page Git Product logo

javascript-style-editor-challenge's Introduction

JavaScript Style Editor Challenge

Overview

In this exercise, we're going to play with forms not as tools for sending data to a server, but as a way to allow users to manipulate the DOM using JavaScript. Specifically, we're going to build a form that will allow a user to dynamically change the styles.

The purpose of this drill is to practice using JavaScript to select data a user has entered in a form and pass it to the desired function.

To make it achieve the desired functionality, you need to be familiar with the following concepts:

If you bind to the submit event, you should consider using the event.preventDefault() method provided by jQuery.

Workflow

Fork this repository before working on the solution.

It may seem obvious what you have to do, but just to make it extra clear what the expected behavior is:

  1. Enter a CSS selector (e.g. h1, #header, .faded) into the left input field
  2. Enter a CSS property (e.g. color, padding, background-color) into the middle input field
  3. Enter a CSS value for the property (e.g. if the property is color, enter something like blue or #ff30eb)
  4. Click the button and watch the page transform before your eyes!

Note: Here is a video showing this behavior in action: Style Editor Video

The solution to this exercise can be broken down into three parts:

  1. retrieving the values from the form,
  2. passing those values into the correct jQuery function for manipulating CSS, and
  3. binding the previous two parts to a particular event using an event handler.

If you are having trouble solving this problem, ask yourself the following questions:

  • Is my code correctly bound to the appropriate event? If not, how can I test for this?
  • Do I know how to retrieve the values from the form?
  • Am I correctly passing the user data into the function that modifies the page styles?

Finished?

Create a PR back to this repository with your completed work. In your PR, include a summary of what was the most challenging part of this challenge.

Resources

javascript-style-editor-challenge's People

Contributors

case-eee avatar meyerhoferc avatar

Watchers

 avatar  avatar

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.