Open barryross opened 7 years ago
Christian, awesome work on this assignment! You are doing some great things and I had a look at both of your approaches/solutions. Nice work exploring the use of $(this), toggleClass(), hasClass() etc
!
I have put n/a
for the event.preventDefault()
requirement b/c that was there assuming the "read more" and "read less" "buttons" were links, although that in itself wasn't a requirement. So, it didn't make sense to me to grade that one.
For the .ready()
, I left one mark off b/c we want to wrap all of our code inside of that event listener, I noticed only a portion of yours was contained.
Do you have any questions about when to use event.preventDefault()
?
Please see inline comments for more info, and keep up the great work!
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: Christian Contaoi
Project URL:https://github.com/FadedLocks702/homework-landingpage02
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 post using$.slideDown()
and$.show()
$.hide()
<p>
tag (withid="second-read-more-text"
) slide down along with a "Read Less" link in the blog post 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()