Open barryross opened 7 years ago
You are doing some great work here Madison. Nice work on most of the requirements and for taking a stab at the bonus! The event.preventDefault()
one was a bit tricky, because I actually forgot to include the problem in the starter code, for which event.preventDefault()
solves!
Please see inline feedback for additional comments and an example of how to use event.preventDefault()
FEWD Week #4 Project: JavaScript Basics
Description
The team from Relaxr is back...again! They want their page to be more interactive and asked you to add JavaScript to their source code. You've been given the HTML and CSS but will need to create a JavaScript file and add a few different pieces of interactivity: Users should be able to click a link and have the remainder of the blog articles' content slide down and appear on the page; users should also be able hide the content when they are finished reading. See a detailed technical explanation below.
Student: Madison Rosner
Project URL: https://github.com/madshutter/homework-landingpage/tree/master/assignment%20%234
event.preventDefault()
function$.ready()
handler to delay your code from executing until all DOM assets have been loaded$.click()
handler<p>
tag (withid="first-read-more-text"
) slide down along with a "Read Less" link in the blog posts using$.slideDown()
and$.show()
$.hide()
<p>
tag (withid="second-read-more-text"
) slide down along with a "Read Less" link in the blog posts using$.slideDown()
and$.show()
$.hide()
<p>
(withid="first-read-more-text"
) slide up and hide the "Read Less" link using$.slideUp()
and$.hide()
$.show()
<p>
(withid="second-read-more-text"
) slide up and hide the "Read Less" link using$.slideUp()
and$.hide()
$.show()