Question: include jQuery and main.js in the HTML file. 2. Edit the existing main.js file. Write your code inside a jQuery document ready function. 3. Create

include jQuery and main.js in the HTML file.

2. Edit the existing main.js file. Write your code inside a jQuery document ready function.

3. Create an event handler to run whenever the salary and percent fields have changed ("change" event).

4. In the event handler, calculate the amount you can spend on tech, with a dollar sign, and insert it into the span#amount element using jQuery.

5. Test your code by entering values in both fields.

6. Try using the "keyup" event instead of "change". (your submission can use one or the other with no mark deduction) (What's the difference?)

7. Use the built in toFixed() method to round the number to dollars and cents. That will get rid of extra decimal places.

///// Index.html /////

Tech Calculator

Tech Calculator

You can spend $0 on tech this year.

Have fun!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!