Open bdpettway19 opened 7 years ago
Hi Barry,
Good start. A few things though:
Add event listeners
You have an eventListener
added to your firstName
input:
firstName.addEventListener('input', update)
That's great, you'll need to do that to all of the input
and textarea
boxes that are used to update the profile.
Spaces between words
Also, be sure that when you update the profile, there are spaces between all words. There's no space between the first and last names right now for example.
Phone and email links
Check the example format again for the email and phone number. You'll need to make links (a
tags) for each just like in the code example.
Definitely a good first crack at it, I'm sure you'll have questions so definitely reach out on Slack if you need help :+1:
I also sent you an email, I'd be happy to meet and help you crank out some lessons if that would be helpful.
Hey Stuart, I've gone in and made the suggested changes.
Hi Barry, good job! Two things:
<h1>
tag, you can look back to the example format to see where the tag opens and closespreview
divLet me know when you've made changes :+1:
Hey Stuart I updated my code, but for some reason when I look at it from the hosted site on Github it's not showing the space between my first and last name. But if you look at my code and when I run it on live server, the space is clearly there. Other than that, everything else should be fine.
Sneaking in here to give you a :shipit:! Nice job responding to Stuart's feedback. ⭐️ 🔥 🌴
A tip for future projects: Line 10 of your JS is a very long string. Breaking it up into multiple lines will make it way easier to read.
Some guidelines for breaking up long strings in JavaScript:
+
So your string might look like:
var content =
'<h1>Hi my name is ' + firstName.value + ' ' + lastName.value + ' !</h1>' +
' <p>'+ describe.value + '</p> ' +
'<p>If you\'re interested in a date, you can email me at ' +
'<a href="mailto:' + email.value + '" target="_blank">'+ email.value + '</a>' +
' or give me a call at</p> ' +
'<a href="tel:' + phone.value + '" target="_blank">' + phone.value + '</a>'
@stuartpearman Can you take a look at this? It's hosted here and meets the following criteria:
<em>hella charming</em>
should appear as hella charming)<pre><code></code></pre>
elements (e.g.<em>hella charming</em>
should appear as<em>hella charming</em>
).js
file