Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please give me the code to do this, I could not figure it out last time I did it and want to see where I
Please give me the code to do this, I could not figure it out last time I did it and want to see where I went wrong for practice and learning purposes!!! this is an old prject You might be better off just looking at the screenshots!! Task : Create an index.html As always, create the proper folders and an index, css and JavaScript files for this lab. And make sure you also put a link from your art homepage to this lab As usual, create an index.html with three organized sections: Challenge, Problems, and Results Use heading, div, and paragraph tags to organize your page Include jQuery in the of your HTML along with your css and JavaScript with: Task : Create a CSS file for your lab Do all the usual things to gussy up your page letting your creativity fly. Once you get your JavaScript working, you may want to go back and customize the results of your JavaScript in CSS Here's what mine looks like: text p display: inlineblock; maxwidth: ; margin: ; padding: px; borderradius: px; backgroundcolor: darkgray; color: white; fontfamily: sansserif; fontsize: ; Task : Create a JavaScript file Create a new javascript file or use the existing template in your code editor in your lab's js folder. Comment block: Put a comment block at the top of your program. Here's what mine looks like: lab.js This simple JavaScriptjQuery script appends new elements to an output div Requirements: jQuery must be loaded for this script to work. Author: Wes modes Date: Let's create a little helper function that will generate some fake dialogue: function generateRandomText const text "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut const text "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. const min; const max const randLen Math.floorMath randommin; Get a random starting index to slice the Lorem Ipsum text const randStart Math.floorMathrandomtextlength randLen ; Generate the random Lorem Ipsumlike text return text.slicerandStart randStart randLen; Add an event listener for your button: Within the event listener call back, call our little helper function and save the results: Now, select your output div and append a new div with your newText: Test your button. Remember: Experiment with new commands in the JavaScript console to see how they work Add comments to your function to say what it does In the body of your HTML add a section in which we can put our output: Put a button under your output div: Add a link to your JavaScript file in your index page. Take a screenshot of your source code in the editor. Task : Create a CSS file for your lab Do all the usual things to gussy up your page letting your creativity fly. Once you get your JavaScript working, you may want to go back and customize the results of your JavaScript in CSS Here's what mine looks like: text display: inlineblock; maxwidth:
Please give me the code to do this, I could not figure it out last time I did it and want to see where I went wrong
for practice and learning purposes!!! this is an old prject
You might be better off just looking at the screenshots!!
Task : Create an index.html
As always, create the proper folders and an index, css and JavaScript files for this lab. And make sure you also put a link from your art homepage to
this lab
As usual, create an index.html with three organized sections: Challenge, Problems, and Results
Use heading, div, and paragraph tags to organize your page
Include jQuery in the of your HTML along with your css and JavaScript with: Task : Create a CSS file for your lab
Do all the usual things to gussy up your page letting your creativity fly. Once you get your JavaScript working, you may want to go back and customize
the results of your JavaScript in CSS Here's what mine looks like:
text p
display: inlineblock;
maxwidth: ;
margin: ;
padding: px;
borderradius: px;
backgroundcolor: darkgray;
color: white;
fontfamily: sansserif;
fontsize: ;
Task : Create a JavaScript file
Create a new javascript file or use the existing template in your code editor in your lab's js folder.
Comment block: Put a comment block at the top of your program. Here's what mine looks like:
lab.js This simple JavaScriptjQuery script appends new elements to an output div
Requirements: jQuery must be loaded for this script to work.
Author: Wes modes
Date:
Let's create a little helper function that will generate some fake dialogue:
function generateRandomText
const text "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut const text "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
const min;
const max
const randLen Math.floorMath randommin;
Get a random starting index to slice the Lorem Ipsum text
const randStart Math.floorMathrandomtextlength randLen ;
Generate the random Lorem Ipsumlike text
return text.slicerandStart randStart randLen;
Add an event listener for your button:
Within the event listener call back, call our little helper function and save the results:
Now, select your output div and append a new div with your newText:
Test your button.
Remember:
Experiment with new commands in the JavaScript console to see how they work
Add comments to your function to say what it does
In the body of your HTML add a section in which we can put our output:
Put a button under your output div:
Add a link to your JavaScript file in your index page.
Take a screenshot of your source code in the editor.
Task : Create a CSS file for your lab
Do all the usual things to gussy up your page letting your creativity fly. Once you get your JavaScript working, you may want to go back and customize
the results of your JavaScript in CSS Here's what mine looks like:
text
display: inlineblock;
maxwidth:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started