These are chat archives for FreeCodeCamp/Help

26th
Feb 2016
Michael Aubrey
@mca62511
Feb 26 2016 00:00
Am I understanding that correctly?
Michael Poutre
@M1kep
Feb 26 2016 00:00
Ya.
Tyler Moeller
@TylerMoeller
Feb 26 2016 00:00
@M1kep To get back to the exercise, go here: http://www.freecodecamp.com/challenges/steamroller
Michael Poutre
@M1kep
Feb 26 2016 00:00
In my head it made sense cause eventualy the most innber call should return
@TylerMoeller that wouldn't work cause it auto-runs the code, but I found that if I add ?run=disabled lik....
Michael Aubrey
@mca62511
Feb 26 2016 00:01
if it doesn't let you go back to the exercise using that link then add this to the end "#?solution="
Michael Poutre
@M1kep
Feb 26 2016 00:01
that it works
it'll give you a blank code area
from there hit "reset"
Michael Poutre
@M1kep
Feb 26 2016 00:01
ahh that one works too @mca62511 :D
Michael Aubrey
@mca62511
Feb 26 2016 00:02
when i was doing those... i DID disable the loop protection
and got stuck
and that's how I got back in
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:03
@ch33s3cr4ck3r
hey guys need some help, im building the portfolio page and am having issues with getting the background image to stay the full width of the page. i get the parallax effect, but its only showing a portion of the background picture. i tried putting all this in the header, and making a css class but im not getting any luck
was really hoping to get some help
i know i can set the image with a manual height, but that wont be responsive on everyones webpage
i want it so that when someone gets on to see the site the photo is the size of the screen, like the demo, and then u keep moving through. i could set the background image for the body but that would go down and spread to long
Michael Poutre
@M1kep
Feb 26 2016 00:05
Is it worth an issue on github because it crashed without me disabling the protections?
Glen Roberts
@ZeroAccess
Feb 26 2016 00:07
@ch33s3cr4ck3r can you show your code please
Also check your margins,padding,border, on the image by hitting ctrl + shift + i in Chrome
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:09
@ZeroAccess Thank you. Here it is!
CamperBot
@camperbot
Feb 26 2016 00:09
ch33s3cr4ck3r sends brownie points to @zeroaccess :sparkles: :thumbsup: :sparkles:
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:09
<body>
<Header>
<nav>
<ul id="menu">
<li><a href="#">Home </a></li>
<li><a href="#">About</a></li>
<li><a href="#">Portfolio</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</nav>

<section id="heading">
<h1>Eskay Creative Digital Agency</h1>
<hr>
<h2> we do awesome work.</h2>
</section>
</Header>

<section>
<footer>
<p> <strong> &copy 2016 Sean Khan </p>
</footer>
</section>
</body>
CamperBot
@camperbot
Feb 26 2016 00:09
:star: 353 | @zeroaccess | http://www.freecodecamp.com/zeroaccess
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:09

CSS

menu li {

display: inline-block;
margin: 0 5% 0 5%;
padding: 0;
font-weight: 800;
}

a {
text-decoration: none;
}

heading {

text-align: center;
text-decoration: none;
}

heading hr {

width: 100px;
}

Header ul {
list-style: none;
}

Header {
background-image: url("http://www.artsfon.com/pic/201502/1920x1080/artsfon.com-58997.jpg");
background-attachment: fixed;
background-position: center;

}

footer {
text-align: center;
}

h1 {
font-size: 3.5em;
color: white;
}

h2 {
font-size: 2.5em;
color: white;
}

Matt Burd
@EskimoBurd
Feb 26 2016 00:10
Get stumped at times, with trying to start my portfolio, because we never really did anything like it in practice lessons.
Glen Roberts
@ZeroAccess
Feb 26 2016 00:10
explain format
CamperBot
@camperbot
Feb 26 2016 00:10

:point_right: code formatting [wiki]

Inline code

This an inline `<paste code here>` code formatting with a single backtick(`) at start and end around the code.

Code Block

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:11

'#menu li {
display: inline-block;
margin: 0 5% 0 5%;
padding: 0;
font-weight: 800;
}

a {
text-decoration: none;
}

heading {

text-align: center;
text-decoration: none;
}

heading hr {

width: 100px;
}

Header ul {
list-style: none;
}

Header {
background-image: url("http://www.artsfon.com/pic/201502/1920x1080/artsfon.com-58997.jpg");
background-attachment: fixed;
background-position: center;

}

footer {
text-align: center;
}

h1 {
font-size: 3.5em;
color: white;
}

h2 {
font-size: 2.5em;
color: white;
}'

CamperBot
@camperbot
Feb 26 2016 00:11
type help for a list of things the bot can do
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:11
sorry guys for repasting, was trying to make it more readable
Glen Roberts
@ZeroAccess
Feb 26 2016 00:11
Ok, let's look at it together. Are you doing it in codepen?
I already see it I think
I'm guessing your header width is something like 100px just quickly glancing over it.
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:12
yes doing it in codepen
Glen Roberts
@ZeroAccess
Feb 26 2016 00:13
link codepen
Alex Mancheno
@alexmancheno
Feb 26 2016 00:13
Can anyone help me out with "Prioritize One Style Over Another"?
Glen Roberts
@ZeroAccess
Feb 26 2016 00:13
@alexmancheno show code and maybe what you think is happening please
Alex Mancheno
@alexmancheno
Feb 26 2016 00:13

<style>
body {
background-color: black;
font-family: Monospace;
color: green;
}
.pink-text {color: pink}

</style>

<h1 class="pink-text">Hello World!</h1>

Paul Brown
@paulbwd
Feb 26 2016 00:14
help
CamperBot
@camperbot
Feb 26 2016 00:14

Hi, I'm CamperBot! I can help you in this chatroom :smile:

Basic Commands:

  • find TOPIC find all entries about topic. ex: find js
  • wiki TOPIC show contents of topic page
  • thanks @username send brownie points to another user
  • about @username shows info on that user
  • Algorithm BONFIRENAME info on a Algorithm

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

Alex Mancheno
@alexmancheno
Feb 26 2016 00:14
I need to: "Your <style> should have a pink-text CSS class with its color set to pink."
Paul Brown
@paulbwd
Feb 26 2016 00:14
.pink-text {color:pink;}
that needs to be in between your style tags
Alex Mancheno
@alexmancheno
Feb 26 2016 00:15
It was, I think I just forgot the semi-colon
FreddyAl
@FreddyAl
Feb 26 2016 00:16
How to do you label bootstrap wells?
Alex Mancheno
@alexmancheno
Feb 26 2016 00:16
Yup, oops! Thanks!
Glen Roberts
@ZeroAccess
Feb 26 2016 00:16
@ch33s3cr4ck3r got it, you need to think about the properties of body in css.
What property in css would cause the entire body to act like that?
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:17
please explain @ZeroAccess , i honestly would love to get this right
not sure exactly what ur asking,
Glen Roberts
@ZeroAccess
Feb 26 2016 00:17
Ok so everything in HTML can be styled in CSS right?
You can even style the HTML tag itself if you needed
Understand that part?
bitgrower
@bitgrower
Feb 26 2016 00:18
html is the framework, css is the paint, the moldings, etc ... (in general, there are lots of ways the analogy falls down ... but it's good enough)
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:18
yes got that part
Glen Roberts
@ZeroAccess
Feb 26 2016 00:18
So basically what tags do you have that affect your background image?
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:19
background size, height
Glen Roberts
@ZeroAccess
Feb 26 2016 00:20
tags was the wrong word sorry. my apologies (doing backups and focusing on that). What divs affect you background image?
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:21
well, hmm right now i dont have any divs effecting it. i have it inside of the header element. using the background image as the background to my header. so the only thing i can think that would make it work is setting a manual height to the header, but I dont like this as its not really responsive in a sense
Conni Stock
@connistock
Feb 26 2016 00:22
I finished My Tribute Page and learned a lot; however, I am needing some direction or instruction for navigational bars. I did not take any notes on nav bars or scrolling… Did I miss some lessons?
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:22
would i just create a div, put the header and all that in there? Set the background image inside the div, and set a manual height? i dont like setting the manual height as i feel im sort of forcing it
@connistock nav bars i had to learn on my own as well. you put them inside of an unordered list (ui), then set each tab as a li. CSS that li with display: inline-block;
Glen Roberts
@ZeroAccess
Feb 26 2016 00:23
Well that wouldn't get rid of this no .. trying to think how to explain this to you without just giving you the answer.
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:24
lol, to be entirely honest the answer could help too man. whatever works best so i can research
Glen Roberts
@ZeroAccess
Feb 26 2016 00:24
in CSS html has properties just like body and p and a and li they're baked in. So just because you didn't say html {color: black} by default it's black right? When you type Hello World as html it has a font and color and properties already by default right?
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:24
yes i follow
Glen Roberts
@ZeroAccess
Feb 26 2016 00:25
So, looking at your header html,body,header are all affected via css
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:25
yes got that
Glen Roberts
@ZeroAccess
Feb 26 2016 00:25
make a change in html or body and it could affect header corect?
correct*
Maybe html and body are default values for some sort of margins to assist in creating a website. Think back to Hello World ...was the word Hello World all the way at the top left hand corner or was there something affecting it?
are = have doh
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:26
i see
so since i have this image as the background in header, with default settings, it is looking the way it us
thus i need to css it to look different
something like that?
i css'd the header to show 855px for height, and it looks great, but what is a more efficient way to do it?
it just feels forced
Glen Roberts
@ZeroAccess
Feb 26 2016 00:27
exactly and looking at the website html, body, or header is probably where you should look
fix this first :D then we can hit that. You can use percentages and what not. I gotta hit the road (go back to the office) at the data center right now blowing servers up and I don't wanna be on camera when they go boom!
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:28
hahaha no problem, thank you @ZeroAccess
CamperBot
@camperbot
Feb 26 2016 00:28
ch33s3cr4ck3r sends brownie points to @zeroaccess :sparkles: :thumbsup: :sparkles:
:warning: ch33s3cr4ck3r already gave zeroaccess points
Glen Roberts
@ZeroAccess
Feb 26 2016 00:28
Just send me a message on here and I'll see it when I get back in my office. Hopefully I gave you a start but like I said think about default values for html and body (css wise) that should be huge
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:28
thank you for ur help, i work as a dba too not sure if its similar. ill message you and well chat from there
Glen Roberts
@ZeroAccess
Feb 26 2016 00:28
kinda short answer for everything I said just wanted you to have that A HA moment
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:29
will do, thank you so much for your time :)
Glen Roberts
@ZeroAccess
Feb 26 2016 00:29
awesome, I know a lil sql from building a web app
need to learn a lot more
yea ..gotta run fire!!!!
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:29
good luck!
Conni Stock
@connistock
Feb 26 2016 00:29
Thanks @ch33s3cr4ck3r I will begin now do I need to assign my background image prior to the nav bar or will it make a difference?
CamperBot
@camperbot
Feb 26 2016 00:29
connistock sends brownie points to @ch33s3cr4ck3r :sparkles: :thumbsup: :sparkles:
:star: 135 | @ch33s3cr4ck3r | http://www.freecodecamp.com/ch33s3cr4ck3r
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:30
I have my nav inside of the header, with the header housing the background image in css
and the nav is the first part of my header
before the h1, h2, and the buttons. since nav goes up top
Conni Stock
@connistock
Feb 26 2016 00:32
Snap… Ok @ch33s3cr4ck3r did we learn about headers and footers?
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:33
lol honestly i learned that myself too
to be entirely honest, footer is as easy as this for me
<section>
<footer>
<p> <strong> &copy 2016 Sean Khan </p>
</footer>
</section>
bonogit
@bonogit
Feb 26 2016 00:35
dont wrap footer inside section man
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:36
why not? just so i know
Don Price
@KingHippo
Feb 26 2016 00:36
trying out the gitter terminal client.
nerd mode enabled
bonogit
@bonogit
Feb 26 2016 00:38
its just the right way to use the tags, use section when it is a section of content@ch33s3cr4ck3r
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:38
got it thank you @bonogit
CamperBot
@camperbot
Feb 26 2016 00:38
ch33s3cr4ck3r sends brownie points to @bonogit :sparkles: :thumbsup: :sparkles:
:star: 33 | @bonogit | http://www.freecodecamp.com/bonogit
Don Price
@KingHippo
Feb 26 2016 00:38
This message was deleted
This message was deleted
bonogit
@bonogit
Feb 26 2016 00:39
if you just wanna use a tag to declare a seperate block, I will suggest div
ch33s3cr4ck3r
@ch33s3cr4ck3r
Feb 26 2016 00:39
nice, i need to make more use of them. that helps. ty
bonogit
@bonogit
Feb 26 2016 00:40
when you open up any website, coders use div everywhere, especially it doesnt come with any default property
FreddyAl
@FreddyAl
Feb 26 2016 00:47
How do you target the same element with multiple jQuery Selectors?
danitabrown1
@danitabrown1
Feb 26 2016 00:48
I'm on change the font size of an element and I don't know what i am doing wrong

<style>
.red-text {
color: red;
}
h1 {font-size:16px}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text" h2="font-size">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p h1="font-size">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Paul Brown
@paulbwd
Feb 26 2016 00:50
you dont need to put the h1 = font-size in your <p> tags
FreddyAl
@FreddyAl
Feb 26 2016 00:51
How do you target the same element with multiple jQuery Selectors?
Paul Brown
@paulbwd
Feb 26 2016 00:51
your css is selecting h1s
same for the h2
how do you mean @FreddyAl
FreddyAl
@FreddyAl
Feb 26 2016 00:52

Now you know three ways of targeting elements: by type: $("button"), by class: $(".btn"), and by id $("#target1").

Although it is possible to add multiple classes in a single .addClass() call, let's add them to the same element in three different ways.

Using each of the above jQuery selectors and the addClass() function:

Add the animated class to all elements with type button.

Add the shake class to all the buttons with class .btn.

Add the btn-primary class to the button with id #target1.

Use the $("button") selector.
Use the $(".btn") selector.
Use the $("#target1") selector.
Only add one class with each of your three selectors.
Your #target1 element should have the classes animated‚ shake and btn-primary.
Only use jQuery to add these classes to the element.

<script>
$(document).ready(function() {
$("button").addClass("animated")
$(".btn").addClass("shake")
$("#target1").addClass ("animated shake btn-primary")
});
</script>

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

<script>
$(document).ready(function() {
$("button").addClass("animated")
$(".btn").addClass("shake")
$("#target1").addClass ("animated shake btn-primary")
});
</script>

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

THis is what I have so gar
Paul Brown
@paulbwd
Feb 26 2016 00:54
according to the instructions you dont need animated shake on #target1
scrub that
are you getting an error?
FreddyAl
@FreddyAl
Feb 26 2016 00:56
yea
Paul Brown
@paulbwd
Feb 26 2016 00:56
whats the error?
FreddyAl
@FreddyAl
Feb 26 2016 00:58
SyntaxError: Unexpected token .
bonogit
@bonogit
Feb 26 2016 01:00
I havnt get to this part test yet, but in principle jQquery is triggered by event, for example by a click, hover etc... what is the point of adding class when onload...I would rather add class to the tags directly
Paul Brown
@paulbwd
Feb 26 2016 01:01
I think your missing your semi colons off your jquery statments
DJ
@qualitymanifest
Feb 26 2016 01:01
@FreddyAl $("#target1").addClass ("animated shake btn-primary") get rid of animated and shake. and there's a space between addClass and () that's causing problems
bonogit
@bonogit
Feb 26 2016 01:01
try add semicolon';'
DJ
@qualitymanifest
Feb 26 2016 01:02
there should be semicolons but i don't think the lack of those is causing the problem, it's the space
Paul Brown
@paulbwd
Feb 26 2016 01:04
@bonogit ah yes, but its first steps for many and this is just an introductory part of jquery, getting you used to making selections, before more complicated things such as events
bonogit
@bonogit
Feb 26 2016 01:04
oic, that make sense then
FreddyAl
@FreddyAl
Feb 26 2016 01:07
so do you guys know how to do it?
Heres my script so far
<script>
$(document).ready(function() {

$("button")
$(".btn")
$("#target1").addClass("btn-primary");
});
</script>
Matthew Stettner
@mstettner
Feb 26 2016 01:10
trying to ad <i class="fa-paper-plane></i>
whats wrong
<button class= "btn btn-primary" type="submit"><i class="fa-paper-plane"></i>Submit</button>
  </form>
Paul Brown
@paulbwd
Feb 26 2016 01:10
you need another fa in there
Matthew Stettner
@mstettner
Feb 26 2016 01:11
oh
Paul Brown
@paulbwd
Feb 26 2016 01:11
fa fa-paper-plane
Matthew Stettner
@mstettner
Feb 26 2016 01:11
yeah that was it thanks @paulbwd
CamperBot
@camperbot
Feb 26 2016 01:11
mstettner sends brownie points to @paulbwd :sparkles: :thumbsup: :sparkles:
:star: 279 | @paulbwd | http://www.freecodecamp.com/paulbwd
ahmed
@Ahmedrezk
Feb 26 2016 01:16
hello every one
Paul Brown
@paulbwd
Feb 26 2016 01:18
I think everyone has gone to bed
and me too now (night folks) zz zz zz
ahmed
@Ahmedrezk
Feb 26 2016 01:19
hahaha you'r rigrt
*right
Matthew Stettner
@mstettner
Feb 26 2016 01:20
okay im lost to many divs within divs
does this look right
bonogit
@bonogit
Feb 26 2016 01:20
lol its lunch time here
Matthew Stettner
@mstettner
Feb 26 2016 01:20
 <div class="col-xs-7"><div class="row"><input type="text" class="form-control" placeholder="cat photo URL" required></div>
    <div class="col-xs-5"><button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i> Submit</button></div></div>
  </form>
</div>
Nest both your form's text input and submit button within a div with the class row. Nest your form's text input within a div with the class of col-xs-7. Nest your form's submit button in a div with the class col-xs-5.
bonogit
@bonogit
Feb 26 2016 01:20
missing one close div
Matthew Stettner
@mstettner
Feb 26 2016 01:21
do you know where @bonogit
freecode10
@freecode10
Feb 26 2016 01:21
how do I next my text input element within a form element
nest
bonogit
@bonogit
Feb 26 2016 01:21
haha, next time dun write code this way, put it all seperate line. let me put it on sublime.
I am not sure I get it right, hang on
Matthew Stettner
@mstettner
Feb 26 2016 01:22
okay I dont really know the corrct way to write code
what is sublime?
bonogit
@bonogit
Feb 26 2016 01:23
<div class="col-xs-7">
<div class="row">
<input type="text" class="form-control" placeholder="cat photo URL" required>
</div>
<div class="col-xs-5">
<button type="submit" class="btn btn-primary">
<i class="fa fa-paper-plane"></i>
Submit</button>
</div>
</div>
</form>
</div>
dun worry about sublime now, I think you miss multiple tags
where is the start <form> tag
Matthew Stettner
@mstettner
Feb 26 2016 01:25
not sure
what do you mean
?
bonogit
@bonogit
Feb 26 2016 01:25
you have a </form> on last line 2
where does it start?
Matthew Stettner
@mstettner
Feb 26 2016 01:26
i cleared the code here is the original
</div>
    <input type="text" class="form-control" placeholder="cat photo URL" required>
    <button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i> Submit</button>
  </form>
</div>
and i need to do this
Nest both your form's text input and submit button within a div with the class row. Nest your form's text input within a div with the class of col-xs-7. Nest your form's submit button in a div with the class col-xs-5.
I cant wrap my head around it
bonogit
@bonogit
Feb 26 2016 01:28
now I get it
Matthew Stettner
@mstettner
Feb 26 2016 01:29
<div class="row"></div>
I put that around everything that i sent above correct?
bonogit
@bonogit
Feb 26 2016 01:30
<div class="row">
 <form>    
    <div class="col-xs-7">
        <input type="text" class="form-control" placeholder="cat photo URL" required>
    </div>
    <div class="col-xs-5">
        <button type="submit" class="btn btn-primary">
        <i class="fa fa-paper-plane"></i> 
        Submit</button>
    </div>
</form>
</div>
Matthew Stettner
@mstettner
Feb 26 2016 01:32
okay is that the completed code?
bonogit
@bonogit
Feb 26 2016 01:32
first of all, here is the right way for writing codes, dont put them inline otherwise when codes pile up to even just few lines you will be lost. dunno where is the start and the end
I believe so, havnt get the that challenge yet, not sure it will pass lol
but yes, its a complete block of a row
Matthew Stettner
@mstettner
Feb 26 2016 01:34
it still says:Make sure each of your div elements has a closing tag.
<div class="row">
 <form>    
    <div class="col-xs-7">
        <input type="text" class="form-control" placeholder="cat photo URL" required>
    </div>
    <div class="col-xs-5">
        <button type="submit" class="btn btn-primary">
        <i class="fa fa-paper-plane"></i> 
        Submit</button>
    </div>
</form>
</div>
lawrencebass
@lawrencebass
Feb 26 2016 01:34
@bonogit @mstettner I think the <form> tag might not have to be nested in the <div>
<div class="row">   
    <div class="col-xs-7">
        <input type="text" class="form-control" placeholder="cat photo URL" required>
    </div>
    <div class="col-xs-5">
        <button type="submit" class="btn btn-primary">
        <i class="fa fa-paper-plane"></i> 
        Submit</button>
    </div>
</div>
bonogit
@bonogit
Feb 26 2016 01:35
well, it depends on the requirement
yeah, try this way
lawrencebass
@lawrencebass
Feb 26 2016 01:35
Place that within the <form> tag </form> @mstettner
Matthew Stettner
@mstettner
Feb 26 2016 01:36
I copy and pasted your code in @lawrencebass
doesnt work says im still missing a closing div
lawrencebass
@lawrencebass
Feb 26 2016 01:36
Can you please paste your code, should be easy to spot @mstettner
Matthew Stettner
@mstettner
Feb 26 2016 01:37
 <div class="row">
 <form>    
    <div class="col-xs-7">
        <input type="text" class="form-control" placeholder="cat photo URL" required>
    </div>
    <div class="col-xs-5">
        <button type="submit" class="btn btn-primary">
        <i class="fa fa-paper-plane"></i> 
        Submit</button>
    </div>
</form>
</div>
bonogit
@bonogit
Feb 26 2016 01:37
well, I dont see problem here
Ryan
@LionOver
Feb 26 2016 01:38
.smaller-image {
width: 100px;
}
div {
background-color: gray;
}
</style>
lawrencebass
@lawrencebass
Feb 26 2016 01:38
Is that the entire code in the console? @mstettner
Matthew Stettner
@mstettner
Feb 26 2016 01:38
heres everything
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  h2 {
    font-family: Lobster, Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

</style>

<div class="container-fluid">
  <div class="row">
    <div class="col-xs-8">
      <h2 class="text-primary text-center">CatPhotoApp</h2>
    </div>
    <div class="col-xs-4">
      <a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>
    </div>
  </div>
  <img src="http://bit.ly/fcc-running-cats" class="img-responsive">
  <div class="row">
    <div class="col-xs-4">
      <button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
    </div>
  </div>
  <p>Things cats <span class="text-danger">love:</span></p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <div class="row">
      <div class="col-xs-6">
        <label><input type="radio" name="indoor-outdoor"> Indoor</label>
      </div>
      <div class="col-xs-6">
        <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Loving</label>
      </div>
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Lazy</label>
      </div>
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Crazy</label>
      </div>
    </div>
    <div class="row">
 <form>    
    <div class="col-xs-7">
        <input type="text" class="form-control" placeholder="cat photo URL" required>
    </div>
    <div class="col-xs-5">
        <button type="submit" class="btn btn-primary">
        <i class="fa fa-paper-plane"></i> 
        Submit</button>
    </div>
</form>
</div>
Ryan
@LionOver
Feb 26 2016 01:38
On the "Give a Background Color to a Div Element" task, my background in the <div> element did turn all of that to gray
Manish Giri
@Manish-Giri
Feb 26 2016 01:39
@lawrencebass FC Barcelona? ;)
Ryan
@LionOver
Feb 26 2016 01:39
But for some reason when I run it, it doesn't accept.
Thoughts?
lawrencebass
@lawrencebass
Feb 26 2016 01:39
Yeah @Manish-Giri :)
Manish Giri
@Manish-Giri
Feb 26 2016 01:40
@lawrencebass cool. Watched yesterday’s game?
Matthew Stettner
@mstettner
Feb 26 2016 01:40
any idea hats wrong with my code? where is the missing </div>?
lawrencebass
@lawrencebass
Feb 26 2016 01:41
Hell yeah lol It was awesome @Manish-Giri, what's the challenge called @mstettner ?
Manish Giri
@Manish-Giri
Feb 26 2016 01:41
@mstettner can tell you a shortcut - put it in codepen, use tidy to see which div doesn’t align, or use sublime, and see which doesn’t align
bonogit
@bonogit
Feb 26 2016 01:42
I get it @mstettner
Matthew Stettner
@mstettner
Feb 26 2016 01:42
Line up Form Elements Responsively with Bootstrap @lawrencebass
bonogit
@bonogit
Feb 26 2016 01:42
first delete second<form>, then add a close </div> on the last line
try this
Matthew Stettner
@mstettner
Feb 26 2016 01:42
what is tidy?
Manish Giri
@Manish-Giri
Feb 26 2016 01:43
what does it sound like
Matthew Stettner
@mstettner
Feb 26 2016 01:44
@bonogit @lawrencebass thanks
CamperBot
@camperbot
Feb 26 2016 01:44
mstettner sends brownie points to @bonogit and @lawrencebass :sparkles: :thumbsup: :sparkles:
:star: 43 | @bonogit | http://www.freecodecamp.com/bonogit
:star: 361 | @lawrencebass | http://www.freecodecamp.com/lawrencebass
Matthew Stettner
@mstettner
Feb 26 2016 01:44
that worked but I have no idea why or how? super frustrating
bonogit
@bonogit
Feb 26 2016 01:44
you see the problem? @mstettner
Matthew Stettner
@mstettner
Feb 26 2016 01:44
you fixed it but not sure why deleting form worked
bonogit
@bonogit
Feb 26 2016 01:45
just re think about it, thats how debug work, you will face a lot more later
Matthew Stettner
@mstettner
Feb 26 2016 01:45
I knew i was missing a div somewhere but when I added one at the end it was highlighted in red
bonogit
@bonogit
Feb 26 2016 01:45
so on the previous code, you have two <form>
which syntax check didnt tell you
Matthew Stettner
@mstettner
Feb 26 2016 01:45
how'd I get two forms though. I guess I wrote an extra one
is tidy in code camp or something that is a google serch?
what is syntaz?
x
bonogit
@bonogit
Feb 26 2016 01:46
secondly, its <div class="container-fluid"> on the line 16, you didnt get a close tag for it
its happens
well, you can have as much forms as you want, just remember, close tag
Tony
@Rogers187
Feb 26 2016 01:48
Can't get challenge Chaining If Else Statements to pass any thoughts?
Matthew Stettner
@mstettner
Feb 26 2016 01:48
how does anyone get good at coding. It is very overwhelming
mlutso
@mlutso
Feb 26 2016 01:48

Hi. What's wrong in my code? i have error :"TypeError:Attempted to assign to readonly property."
var code = "formatted";
var collection = {
2548: {
album: "Slippery When Wet",
artist: "Bon Jovi",
tracks: [
"Let It Rock",
"You Give Love a Bad Name"
]
},
2468: {
album: "1999",
artist: "Prince",
tracks: [
"1999",
"Little Red Corvette"
]
},
1245: {
artist: "Robert Palmer",
tracks: [ ]
},
5439: {
album: "ABBA Gold"
}
};

var collectionCopy = JSON.parse(JSON.stringify(collection));

function update(id, prop, value) {
if (prop === "tracks" && value !== "") {
collection[id][prop].push(value);
} else if (value !== ""){
collection[id][prop] = value;
} else {
delete collection[id][prop];
}

return collection;
}

update(5440, "artist", "ABBA");

lawrencebass
@lawrencebass
Feb 26 2016 01:48
tidy is just a feature found in codepen that organizes your code (adds correct spacing and indentations). You haven't gotten to the challenges where you'll get to use codepen, but once you do, you'll come across it @mstettner
Tab_BLee
@ivanberry
Feb 26 2016 01:48
hello, where can i get some JSON to learn Ajax?
Matthew Stettner
@mstettner
Feb 26 2016 01:49
so eventually through codecamp i will be forced to use tidy in codepen
???
Tamisha Wallace
@hautemum36
Feb 26 2016 01:49
Once again my code isnt working i will retry and copy and paste
bonogit
@bonogit
Feb 26 2016 01:50
@mstettner its just about pattern and more practice. dont worry about that now. I am here just to do a quick review, so I already built some easy apps full stack. I have been through this too
lawrencebass
@lawrencebass
Feb 26 2016 01:50
No, its just an optional feature @mstettner , it doesn't change your code
Matthew Stettner
@mstettner
Feb 26 2016 01:50
cool cool guys I'll just keep on pushing and learning. long road ahead of me
what do I learn next on code camp after html?
lawrencebass
@lawrencebass
Feb 26 2016 01:51
@Rogers187 Can you post what you've gotten so far
Matthew Stettner
@mstettner
Feb 26 2016 01:51
is there a set route or do i choose my journey?
bonogit
@bonogit
Feb 26 2016 01:51
frontend, html css javascript
jquery
lawrencebass
@lawrencebass
Feb 26 2016 01:52
@mstettner If you look at the Map tab you'll see everything you can learn
Matthew Stettner
@mstettner
Feb 26 2016 01:52
is jquery part of janascript? im such a newb lol
lawrencebass
@lawrencebass
Feb 26 2016 01:52
JQuery is just a Javascript library @mstettner
bonogit
@bonogit
Feb 26 2016 01:52
some frontend framework if you focus on the front, such as react or angular
Tony
@Rogers187
Feb 26 2016 01:52

@lawrencebass function myTest(num) {
// Only change code below this line
if (num < 5){
return "tiny";
}
else if (num < 10){
return "small";
}
else if (num < 15){
return "medium";
}
else if (num < 20){
return "large";
}
else if (num >= 25){
return "huge";

}

// Only change code above this line

}
// Change this value to test
myTest(0);

lawrencebass
@lawrencebass
Feb 26 2016 01:53
Its like shortcut for doing certain things, instead of typing out long Javascript code @mstettner
@Rogers187 capitalize your return words to match what they're asking you to return
Matthew Stettner
@mstettner
Feb 26 2016 01:55
gotcha @lawrencebass what is the difference between front end and backend?
lawrencebass
@lawrencebass
Feb 26 2016 01:56
@Rogers187 and change the last else if to just else
Tamisha Wallace
@hautemum36
Feb 26 2016 01:56

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.gray-background {
background-color: gray;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<div>
<div class="gray-background">

<p>Click here for <a href="#">cat photos</a>.</p>



<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back" src="https://bit.ly/fcc-relaxing-cat"></a>

<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>

lawrencebass
@lawrencebass
Feb 26 2016 01:56
help format
CamperBot
@camperbot
Feb 26 2016 01:56

:point_right: code formatting [wiki]

Inline code

This an inline `<paste code here>` code formatting with a single backtick(`) at start and end around the code.

Code Block

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

Tamisha Wallace
@hautemum36
Feb 26 2016 01:57
I put my <div> element within <style> background color not gray
Matthew Stettner
@mstettner
Feb 26 2016 01:58
thanks
Manish Giri
@Manish-Giri
Feb 26 2016 01:58
@hautemum36 could you format your code please
Matthew Stettner
@mstettner
Feb 26 2016 01:58
i cant remember how to this or what it means
Color your h3 element with the text-primary Bootstrap class, and center it with the text-center Bootstrap class.
<h3>jQuery Playground</h3>
lcaptain47
@lcaptain47
Feb 26 2016 01:59
<style> body { background-color: rbg(0 ,0 ,0); } </style>
I don't know why this isn't turning the background black.
Am I using the right syntax?
David Wilbanks
@dwilbank68
Feb 26 2016 02:00
it's rgb not rbg
lawrencebass
@lawrencebass
Feb 26 2016 02:00
@mstettner Give h3 the classes text-primary and text-center
<h3 class="Add classes here">jQuery Playground</h3>
lcaptain47
@lcaptain47
Feb 26 2016 02:00
Oooohh. Sorry. I did not realize that. Thanks for the help @dwilbank68
CamperBot
@camperbot
Feb 26 2016 02:00
lcaptain47 sends brownie points to @dwilbank68 :sparkles: :thumbsup: :sparkles:
:star: 28 | @dwilbank68 | http://www.freecodecamp.com/dwilbank68
David Wilbanks
@dwilbank68
Feb 26 2016 02:01
yay
Emma Cooper
@199coopere
Feb 26 2016 02:01
when you have an error does it do nothing
Matthew Stettner
@mstettner
Feb 26 2016 02:01
<h3 class="text-primary text center">jQuery Playground</h3>
lawrencebass
@lawrencebass
Feb 26 2016 02:01
text-center
Matthew Stettner
@mstettner
Feb 26 2016 02:01
do i need to wrote anything in css?
added the dash thanks
lawrencebass
@lawrencebass
Feb 26 2016 02:02
Bootstrap should have already defined css for those classes @mstettner
Matthew Stettner
@mstettner
Feb 26 2016 02:02
okay
not sure why its not s=centering
David Wilbanks
@dwilbank68
Feb 26 2016 02:02
This message was deleted
Matthew Stettner
@mstettner
Feb 26 2016 02:02
<h3 class="text-primary text- center">jQuery Playground</h3>
oh extra space
lawrencebass
@lawrencebass
Feb 26 2016 02:04
@hautemum36 Did somebody help you out already?
Ryan
@LionOver
Feb 26 2016 02:10
@hautemum36 Were you responding to me, or are you having the exact same problem?
Matthew Stettner
@mstettner
Feb 26 2016 02:11
hmmmm does this look correct?
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6"></div>

  </div>
</div>
Nest two div class="col-xs-6" elements within your div class="row" element.
David Wilbanks
@dwilbank68
Feb 26 2016 02:11
except you only nested one col-xs-6 so far...
lawrencebass
@lawrencebass
Feb 26 2016 02:11
@hautemum36 Remove the div and <div class="gray-background"> you have right below <h2 class="red-text">CatPhotoApp</h2>. Then all you have to do is give class="gray-background" to the <div> right above <p>Things cats love:</p>
Matthew Stettner
@mstettner
Feb 26 2016 02:12
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6 col-xs-6"></div>

  </div>
</div>
David Wilbanks
@dwilbank68
Feb 26 2016 02:12
you still only have one div so far...
except now it has a duplicate class
Ryan
@LionOver
Feb 26 2016 02:13
blob
David Wilbanks
@dwilbank68
Feb 26 2016 02:13
you just need to duplicate the one div you have
Matthew Stettner
@mstettner
Feb 26 2016 02:13
figured it out thanks guys
seem weird to put two of the same exact thing.
David Wilbanks
@dwilbank68
Feb 26 2016 02:14
you've seen double columns on a website, yeh? That's what they're preparing to do. Two side-by-side columns
Ryan
@LionOver
Feb 26 2016 02:15
Nm, I figured it out. Seems odd that I could get the exact same result without doing it exactly as the task required.
Rachel
@totallyrhombus
Feb 26 2016 02:17
They'll show you later the other ways to do colours, until then you just use the names of colours
Ryan
@LionOver
Feb 26 2016 02:17
blob
Sorry...didn't mean to post that screenshot twice.
Mudit Bhutani
@muditbhutani
Feb 26 2016 02:26

there is no explanation given of this code in the challenge. can someone explain

json.forEach(function(val) {
var keys = Object.keys(val);
html += "<div class = 'cat'>";
keys.forEach(function(key) {
html += "<b>" + key + "</b>: " + val[key] + "<br>";
});
html += "</div><br>";
});

Patrick Black
@Mortiferr
Feb 26 2016 02:46
Can you post screenshot of page?
sarvagya3943
@sarvagya3943
Feb 26 2016 02:47
how to make background like this ? -> http://www.nrly.co/
Patrick Black
@Mortiferr
Feb 26 2016 02:49
let me look
looks like he used animate.css
    particlesJS('particles-js', {
    particles: {
        color: '#abab81',
        shape: 'circle',
        opacity: 1,
        size: 2.5,
        size_random: true,
        nb: 100,
        line_linked: {
            enable_auto: true,
            distance: 340,
            color: '#4f5b60',
            opacity: 0.5,
            width: 1,
            condensed_mode: {
                enable: false,
                rotateX: 600,
                rotateY: 600
            }
        },
        anim: {
            enable: true,
            speed: 1.5
        }
    },
    interactivity: {
        enable: true,
        mouse: {
            distance: 100
        },
        detect_on: 'canvas',
        mode: 'grab'
    },
    retina_detect: true
});
This certainly has something to do with it
@sarvagya3943 So add animate.css, jQuery, and this js to your page and see what happens
Mudit Bhutani
@muditbhutani
Feb 26 2016 02:52
blob
blob
@Mortiferr
Minly Chen
@minlychen
Feb 26 2016 02:53
Hi, I'm doing the "Size your Images"... can someone look over this code? for some reason it is not making any changes
<style>
.smaller-image {
width: 100px;
}

.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}
</style>
Mudit Bhutani
@muditbhutani
Feb 26 2016 02:53
which part not working
Minly Chen
@minlychen
Feb 26 2016 02:54
the image
it is the same size as before
it won't "shrink" i guess
Patrick Black
@Mortiferr
Feb 26 2016 02:54
@muditbhutani Do they explain it in the next challenge?
Minly Chen
@minlychen
Feb 26 2016 02:54
but I think I typed it as the challenge says
Mudit Bhutani
@muditbhutani
Feb 26 2016 02:54
@Mortiferr no .. can u give a link where i can study
Minly Chen
@minlychen
Feb 26 2016 02:55

the example is this:

<style>
.larger-image {
width: 500px;
}
</style>

Mudit Bhutani
@muditbhutani
Feb 26 2016 02:55
@minlychen check the class of ur image. there must be error in class name imo
Minly Chen
@minlychen
Feb 26 2016 02:55
but you have to make the image smaller instead which is why I typed in this: .smaller-image {
width: 100px;
}
Patrick Black
@Mortiferr
Feb 26 2016 02:55
@muditbhutani Check out stackoverflow and ask your question ther
Minly Chen
@minlychen
Feb 26 2016 02:55
what do you mean?
Mudit Bhutani
@muditbhutani
Feb 26 2016 02:55
ok thanks
Patrick Black
@Mortiferr
Feb 26 2016 02:57
@minlychen Make sure that your class is spelled exactly the way it is in your CSS
Minly Chen
@minlychen
Feb 26 2016 02:58
i copied and pasted the class into the code but still nothing...
Manish Giri
@Manish-Giri
Feb 26 2016 03:00
@minlychen can you show the whole code
Minly Chen
@minlychen
Feb 26 2016 03:01

Here:

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

.smaller-image {
width: 100px;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

do I have to call out "img src"?
oh wait idk what i'm saying
Manish Giri
@Manish-Giri
Feb 26 2016 03:03
@minlychen you need to apply the class smaller-image to your img
Minly Chen
@minlychen
Feb 26 2016 03:04
like... this?
img.smaller-image
how would I do that @Manish-Giri
Manish Giri
@Manish-Giri
Feb 26 2016 03:07
@minlychen <img class=“smaller-image” src = “…”>
Minly Chen
@minlychen
Feb 26 2016 03:09
ooh thx! @Manish-Giri
CamperBot
@camperbot
Feb 26 2016 03:09
minlychen sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 671 | @manish-giri | http://www.freecodecamp.com/manish-giri
Minly Chen
@minlychen
Feb 26 2016 03:09
btw, what is the "src" for? @Manish-Giri
Manish Giri
@Manish-Giri
Feb 26 2016 03:10
@minlychen it’s the “source” for the image, where the browser will go to in order to fetch the image you want
Alex P.
@Opimenov
Feb 26 2016 03:16
hi, how to post a CodePen in the chat room?
nevermind I just copied the url))))
Jesh
@jeshG
Feb 26 2016 03:23

}
.smaller-image { width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img class "smaller-image" src="https://bit.ly/fcc-relaxing-cat">

what i am missing manish?
thanx
i got it !
:D
Brian
@sludge256
Feb 26 2016 03:30
@jeshG you're missing the =
class="smaller-image"
Ali
@livethehapylife
Feb 26 2016 03:32
I have homework and it's CSS i was wondering if someone could help me, I don't really understand CSS
Patrick Black
@Mortiferr
Feb 26 2016 03:33
Sure, what's up @livethehapylife
Ali
@livethehapylife
Feb 26 2016 03:34
@Mortiferr i have a zip file that i have to change and edit the CSS but i dont understand how
Jesh
@jeshG
Feb 26 2016 03:35
thnx
Patrick Black
@Mortiferr
Feb 26 2016 03:36
You don't understand how to open the zip or the CSS itself @livethehapylife ?
Ali
@livethehapylife
Feb 26 2016 03:37
@Mortiferr CSS
Randy
@techtolentino
Feb 26 2016 03:41
Hello world
CamperBot
@camperbot
Feb 26 2016 03:41

welcome to FreeCodeCamp @techtolentino!

Randy
@techtolentino
Feb 26 2016 03:45
You have to unzip the zip file
If you're on a Mac, usually double clicking works
Patrick Black
@Mortiferr
Feb 26 2016 03:45
@techtolentino Thanks and welcome
CamperBot
@camperbot
Feb 26 2016 03:45
mortiferr sends brownie points to @techtolentino :sparkles: :thumbsup: :sparkles:
:star: 39 | @techtolentino | http://www.freecodecamp.com/techtolentino
Tony
@Rogers187
Feb 26 2016 03:50
Having trouble any help? Adding a default option in Switch statements
Having trouble any help? Adding a default option in Switch statements
Archana Polu
@archup07
Feb 26 2016 03:52
whats the error?
Minly Chen
@minlychen
Feb 26 2016 03:54
to make a dead link, where do you put the #?
Archana Polu
@archup07
Feb 26 2016 03:54
for the href attribute @minlychen
Patrick Black
@Mortiferr
Feb 26 2016 03:54
<a href="#">Link text</a> @minlychen
Minly Chen
@minlychen
Feb 26 2016 03:55
ooh okay thx @Mortiferr @archup07
CamperBot
@camperbot
Feb 26 2016 03:55
minlychen sends brownie points to @mortiferr and @archup07 :sparkles: :thumbsup: :sparkles:
:star: 50 | @mortiferr | http://www.freecodecamp.com/mortiferr
:star: 7 | @archup07 | http://www.freecodecamp.com/archup07
Susaye Rattigan
@susaye1105
Feb 26 2016 04:01
Hi Guys. I'm stuck adding a form field. Here's what I got so far
<form input type="text" action="/submit-cat-photo" placeholder="cat photo URL"></form>
Kevin Brennan Guzi
@kevinbg012
Feb 26 2016 04:02
You should not have a placeholder inside a form tag
Archana Polu
@archup07
Feb 26 2016 04:02
you have to close your form tag
Kevin Brennan Guzi
@kevinbg012
Feb 26 2016 04:02
not even the input
Archana Polu
@archup07
Feb 26 2016 04:02
<form> <input type="text" action="/submit-cat-photo" placeholder="cat photo URL"></form>
Kevin Brennan Guzi
@kevinbg012
Feb 26 2016 04:03
@susaye1105 should be like <form></form>
<form> <input type="text" action="/submit-cat-photo" placeholder="cat photo URL"></form>
Archana Polu
@archup07
Feb 26 2016 04:03
try this @susaye1105 <form> <input type="text" action="/submit-cat-photo" placeholder="cat photo URL"></form>
Tony
@Rogers187
Feb 26 2016 04:03

What am I doing wrong?? function myTest(val) {
var answer = "";
// Only change code below this line
switch (val){
case "a":
answer="apple";
break;
case "b":
answer= "bird";
break;
case "c":
answer= "cat";
break;
case "d":
answer= "stuff";
break;
case 4:
answer= "stuff";
break;
default:
answer= "stuff";
}

// Only change code above this line
return answer;
}

// Change this value to test
myTest(a);

Humphrey
@Humphreto
Feb 26 2016 04:04
hey i wanna take notes in FCC while am learning can you guys the best note taking app for this particular job apart from evernote
Jesh
@jeshG
Feb 26 2016 04:04
<p>here's a <a href="http://freecatphotoapp.com"> cat photos </a> for you to follow </p>
Your a element should have the anchor text of "cat photos"
Susaye Rattigan
@susaye1105
Feb 26 2016 04:04
Thanks guys. @kevao012 , It doesn't work
CamperBot
@camperbot
Feb 26 2016 04:04
susaye1105 sends brownie points to @kevao012 :sparkles: :thumbsup: :sparkles:
Jesh
@jeshG
Feb 26 2016 04:04
am i missing something ? help plz
CamperBot
@camperbot
Feb 26 2016 04:04
:star: 212 | @kevao012 | http://www.freecodecamp.com/kevao012
Humphrey
@Humphreto
Feb 26 2016 04:06
@jeshG try to change this potion <p>here's a<a href="...... to this <p>here's a <a href... try this it
Kevin Brennan Guzi
@kevinbg012
Feb 26 2016 04:07
@susaye1105 the snippet didn't work?
Archana Polu
@archup07
Feb 26 2016 04:07
@susaye1105 @kevao012 it should work
i also didnt understand why @kevao012
Jesh
@jeshG
Feb 26 2016 04:08
ty , it doesnt work
Randy
@techtolentino
Feb 26 2016 04:08
@jeshG what challenge is it?
Jesh
@jeshG
Feb 26 2016 04:09
26
Link to External Pages with Anchor Elements
Kevin Brennan Guzi
@kevinbg012
Feb 26 2016 04:09
@susaye1105 @archup07 maybe is missing something to complete the challenge
Randy
@techtolentino
Feb 26 2016 04:09
yeah, which test is failing?
Jesh
@jeshG
Feb 26 2016 04:10
Your a element should have the anchor text of "cat photos"
1st test
thank you guys
i fixed it
Randy
@techtolentino
Feb 26 2016 04:11
perfect
Humphrey
@Humphreto
Feb 26 2016 04:11
try this one ```<p>here's a <a href="http://freecatphotoapp.com alt="the cat"> cat photos </a> for you to follow </p> @jeshG
Jesh
@jeshG
Feb 26 2016 04:11
thanks
Humphrey
@Humphreto
Feb 26 2016 04:11
@jeshG the appreciation goes to whom?
Jesh
@jeshG
Feb 26 2016 04:13
thanks you @Humphreto
CamperBot
@camperbot
Feb 26 2016 04:13
jeshg sends brownie points to @humphreto :sparkles: :thumbsup: :sparkles:
Patrick Black
@Mortiferr
Feb 26 2016 04:13
thanks @jeshG
CamperBot
@camperbot
Feb 26 2016 04:13
mortiferr sends brownie points to @jeshg :sparkles: :thumbsup: :sparkles:
:star: 60 | @humphreto | http://www.freecodecamp.com/humphreto
:star: 28 | @jeshg | http://www.freecodecamp.com/jeshg
Patrick Black
@Mortiferr
Feb 26 2016 04:13
There you go bud
Jesh
@jeshG
Feb 26 2016 04:13
newbie ...
Humphrey
@Humphreto
Feb 26 2016 04:13
:smile:
Jesh
@jeshG
Feb 26 2016 04:13
lol
Patrick Black
@Mortiferr
Feb 26 2016 04:14
@jeshG Who you callin' a noobie?
Jesh
@jeshG
Feb 26 2016 04:15
myself
i dont know lot of option yet!
Patrick Black
@Mortiferr
Feb 26 2016 04:15
oh okay lol
Ryan
@doglieb
Feb 26 2016 04:15
For the tribute page, is it OK to rely on Bootstrap for much of the design, or am I missing out on learning the nitty-gritty that way?
Patrick Black
@Mortiferr
Feb 26 2016 04:15
Use bs
Humphrey
@Humphreto
Feb 26 2016 04:15
@Mortiferr you seemed to be pissed off with the word newbie?
Patrick Black
@Mortiferr
Feb 26 2016 04:15
That's what its there for :D
@Humphreto No, I was making an attempt at a joke. It didn't work
@doglieb As long as you think you know the principles you learned feel free to use bootstrap
Ryan
@doglieb
Feb 26 2016 04:18
@Mortiferr I feel like I understand how the nesting and tagging works--I just can't remember the proper keywords
Patrick Black
@Mortiferr
Feb 26 2016 04:19
All with time my friend. As long as you understand how to use the bootstrap elements and you're not just pasting em in there then you should be perfectly alright. @doglieb Good luck sir!
Ryan
@doglieb
Feb 26 2016 04:19
@Mortiferr Thank you for your help!
CamperBot
@camperbot
Feb 26 2016 04:19
doglieb sends brownie points to @mortiferr :sparkles: :thumbsup: :sparkles:
:star: 52 | @mortiferr | http://www.freecodecamp.com/mortiferr
Humphrey
@Humphreto
Feb 26 2016 04:20
@doglieb nesting can be confusing but it doesnt mean it will remain unsolved. try more you will master it . i had the same very issue in the very beginin
Patrick Black
@Mortiferr
Feb 26 2016 04:20

Nesting sometimes still gets me, haha, sometimes I have to go:

Wait...what? oh oh right I'm supposed to know what I'm doing

Elliescode
@EllieAdam
Feb 26 2016 04:20
Hello!
Humphrey
@Humphreto
Feb 26 2016 04:20
@Mortiferr :smile_cat:
@EllieAdam Hi!
Elliescode
@EllieAdam
Feb 26 2016 04:21

Q?In the game of golf each hole has a par for the average number of strokes needed to sink the ball. Depending on how far above or below par your strokes are, there is a different nickname.

Your function will be passed par and strokes arguments. Return the correct string according to this table which lists the strokes in order of priority; top (highest) to bottom (lowest):

function golfScore(par, strokes) {
  // Only change code below this line
  if (1){
    return "Hole-in-one!";
 }
  else if (par-2){
    return "Eagle";

 }
   else if (par-1){
   return "Birdie"; 
 }
  else if (par){
   return "Par";
 }
   else if (par + 1){
   return "Bogey";
 }
   else if (par + 2){
   return "Double Bogey";
 }
   else if (par + 3){
   return "Go Home!";
 }

  return "Change Me";
  // Only change code above this line
}
I only pass first condition. Rest is error. Help pl.
Kolloom
@Kolloom
Feb 26 2016 04:23
@EllieAdam You need to compare strokes to par
Alexander Køpke
@alexanderkopke
Feb 26 2016 04:23
Also use the strokes variable when appropiate
Elliescode
@EllieAdam
Feb 26 2016 04:23
How?
Humphrey
@Humphreto
Feb 26 2016 04:23
@EllieAdam hey i have a little question how could i make the code that i type here appear like that in a black background and will all charms with it?
Elliescode
@EllieAdam
Feb 26 2016 04:24
@Humphreto Press left side second row key tilda 3 times ```
Humphrey
@Humphreto
Feb 26 2016 04:25
@EllieAdam i do that every time but it doesnt appera in a black background
Kolloom
@Kolloom
Feb 26 2016 04:25
@EllieAdam use comparative operators var1 {== | > | < | >= | <=} var2 to compare the value of tow variables
Humphrey
@Humphreto
Feb 26 2016 04:25
Hello world see it doesnt work like yours @EllieAdam
CamperBot
@camperbot
Feb 26 2016 04:25

welcome to FreeCodeCamp @Humphreto!

Elliescode
@EllieAdam
Feb 26 2016 04:25
let me try that.
Kolloom
@Kolloom
Feb 26 2016 04:26
also doesn't if (1) always evaluates to true ?
Humphrey
@Humphreto
Feb 26 2016 04:26
<p id="hi">hello world</p>
Elliescode
@EllieAdam
Feb 26 2016 04:27
This message was deleted
@Kolloom Doesn't work :(
Kolloom
@Kolloom
Feb 26 2016 04:30
@EllieAdam Doesn't work doesn't tell me anything about the problem you have, be specific
Elliescode
@EllieAdam
Feb 26 2016 04:32
@Kolloom Can you explain me how to solve(<= par - 2 "Eagle")??
??
Humphrey
@Humphreto
Feb 26 2016 04:33
Goodby World! i got to go. i got exams in 30 min. wish me goodluck campers.
Kolloom
@Kolloom
Feb 26 2016 04:34
@EllieAdam You need to do a comparision with TWO variables
one to the left of the operator, one to the right
also "Eagle" is not part of the condition, it is the string you print when the condition is true
Elliescode
@EllieAdam
Feb 26 2016 04:37
I know "Eagle" is return statement. What should I put on left side of <= par - 2
??
I tried this
 else if (5 <= par - 2){
    return "Eagle";
}
Davinw
@Davinw
Feb 26 2016 04:42
@EllieAdam The exercise wants you to compare the strokes parameter to the par parameter. You aren't doing that with that statement, you are comparing a static number on the leftside, instead of the strokes
Kolloom
@Kolloom
Feb 26 2016 04:42
close enough. As I said before "@EllieAdam You need to compare strokes to par"
Elliescode
@EllieAdam
Feb 26 2016 04:45
I don't play golf, I can't distinguish between in stroke and par on table.
Ali
@livethehapylife
Feb 26 2016 04:46
@mortiferr thanks
CamperBot
@camperbot
Feb 26 2016 04:46
livethehapylife sends brownie points to @mortiferr :sparkles: :thumbsup: :sparkles:
:star: 53 | @mortiferr | http://www.freecodecamp.com/mortiferr
sidewinder56mm
@sidewinder56mm
Feb 26 2016 04:46
Where would I go to nest all HTML elements in .container-fluid?
I am currently in "Use Responsive Design with Bootstrap Fluid Containers"
Davinw
@Davinw
Feb 26 2016 04:48
@EllieAdam But do you understand that there are two variables you are supposed to be working with in that exercise? Stroke and par?
Patrick Black
@Mortiferr
Feb 26 2016 04:48
@sidewinder56mm Send a screenshot?
George
@GeorgeGidim
Feb 26 2016 04:50
OK so I'm Style Text Inputs as Form Controls and it says that a few are wrong... like
Add a <i class="fa fa-paper-plane"></i> within your submit button element.
Patrick Black
@Mortiferr
Feb 26 2016 04:51
screenshot of your full code?
@GeorgeGidim
sidewinder56mm
@sidewinder56mm
Feb 26 2016 04:52

@Mortiferr <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>

<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>

<p>Top 3 things cats hate:</p>

<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>

George
@GeorgeGidim
Feb 26 2016 04:54
OK, so I did the code and it worked but it won't check it off. Here is a screenshot: http://i.imgur.com/3VHtk1G.png
Patrick Black
@Mortiferr
Feb 26 2016 04:55
@GeorgeGidim First issue your submit button doesn't have the proper classes
make sure it has the btn and the other class like they asked for
George
@GeorgeGidim
Feb 26 2016 04:55
ai, ok
Patrick Black
@Mortiferr
Feb 26 2016 04:55
And in the input tag you need to add the proper class as well
Maybe that will fix it
@sidewinder56mm I'm getting to you ne sec

@sidewinder56mm You didn't put all your html inside the div tag like it asked

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>
<div class="container-fluid">
<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<form action="/submit-cat-photo">
  <label><input type="radio" name="indoor-outdoor"> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality"> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Crazy</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
</div>

Notice my extra div tag with the appropriate class.

If you have any other questions let me know
but i gtg
Patrick Black
@Mortiferr
Feb 26 2016 05:01
I hope I helped (fyi I passed that lesson just now with the above code so if you can't figure it out just copy and paste the code above)
sidewinder56mm
@sidewinder56mm
Feb 26 2016 05:02
Thank you for your help. I was "stumped" with that one, wasn't sure where to go with that. Thanx, again
Bye the way, what program are you using for screenshots? I only have "paint"
Manuel Pinto
@P1N2O
Feb 26 2016 05:17

Can someone please help me?
I'm in this (http://www.freecodecamp.com/challenges/record-collection) challenge, and this is my code:

```

// Setup
var collection = {
    2548: {
      album: "Slippery When Wet",
      artist: "Bon Jovi",
      tracks: [ 
        "Let It Rock", 
        "You Give Love a Bad Name" 
      ]
    },
    2468: {
      album: "1999",
      artist: "Prince",
      tracks: [ 
        "1999", 
        "Little Red Corvette" 
      ]
    },
    1245: {
      artist: "Robert Palmer",
      tracks: [ ]
    },
    5439: {
      album: "ABBA Gold"
    }
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));

// Only change code below this line
function update(id, prop, value) {

  if (value !== "") {
    if (prop !== "tracks") {
    collection[id][prop].push(value);
    }
    else {
      collection[id][prop] = value;
    }
  }
  else {
    delete collection[id][prop];
  }


  return collection;
}

// Alter values below to test your code
update(5439, "artist", "ABBA");
I get "Type Error: Cannot read property push of undefined"
Kally Chung
@chunggnuhc
Feb 26 2016 05:19
Hi guys!!!
Manuel Pinto
@P1N2O
Feb 26 2016 05:19
Hello
Kally Chung
@chunggnuhc
Feb 26 2016 05:19
I have a question about boostrap grid.
Manuel Pinto
@P1N2O
Feb 26 2016 05:20
What is it?
Kally Chung
@chunggnuhc
Feb 26 2016 05:21
If a want to put the three buttons of "Like", "Info" and "Delete" in the same row, i only can do it putting each button in a isolated div tag?
Manuel Pinto
@P1N2O
Feb 26 2016 05:23
Nop
You can split them
give it them the class 'col'
Kally Chung
@chunggnuhc
Feb 26 2016 05:24
ok
cerealCode
@cerealCode
Feb 26 2016 05:24
Hi I need a hand with my code :)

´´´js

<script>
$(document).ready(function() {
$("#getMessage").on("click", function(){

});
}
</script>
´´´

Manuel Pinto
@P1N2O
Feb 26 2016 05:24

@chunggnuhc

Example:

<div class="row">
<div class="col-xs-6">
</div>
<div class="col-xs-6">
</div>

sidewinder56mm
@sidewinder56mm
Feb 26 2016 05:25
What program can I use to make copying screenshots to the chat room easier? I just used copy and paste, I don't think it worked too well...
Manuel Pinto
@P1N2O
Feb 26 2016 05:25
@Cereal-Coder What's your problem there??
cerealCode
@cerealCode
Feb 26 2016 05:26
It says SyntaxError: missing ) after argument list
Minly Chen
@minlychen
Feb 26 2016 05:26
Screen shot 2016-02-25 at 10.25.51 PM.png
Kally Chung
@chunggnuhc
Feb 26 2016 05:26
@sidewinder56mm I think you have to use Markdown
cerealCode
@cerealCode
Feb 26 2016 05:26
The thing is, after 10 min looking to that line of code, I end up copy pasting the code from the exercise title
Minly Chen
@minlychen
Feb 26 2016 05:26
For this Screenshot, what is the
cerealCode
@cerealCode
Feb 26 2016 05:26
And still does not work
Minly Chen
@minlychen
Feb 26 2016 05:26
"name" part for?
Kally Chung
@chunggnuhc
Feb 26 2016 05:27
It's on the bottom of the right side.
sidewinder56mm
@sidewinder56mm
Feb 26 2016 05:27
@chunggnuhc Thank you, I'll try that next time.
CamperBot
@camperbot
Feb 26 2016 05:27
sidewinder56mm sends brownie points to @chunggnuhc :sparkles: :thumbsup: :sparkles:
:star: 80 | @chunggnuhc | http://www.freecodecamp.com/chunggnuhc
Kally Chung
@chunggnuhc
Feb 26 2016 05:27
Welcome
Minly Chen
@minlychen
Feb 26 2016 05:29
For this screenshot, what is the "name" part for?
Screen shot 2016-02-25 at 10.25.51 PM.png
Alexander Køpke
@alexanderkopke
Feb 26 2016 05:30
@Cereal-Coder you have js before the script tags?
Manuel Pinto
@P1N2O
Feb 26 2016 05:31
@Cereal-Coder You have missed out ");" at the end
@Cereal-Coder Here you go:
```
$(document).ready(function() {
$("#getMessage").on("click", function(){
});
});
Minly Chen
@minlychen
Feb 26 2016 05:36
does anyone know what the name part is for?
Screen shot 2016-02-25 at 10.25.51 PM.png
Michael Thomas Richards
@madebymtr
Feb 26 2016 05:42
@minlychen name is normally used when passing info to the server
its how form data can be identified
Ram Kumar Gajurel
@caseydev
Feb 26 2016 05:44
Please help me to fix this step http://prntscr.com/a821yt
Minly Chen
@minlychen
Feb 26 2016 05:44
mmm.... okay... I think I get it... Thanks! @travisboss @madebymtr
CamperBot
@camperbot
Feb 26 2016 05:44
minlychen sends brownie points to @travisboss and @madebymtr :sparkles: :thumbsup: :sparkles:
:star: 269 | @travisboss | http://www.freecodecamp.com/travisboss
:star: 9 | @madebymtr | http://www.freecodecamp.com/madebymtr
Travis Boss
@travisboss
Feb 26 2016 05:46
@minlychen its information that is important to a server to identify but does not do anything in your html or css.
Michael Thomas Richards
@madebymtr
Feb 26 2016 05:47
@caseydev look how many classes you're trying to add on each element compared to the instruction
Minly Chen
@minlychen
Feb 26 2016 05:48
ooh okay
Shayan Javadi
@ShayanJavadi
Feb 26 2016 05:49
http://codepen.io/dunkelheit/pen/NNKeRB?editors=1000 Can someone tell me why my my <h6> is not turning gray, even though I'm targeting it using JQuery?
Aamir Saeed
@aamirpasha
Feb 26 2016 05:49
hello coders....i stuckup <i> target4</i> plz help
$("#target4").htm("<i>target4</i>");
Travis Boss
@travisboss
Feb 26 2016 05:51
@dunkleheit isn't the syntax? document.getElementById(id).style.property=new style
Alexander Køpke
@alexanderkopke
Feb 26 2016 05:51
@dunkleheit did you add the JQuery library?
Shayan Javadi
@ShayanJavadi
Feb 26 2016 05:53
@travisboss might be not sure. What I'm using is what I've learned from the jQuery tutorial
@alexanderkopke i just did , still nothing
Michael Thomas Richards
@madebymtr
Feb 26 2016 05:54
@dunkleheit its how you're using codepen
they have a window on the right for js
Ram Kumar Gajurel
@caseydev
Feb 26 2016 05:54
@madebymtr can you tell me? what should i do now?
Michael Thomas Richards
@madebymtr
Feb 26 2016 05:55
Shayan Javadi
@ShayanJavadi
Feb 26 2016 05:56
@madebymtr Ahhh... I see , thank you very much
CamperBot
@camperbot
Feb 26 2016 05:56
dunkleheit sends brownie points to @madebymtr :sparkles: :thumbsup: :sparkles:
:star: 10 | @madebymtr | http://www.freecodecamp.com/madebymtr
Travis Boss
@travisboss
Feb 26 2016 05:57
good to know about codepen that you cannot add java under a script in the html side.
Michael Thomas Richards
@madebymtr
Feb 26 2016 05:58
it's separated to keep each part of your code clean and easier to review
Mudit Bhutani
@muditbhutani
Feb 26 2016 06:19
why the quote isnt generated on clicking http://codepen.io/muditbhutani/pen/QyZQwL#
DJ
@qualitymanifest
Feb 26 2016 06:24
@muditbhutani document.getElementById(".para").value this is wrong for two reasons.you're using getElementById but para is a class in your html, not an id. so you would have to make it an ID in your HTML. secondly, you'd want to set the innerHTML, not the value
Monty
@webdev8183
Feb 26 2016 06:26
wow this largest number in the array problem really has me stuck, it looks like all 4 numbers in each set are only making up one element of the array, is there a max function that will return largest number for the array index? thats really what I need, I been looping around this exercise beating my head against my desk fora couple of days.. I need a hand to get over the hump.
DJ
@qualitymanifest
Feb 26 2016 06:27
@muditbhutani i would recommend keeping your JS in your JS, and not putting any in your HTML like you have here <button onClick="quotes()">. and jquery makes this pretty easy, by using click functions to target the place where you want to change the quote text
@webdev8183 paste your code
Mudit Bhutani
@muditbhutani
Feb 26 2016 06:28
@qualitymanifest thanks a lot .. i was stuck on it for so long
CamperBot
@camperbot
Feb 26 2016 06:28
muditbhutani sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
Monty
@webdev8183
Feb 26 2016 06:28
ok its not pretty I am using dreamweaver to test on my local machine as the waypoints don't let me test what is being output.
CamperBot
@camperbot
Feb 26 2016 06:28
:star: 1003 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Feb 26 2016 06:28
@webdev8183 just paste it here as formatted text
help format
CamperBot
@camperbot
Feb 26 2016 06:28

:point_right: code formatting [wiki]

Inline code

This an inline `<paste code here>` code formatting with a single backtick(`) at start and end around the code.

Code Block

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

Mudit Bhutani
@muditbhutani
Feb 26 2016 06:28
and yeah i used onclick because i copied from here http://jsfiddle.net/fuFaa/1/ :p
did inner html and made it an id .. still wont work :(
@qualitymanifest
DJ
@qualitymanifest
Feb 26 2016 06:31
copying === not good, especially if you don't understand the code, and especially if it's outdated code
Mudit Bhutani
@muditbhutani
Feb 26 2016 06:32
sir i tried for more than a week and could think of no way to do this.. so someone said google how to genrate quotes from an array
i have been stuck on this project for too long
can u check it now .. i have changed still doesnt work
DJ
@qualitymanifest
Feb 26 2016 06:33
@muditbhutani document.getElementById(".para") why the . before para? .'s are for classes. #'s are for id's. but, you're already telling it to getElementById so just use ("para")
Mudit Bhutani
@muditbhutani
Feb 26 2016 06:33
i have used #para
ok para .. even #para is wrong ?
it worked .. thanks a lot @qualitymanifest
CamperBot
@camperbot
Feb 26 2016 06:34
muditbhutani sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:warning: muditbhutani already gave qualitymanifest points
DJ
@qualitymanifest
Feb 26 2016 06:34
cool :+1:
Mudit Bhutani
@muditbhutani
Feb 26 2016 06:35
:)
Monty
@webdev8183
Feb 26 2016 06:36
function largestOfFour(arr) {
// You can do this!
for (var i=0;i<4;i++){ document.write(arr[i]); //this shows me that each set of 4 numbers is its own array index [0,1,2,3] etc. //if i do arr.sort, the numbers are sorted highest to lowest in the array.. //if I were to reverse this it would give me the highest number in each set in the [0] index for each array but the real //problem is the numbers are not split so comparing arr[i]>arr[i+1] won't work for this..
}
splitting the arrays into string values would allow me to do strcomp, which could work, but there should be another way to accomplish it, I cannot figure it out.
V Bhargav Chowdary
@bhargav4
Feb 26 2016 06:39

Falsy Bouncer

function bouncer(arr) {
  // Don't show a false ID to this bouncer.
var newA = arr.filter(function(x){
    return (x!==false && x!=='' && x!==null && x!==0 && x!==undefined);
  });
  return newA;
}

bouncer([false, null, 0, NaN, undefined, ""]);

Console output is [null]. Why is that?

Also How do i remove Nan?
DJ
@qualitymanifest
Feb 26 2016 06:42
@bhargav4 you're not dealing with NaN. it would be a lot easier if you just returned x if it was true
@webdev8183 so, for these kinds of things, if you just want to see outputs, i would recommend using something like repl.it instead of doing it locally and using document.write. that way you can just paste your code back in to FCC when you're done. here, i've changed your code to work on repl.it: https://repl.it/Bq2X
suffering
@suffering
Feb 26 2016 06:46

@bhargav4 ,
function bouncer(arr) {
// Don't show a false ID to this bouncer.
var newA = arr.filter(function(x){
return x;
});
return newA;
}

bouncer([false, null, 0, NaN, undefined, ""]);

false, null, NaN, undefined, "" all means false.
V Bhargav Chowdary
@bhargav4
Feb 26 2016 06:48
@suffering Thanks man that helped
CamperBot
@camperbot
Feb 26 2016 06:48
bhargav4 sends brownie points to @suffering :sparkles: :thumbsup: :sparkles:
:star: 6 | @suffering | http://www.freecodecamp.com/suffering
Monty
@webdev8183
Feb 26 2016 06:48
thanks I really needed something I could test with online, going back and forth is a bit of a pain. interviewed with launchcode, but since I haven't done a great deal of whiteboard code interviewing its an area I am really weak in so they said to try again in a few weeks. So I been trying as many challenges as I can, its funny I programmed for a company for 6 years and now I am having trouble finding a job.
suffering
@suffering
Feb 26 2016 06:50
@bhargav4 , i’ve wirtten a project for some js quirks, https://github.com/suffering/jsquirks
demo: http://jsquirks.zhuboliu.me/
this may help.
Marsel
@marselcode
Feb 26 2016 06:52

please help me with: Record Collection. what i need use?

// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));

// Only change code below this line
function update(id, prop, value) {

if (value !== "" && prop !== "tracks" ) {
??
}

else if ( value !== "" && prop == "tracks") {
???

}

else if (value == "") {
delete collection.prop;

}

return collection;
}

// Alter values below to test your code
update(5439, "artist", "ABBA");

Markus Kiili
@Masd925
Feb 26 2016 06:55
@marselcode The dot notation only works if the property key string is a valid JS identifier (for example "12" and "lives left" are not) and you write the key after the dot: var cat={clothes:"pants", "lives left":3}; cat.clothes; //returns "pants". Bracket notation works with keys that can be arbitrary strings cat["lives left"]; //returns 3, variables var key="clothes"; cat[key]; //returns "pants", or expressions cat["lives"+" "+"left"]; //returns 3.
So .prop doesn't work as intended. It looks for property "prop".
suffering
@suffering
Feb 26 2016 06:58
@Masd925 , write a method to access the key, test the key first, use the method hasOwnProperty, if true, go ahead, else return undefined.
Marsel
@marselcode
Feb 26 2016 06:59
@Masd925 my instructions is right?
Markus Kiili
@Masd925
Feb 26 2016 07:03
@marselcode The structure seems to be ok, yes.
@marselcode You should always use strict equality === and !==.
Marsel
@marselcode
Feb 26 2016 07:09
@Masd925 ok. what i need use for update or set the value for the prop? I've tried everything.i can't understand.
Markus Kiili
@Masd925
Feb 26 2016 07:10
@marselcode id and prop hold the properties. Use syntax obj[key] for accessing the object(s). Assing value to the property with =.
Marsel
@marselcode
Feb 26 2016 07:13

@Masd925 function update(id, prop, value) {

if (value !== "" && prop !== "tracks" ) {
collection[value] = prop;
} like this?

Markus Kiili
@Masd925
Feb 26 2016 07:14
@marselcode collection[id][prop]=value;
Marsel
@marselcode
Feb 26 2016 07:23

@Masd925 I'm almost done. what is wrong here else if ( value !== "" && prop == "tracks") {

 collection.push([id][value]);

}
if i want push the value onto the end of the tracks array.

Markus Kiili
@Masd925
Feb 26 2016 07:25
@marselcode collection is an object. Can't push to it.
Marsel
@marselcode
Feb 26 2016 07:36
@Masd925 first i need to get array "tracks" then push it?
Markus Kiili
@Masd925
Feb 26 2016 07:42
@marselcode Yes, by accessing the collection.
PoetJ
@PoetJ
Feb 26 2016 07:44
can?
Marsel
@marselcode
Feb 26 2016 07:51
@Masd925 can i use it? collection[id].tracks.push([value]);
Markus Kiili
@Masd925
Feb 26 2016 07:53
collection[id].tracks.push(value);
Marsel
@marselcode
Feb 26 2016 07:53
@Masd925 THANKS !!!
CamperBot
@camperbot
Feb 26 2016 07:53
marselcode sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 1073 | @masd925 | http://www.freecodecamp.com/masd925
Yong
@milfordyg
Feb 26 2016 07:58
stuck at counting cards. help

var count = 0;

function cc(card) {
// Only change code below this line
switch(card){
case 2:
case 3:
case 4:
case 5:
case 6:
count += 1;
break;
case 10:
case 'J':
case 'Q':
case 'K':
case 'A':
count -= 1;
break;
}
if (count > 0){
return count + " Bet";
} else {
return count + " Hold";
}
// Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(7); cc('K'); cc('A');

what did i do wrong?
Yong
@milfordyg
Feb 26 2016 08:04
nvm, thanks
Marsel
@marselcode
Feb 26 2016 08:04
This message was deleted
Yong
@milfordyg
Feb 26 2016 08:05
@marselcode i passed it, thanks
CamperBot
@camperbot
Feb 26 2016 08:05
dogis sends brownie points to @marselcode :sparkles: :thumbsup: :sparkles:
:star: 247 | @marselcode | http://www.freecodecamp.com/marselcode
Marsel
@marselcode
Feb 26 2016 08:05
@dogis ok
Malt3Muz
@Malt3Muz
Feb 26 2016 08:36
Hello! I need someones help :D
Isn't this correct?
<input type="text" placeholder="cat photo URL">
Denis
@bestkid74
Feb 26 2016 08:36
yes
Malt3Muz
@Malt3Muz
Feb 26 2016 08:37
But it says it's wrong
Krystian Molina
@ZloVolk
Feb 26 2016 08:37
is there an actual url
Malt3Muz
@Malt3Muz
Feb 26 2016 08:37
Yes
nishukla95
@nishukla95
Feb 26 2016 08:37
hi i am stuck at 91
Give the text input in your form the class form-control.
Krystian Molina
@ZloVolk
Feb 26 2016 08:37
thats what may be hindering you
nishukla95
@nishukla95
Feb 26 2016 08:37
please help
Krystian Molina
@ZloVolk
Feb 26 2016 08:37
then put the url where is says Cat Photo URL
Malt3Muz
@Malt3Muz
Feb 26 2016 08:38
Like this?
<input type="text" placeholder="https://bit.ly/fcc-relaxing-cat">
Denis
@bestkid74
Feb 26 2016 08:38
no
Krystian Molina
@ZloVolk
Feb 26 2016 08:38
@nishukla95 is form-control in your css
@nishukla95 you can call it in your form after that.
@Malt3Muz did the URl work for you?
Malt3Muz
@Malt3Muz
Feb 26 2016 08:39
No
Denis
@bestkid74
Feb 26 2016 08:39
@Malt3Muz url must be AFTER ">"
nishukla95
@nishukla95
Feb 26 2016 08:39
@ZloVolk do i need to give the calss to the form or the text input field
Malt3Muz
@Malt3Muz
Feb 26 2016 08:40
I think i am really stupid
it is supposed to work but it doesn't
Krystian Molina
@ZloVolk
Feb 26 2016 08:40
@nishukla95 the text input.
Malt3Muz
@Malt3Muz
Feb 26 2016 08:41
This doesn't seem right
<input type="text" placeholder=>"https://bit.ly/fcc-relaxing-cat"
Krystian Molina
@ZloVolk
Feb 26 2016 08:41
no thats not right
nishukla95
@nishukla95
Feb 26 2016 08:41
@Malt3Muz you cant give a url to placeholder
Malt3Muz
@Malt3Muz
Feb 26 2016 08:41
ohhh
It says i have to Set the value of your placeholder attribute to "cat photo URL".
Denis
@bestkid74
Feb 26 2016 08:42
then <input type="text" placeholder="cat photo">
Krystian Molina
@ZloVolk
Feb 26 2016 08:42
^
nishukla95
@nishukla95
Feb 26 2016 08:42
@Malt3Muz you took it too literal
Malt3Muz
@Malt3Muz
Feb 26 2016 08:42
i always do lol
nishukla95
@nishukla95
Feb 26 2016 08:42
it is saying to just add the text "cat photo url"
as a plceholder
Enrico Mattiazzi
@emattiazzi
Feb 26 2016 08:43
Hello, I am stuck with: "Your green-box class should give the top of elements 40px of padding."
I wrote padding: 40px 0 0 0;
It shows a green checkmark but unfortunately I can't go to the next lesson. Why?
nishukla95
@nishukla95
Feb 26 2016 08:43
@ZloVolk <input type="text" class="fomr-control" placeholder="cat photo URL" required >
*form
Krystian Molina
@ZloVolk
Feb 26 2016 08:44
form
Denis
@bestkid74
Feb 26 2016 08:44
padding-top: 40px;
Enrico Mattiazzi
@emattiazzi
Feb 26 2016 08:44
@bestkid74 But I'm in the clockwise notation
Sushrut Rakshit
@Gymnosophist25
Feb 26 2016 08:44
I'm stuck at 26 with the http://freecatphotoapp.com link
I don't think I have done anything wrong
nishukla95
@nishukla95
Feb 26 2016 08:45
@ZloVolk holy shit i was doing typo :(
Krystian Molina
@ZloVolk
Feb 26 2016 08:45
lol its ok
i have a bad happen of not putting me ;
my**
did it go through?
@Gymnosophist25 what do you have?
Denis
@bestkid74
Feb 26 2016 08:45
check "class" of your element
Sushrut Rakshit
@Gymnosophist25
Feb 26 2016 08:46
<p><a href="http://freecatphotoapp.com">cat photos</a></p>
anything wrong with it?
Malt3Muz
@Malt3Muz
Feb 26 2016 08:47
Thank you guys. It didn't work but i don't have time to look at it :P
Krystian Molina
@ZloVolk
Feb 26 2016 08:47
no @Gymnosophist25
Sushrut Rakshit
@Gymnosophist25
Feb 26 2016 08:47
lol why isn't it running then!
Krystian Molina
@ZloVolk
Feb 26 2016 08:47
its not closed in another element right?
V Bhargav Chowdary
@bhargav4
Feb 26 2016 08:48
Can someone please say what API is in layman's terms?
Krystian Molina
@ZloVolk
Feb 26 2016 08:48
@Malt3Muz sorry we couldnt help you right now.
Sushrut Rakshit
@Gymnosophist25
Feb 26 2016 08:48
No
Krystian Molina
@ZloVolk
Feb 26 2016 08:48
@bhargav4 think of it as a preset of legos
@bhargav4 so for like the spotify api, its a set of protocols or routines that will work on outside sites. like calling a playlist or allowing for you to use your spotify profile to sign up on .fm
@bhargav4 does that explain it?
@Gymnosophist25 where in the code did you place the tag?
V Bhargav Chowdary
@bhargav4
Feb 26 2016 08:51
@ZloVolk Thank you
CamperBot
@camperbot
Feb 26 2016 08:51
bhargav4 sends brownie points to @zlovolk :sparkles: :thumbsup: :sparkles:
:star: 28 | @zlovolk | http://www.freecodecamp.com/zlovolk
Krystian Molina
@ZloVolk
Feb 26 2016 08:51
@bhargav4 your very welcome :D
@Gymnosophist25 Did you get it to work?
Catalinakatalyst
@Catalinakatalyst
Feb 26 2016 08:56

<style>
h2{color:blue;}
</style>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

pls how do i make my h2 element blue
Krystian Molina
@ZloVolk
Feb 26 2016 08:57
add the h2
so it would be

<style>
h2{color:blue;}
</style>

<h2>something or other</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

and the text will be blue
Denis
@bestkid74
Feb 26 2016 08:57
insted <p> add <h2>
and </p> to </h2>
Humphrey
@Humphreto
Feb 26 2016 08:59

add the h2
so it would be

h2{color:blue;}
</style>

<h2>something or other</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

and the text will be blue @bestkid74 @ZloVolk @Catalinakatalyst

Krystian Molina
@ZloVolk
Feb 26 2016 08:59
@Humphreto hey howd you do that thats cool.
Humphrey
@Humphreto
Feb 26 2016 09:00
@ZloVolk it is simple add this ` three times before and after you code try it and give me a feedback
@Catalinakatalyst have you try
Krystian Molina
@ZloVolk
Feb 26 2016 09:01
</style>

<h2>something or other</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
Ha! thats awesome thank you, sorry i had to try it disregard.
Humphrey
@Humphreto
Feb 26 2016 09:02
@ZloVolk its ok i had the same experience too
:smile:
Krystian Molina
@ZloVolk
Feb 26 2016 09:02
how do you give brownie points?
Humphrey
@Humphreto
Feb 26 2016 09:03
@ZloVolk hmmm. your tricking me.... you mention the name of the person the you writ T.H.A.N.K.S in small case without the period in between the word
give it a try to me! :santa:
Krystian Molina
@ZloVolk
Feb 26 2016 09:03
@Humphreto thanks
CamperBot
@camperbot
Feb 26 2016 09:03
zlovolk sends brownie points to @humphreto :sparkles: :thumbsup: :sparkles:
:star: 79 | @humphreto | http://www.freecodecamp.com/humphreto
Krystian Molina
@ZloVolk
Feb 26 2016 09:04
ha Perfect!
now to conquer the world!
Humphrey
@Humphreto
Feb 26 2016 09:04
@ZloVolk i guess you know how to add the smileys
Krystian Molina
@ZloVolk
Feb 26 2016 09:04
:D
or :shipit:
Humphrey
@Humphreto
Feb 26 2016 09:04
great
Krystian Molina
@ZloVolk
Feb 26 2016 09:05
the brownie one was big i saw people giving them and im like how do you do that. :D
Humphrey
@Humphreto
Feb 26 2016 09:05
@ZloVolk you can say it to multiple people too
Krystian Molina
@ZloVolk
Feb 26 2016 09:06
just mention them and then thenks right?
Humphrey
@Humphreto
Feb 26 2016 09:06
yap
Krystian Molina
@ZloVolk
Feb 26 2016 09:06
well....
Humphrey
@Humphreto
Feb 26 2016 09:06
@ZloVolk @camperbot @Catalinakatalyst thanks
CamperBot
@camperbot
Feb 26 2016 09:06
humphreto sends brownie points to @zlovolk and @camperbot and @catalinakatalyst :sparkles: :thumbsup: :sparkles:
Krystian Molina
@ZloVolk
Feb 26 2016 09:06
@Humphreto thanks
CamperBot
@camperbot
Feb 26 2016 09:06
:star: 1252 | @camperbot | http://www.freecodecamp.com/camperbot
:star: 16 | @catalinakatalyst | http://www.freecodecamp.com/catalinakatalyst
:star: 33 | @zlovolk | http://www.freecodecamp.com/zlovolk
Krystian Molina
@ZloVolk
Feb 26 2016 09:07
hey how come it didnt give you points?
@Humphreto thanks
CamperBot
@camperbot
Feb 26 2016 09:07
zlovolk sends brownie points to @humphreto :sparkles: :thumbsup: :sparkles:
Humphrey
@Humphreto
Feb 26 2016 09:07
i wonder
CamperBot
@camperbot
Feb 26 2016 09:07
:warning: zlovolk already gave humphreto points
Krystian Molina
@ZloVolk
Feb 26 2016 09:07
there you go.
cant capitlize the t
Atarbayar
@ArataLearn
Feb 26 2016 09:19
blob
help pls
CamperBot
@camperbot
Feb 26 2016 09:19
no wiki entry for: pls
Krystian Molina
@ZloVolk
Feb 26 2016 09:20
@ArataLearn you need another div for the form as well
Kyle Morton
@kmorton1988
Feb 26 2016 09:20
aratalearn, also, each button needs its own div, as stated on the left next to the red x.
Krystian Molina
@ZloVolk
Feb 26 2016 09:20
@ZloVolk and you didnt close one of the div elements
Atarbayar
@ArataLearn
Feb 26 2016 09:20
thank u guys
Krystian Molina
@ZloVolk
Feb 26 2016 09:20
NP
Kyle Morton
@kmorton1988
Feb 26 2016 09:21
fasho.
tsedina
@tsedina
Feb 26 2016 09:23
I didnt give class to the p element but I couldnt go to next level. Why?
Krystian Molina
@ZloVolk
Feb 26 2016 09:23
what class?
Catalinakatalyst
@Catalinakatalyst
Feb 26 2016 09:23
Krystian Molina
@ZloVolk
Feb 26 2016 09:24
@Catalinakatalyst NP :D
tsedina
@tsedina
Feb 26 2016 09:24
it says not to add class to the p element
Catalinakatalyst
@Catalinakatalyst
Feb 26 2016 09:24
it works thank you @Humphreto
CamperBot
@camperbot
Feb 26 2016 09:24
catalinakatalyst sends brownie points to @humphreto :sparkles: :thumbsup: :sparkles:
:star: 85 | @humphreto | http://www.freecodecamp.com/humphreto
Humphrey
@Humphreto
Feb 26 2016 09:24
@Catalinakatalyst am glad
Krystian Molina
@ZloVolk
Feb 26 2016 09:25
@tsedina is it the one that has two p classes?
tsedina
@tsedina
Feb 26 2016 09:25
ya
Krystian Molina
@ZloVolk
Feb 26 2016 09:25
@tsedina if so you add the class to one p element and you input it directly into the other one. then youll be able to move forward.
@tsedina so you put the font-size=16px directly into the second p element.
Humphrey
@Humphreto
Feb 26 2016 09:26
@tsedina do you mind if you copy to see what you mean?
tsedina
@tsedina
Feb 26 2016 09:26
let me try it

<style>
.red-text {
color: red;
}
p{
font-size:16px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p >Purr jump eat the grass rip the couch scratched sunbathe, shed </p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed </p>

Krystian Molina
@ZloVolk
Feb 26 2016 09:30
  .red-text {
    color: red;
  }
  p{
    font-size:16px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p style="font-size=16px" >Purr jump eat the grass rip the couch scratched sunbathe, shed </p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed </p>
Humphrey
@Humphreto
Feb 26 2016 09:31
@tsedina and the instruction tells you what to do
what are you required to do?
Krystian Molina
@ZloVolk
Feb 26 2016 09:31
change to p class using class and style to 16px
class nad style tags**
tsedina
@tsedina
Feb 26 2016 09:32
Do not add a class attribute to your new p element.
Krystian Molina
@ZloVolk
Feb 26 2016 09:33

``` .red-text {
color: red;
}
p{
font-size:16px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<p style="font-size=16px">Purr jump eat the grass rip the couch scratched sunbathe, shed </p>```

```.red-text {
color: red;
}
p{
font-size:16px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<p style="font-size=16px">Purr jump eat the grass rip the couch scratched sunbathe, shed </p>```

tsedina
@tsedina
Feb 26 2016 09:34
still not working
Aleksander Gębicki
@Takumar
Feb 26 2016 09:34

@ZloVolk don't put anything in lines where you write backticks ``` the formatting will not work in such case. Write:

```
your code
```

Humphrey
@Humphreto
Feb 26 2016 09:35
@ZloVolk @tsedina try to change this p{ font-size:16px; } to this .font-size{ font-size:16px; } and also on this part <p style="font-size=16px" >Purr jump eat the grass rip the couch scratched sunbathe, shed </p> to this <p class="font-size" >Purr jump eat the grass rip the couch scratched sunbathe, shed </p>
Krystian Molina
@ZloVolk
Feb 26 2016 09:35
@Takumar thanks :D
CamperBot
@camperbot
Feb 26 2016 09:35
zlovolk sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 2448 | @takumar | http://www.freecodecamp.com/takumar
Humphrey
@Humphreto
Feb 26 2016 09:36
@ZloVolk you confusing something <p style="font-size=16px">Purr jump eat the grass rip the couch scratched sunbathe, shed is not the right code it is supposed to be <p style="font-size">Purr jump eat the grass rip the couch scratched sunbathe, shed </p>
@Takumar how are you doing buddy?
Aleksander Gębicki
@Takumar
Feb 26 2016 09:37
Quite good, thanks @Humphreto :-)
CamperBot
@camperbot
Feb 26 2016 09:37
takumar sends brownie points to @humphreto :sparkles: :thumbsup: :sparkles:
:star: 86 | @humphreto | http://www.freecodecamp.com/humphreto
Humphrey
@Humphreto
Feb 26 2016 09:37
@tsedina you are not responding what happened
Krystian Molina
@ZloVolk
Feb 26 2016 09:37
@Humphreto because its calling it from class?
tsedina
@tsedina
Feb 26 2016 09:38
still not working
Humphrey
@Humphreto
Feb 26 2016 09:39
@ZloVolk the class cant have the ' = ' in between it name <p class="a=b">...</p> is not correct
Aleksander Gębicki
@Takumar
Feb 26 2016 09:39

@ZloVolk This element selector:

p {
  font-size:16px;
}

is changing font size of every paragraph to 16 px, and that is enough.

tsedina
@tsedina
Feb 26 2016 09:39
i tried that
couldn't go to the next level
Aleksander Gębicki
@Takumar
Feb 26 2016 09:40
@ZloVolk when you want to use "inline style", you would write: <p style="font-size: 16px;" >Purr jump eat t...
You separate value with attribute with colon.
Krystian Molina
@ZloVolk
Feb 26 2016 09:40
^ thats what i was trying to explain
tsedina
@tsedina
Feb 26 2016 09:40
@Humphreto i tried yours also
Humphrey
@Humphreto
Feb 26 2016 09:41
@tsedina in your code do you have this kind of line? <p style="font-size=16px" >Purr jump eat the grass rip the couch scratched sunbathe, shed </p>
Krystian Molina
@ZloVolk
Feb 26 2016 09:41
i missed the semicololol.
Aleksander Gębicki
@Takumar
Feb 26 2016 09:41
That is how it looks when you don't read from the start. Who has got problem? @ZloVolk or @tsedina ? :-)
Humphrey
@Humphreto
Feb 26 2016 09:41
@ZloVolk exactly
Krystian Molina
@ZloVolk
Feb 26 2016 09:41
tsedina
the question @Humphreto @Takumar is the one where theyre showing you how to do class and style so the p class doesnt have a class its .red-text
Aleksander Gębicki
@Takumar
Feb 26 2016 09:42
@ZloVolk and I was trying to explain it to you :laughing:
tsedina
@tsedina
Feb 26 2016 09:42
i read the instruction
Humphrey
@Humphreto
Feb 26 2016 09:42
@tsedina you missing the colon after 16px
Krystian Molina
@ZloVolk
Feb 26 2016 09:42
and then they tell you use class and inline to solve the question
tsedina
@tsedina
Feb 26 2016 09:43
its the simple thing but i couldnt fix it
Humphrey
@Humphreto
Feb 26 2016 09:43
do you have the link maybe
of the challenge
if im not mistaken
Krystian Molina
@ZloVolk
Feb 26 2016 09:45
<style>
  .red-text {
    color: red;
    font-size: 16px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p style="font-size: 16px">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
</p>
and that was my solution
Spencer
@coderamen
Feb 26 2016 09:45
Need help for challenge "Give Each Element a Unique ID" for understanding purpose. The instruction specifically mention "Make sure that target1 to target3 are in #left-well, and target4 to target6 are in #right-well." However the correct answer to solve this is <div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1"></button>
<button class="btn btn-default target" id="target3"></button>
<button class="btn btn-default target" id="target5"></button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target2"></button>
<button class="btn btn-default target" id="target4"></button>
<button class="btn btn-default target" id="target6"></button>
</div>
</div>
</div>
</div>
but i dont understand why is this wrong and not <div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target1"></button>
<button class="btn btn-default target2"></button>
<button class="btn btn-default target3"></button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target4"></button>
<button class="btn btn-default target5"></button>
<button class="btn btn-default target6"></button>
</div>
</div>
</div>
</div>
Humphrey
@Humphreto
Feb 26 2016 09:47

@ZloVolk @tsedina ```<style>
.red-text {
color: red;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<p style="font-size:16px;"> Purr jump eat the grass rip.</p>```

Krystian Molina
@ZloVolk
Feb 26 2016 09:47

@Humphreto @tsedina @Takumar

```

<style>
.red-text {
color: red;
font-size: 16px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p style="font-size: 16px">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
</p>

Humphrey
@Humphreto
Feb 26 2016 09:47

try this. it work for me ```<style>
.red-text {
color: red;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<p style="font-size:16px;"> Purr jump eat the grass rip.</p>```

Krystian Molina
@ZloVolk
Feb 26 2016 09:47
This is what i was trying to explain lol.
tsedina
@tsedina
Feb 26 2016 09:48
thanks guys, I got it
Krystian Molina
@ZloVolk
Feb 26 2016 09:48
Woooo!
Humphrey
@Humphreto
Feb 26 2016 09:48
@ZloVolk hope it worked
tsedina
@tsedina
Feb 26 2016 09:49
@Humphreto it worked now
Humphrey
@Humphreto
Feb 26 2016 09:50
@tsedina the erro was what you put in between the <p>......</p>. FCC wanted the first few words!. it was hard to figure out for me too the first day i had that code
@codetechnoob have some issue?
pmihaic
@pmihaic
Feb 26 2016 09:51
hello guys
Nguyen Quoc Dai Le
@dailepro
Feb 26 2016 09:52
blob
tsedina
@tsedina
Feb 26 2016 09:52
I think so
Nguyen Quoc Dai Le
@dailepro
Feb 26 2016 09:52
i need help :(
Spencer
@coderamen
Feb 26 2016 09:52
it's okay...hahaha @Humphreto I manage to understand eventhough is correct....lemme continue on....
Humphrey
@Humphreto
Feb 26 2016 09:53
@codetechnoob no problemo
@pmihaic whats up
@princele whatsup
Nguyen Quoc Dai Le
@dailepro
Feb 26 2016 09:55
This
@Humphreto
blob
Humphrey
@Humphreto
Feb 26 2016 09:56
This message was deleted
This message was deleted
<h4 id="left-well">....</h4>
Nguyen Quoc Dai Le
@dailepro
Feb 26 2016 09:57
@Humphreto it's does't work :(
Humphrey
@Humphreto
Feb 26 2016 09:57
give me the link to the page
Humphrey
@Humphreto
Feb 26 2016 10:00
<div class="container-fluid"> <h3 class="text-primary text-center">jQuery Playground</h3> <div class="row"> <div class="col-xs-6"> <h4 id="left-well">#left-well.</h4> <div class="well" id="left-well"> <button class="btn btn-default target"></button> <button class="btn btn-default target"></button> <button class="btn btn-default target"></button> </div> </div> <div class="col-xs-6"> <h4 id="right-well">#right-well</h4> <div class="well" id="right-well"> <button class="btn btn-default target"></button> <button class="btn btn-default target"></button> <button class="btn btn-default target"></button> </div> </div> </div> </div>
it worked for me
here are the clues
<h4 id="left-well">#left-well.</h4> and <h4 id="right-well">#right-well</h4>
@princele see!!!
Nguyen Quoc Dai Le
@dailepro
Feb 26 2016 10:01
Yes.
@Humphreto Thank so much <3
CamperBot
@camperbot
Feb 26 2016 10:01
princele sends brownie points to @humphreto :sparkles: :thumbsup: :sparkles:
:star: 89 | @humphreto | http://www.freecodecamp.com/humphreto
Humphrey
@Humphreto
Feb 26 2016 10:02
@princele my plesure
Nguyen Quoc Dai Le
@dailepro
Feb 26 2016 10:02
ok.. Thank again :clap:
@Humphreto Nice to meet you.!
Mudit Bhutani
@muditbhutani
Feb 26 2016 10:05
m unable to understand how to proceed for this http://www.freecodecamp.com/challenges/show-the-local-weather :( no info given , no example. about how to use the api ..
Humphrey
@Humphreto
Feb 26 2016 10:06
@muditbhutani am sorry i have no idea with that
Mudit Bhutani
@muditbhutani
Feb 26 2016 10:06
@Humphreto ok
Humphrey
@Humphreto
Feb 26 2016 10:06
but i open the link it seem there are instructions
Mudit Bhutani
@muditbhutani
Feb 26 2016 10:07
they just say use the open weather api and then this is the link
this site ^^ i ddont get it
Gustavo Chávez
@gchavez2
Feb 26 2016 10:11
Hello everybody :hand: . Does anybody know the keyboard shortcut to comment out 10 lines of code (with a keyboard shortcut, repeating myself), inside FCC? (in sublime and codpen.io is ctrl+/ but inside FCC is not working)
Mike
@treter
Feb 26 2016 10:13

Hi all, I am very new and have run into my first issue. would someone mind correcting me if they have a moment?
The question:
Inside your style element, change the h2 selector to .red-text and update the color's value from blue to red.

Give your h2 element the class attribute with a value of 'red-text'.

My Code:

<style>
.red-text {
color: red;
}
</style>

<h2 class="blue-text">CatPhotoApp</h2>

Thoughts are appreciated.

Krystian Molina
@ZloVolk
Feb 26 2016 10:13
<h2 class="blue-text">CatPhotoApp</h2>
in this line change blue to red
the word i mean
Humphrey
@Humphreto
Feb 26 2016 10:15
@treter hi. @gchavez2 i dont know the shortcut of commenting in FCC
Gustavo Chávez
@gchavez2
Feb 26 2016 10:16
@Humphreto thank tho!
CamperBot
@camperbot
Feb 26 2016 10:16
gchavez2 sends brownie points to @humphreto :sparkles: :thumbsup: :sparkles:
:star: 93 | @humphreto | http://www.freecodecamp.com/humphreto
Mike
@treter
Feb 26 2016 10:17
Thanks @ZloVolk ! I sure feel dim.
CamperBot
@camperbot
Feb 26 2016 10:17
treter sends brownie points to @zlovolk :sparkles: :thumbsup: :sparkles:
:star: 45 | @zlovolk | http://www.freecodecamp.com/zlovolk
Humphrey
@Humphreto
Feb 26 2016 10:17
This message was deleted
Krystian Molina
@ZloVolk
Feb 26 2016 10:17
@treter Dont worry about it, most of the time the bug in the code is something simple like that :D
Humphrey
@Humphreto
Feb 26 2016 10:17
@ZloVolk @treter and also you have to recall it in you style <style> .blue-text{color:blue;}</style>
Gustavo Chávez
@gchavez2
Feb 26 2016 10:17
help shortcuts
CamperBot
@camperbot
Feb 26 2016 10:17

:point_right: how to best use the global control shortcuts for mac [wiki]

These Global Control Shortcuts for Mac will save you hours by speeding up your typing.

https://player.vimeo.com/video/107073108

These global shortcuts work everywhere on a Mac:

Krystian Molina
@ZloVolk
Feb 26 2016 10:18
@Humphreto He did in his orig code.
Humphrey
@Humphreto
Feb 26 2016 10:18
@ZloVolk hmmmm. in case he hasn't
Krystian Molina
@ZloVolk
Feb 26 2016 10:19
@Humphreto ok.
Mike
@treter
Feb 26 2016 10:19
At this point you might as well be speaking in pashtu. But, baby steps.
Krystian Molina
@ZloVolk
Feb 26 2016 10:20
lol your code, the one your provided was ok, the only thing youd miss was to change a word in one place. @Humphreto was nice enough to point out to check that you had the right code all the way through.
Humphrey
@Humphreto
Feb 26 2016 10:22
@ZloVolk . thank you am always greatful. @camperbot dont give brownies or anything to zlovolk
CamperBot
@camperbot
Feb 26 2016 10:22
humphreto sends brownie points to @zlovolk and @camperbot :sparkles: :thumbsup: :sparkles:
:star: 1253 | @camperbot | http://www.freecodecamp.com/camperbot
:star: 46 | @zlovolk | http://www.freecodecamp.com/zlovolk
Humphrey
@Humphreto
Feb 26 2016 10:22
@camperbot you just did
Krystian Molina
@ZloVolk
Feb 26 2016 10:23
Hahaha does it ever respond?
naassi
@naassi
Feb 26 2016 10:26
Has anyone used the open weather api, I have just started using it but I keep getting invalid api key error, I have reset the key, any advice?
Shaun Yap
@shaunyap
Feb 26 2016 10:28
@naassi: i think i had that problem when i did it too. let me try and recall what i actually did to correct it
it looks like at the end of the $.get call, i just appended +"&APPID={{my api key}}
and that seemed to work.
naassi
@naassi
Feb 26 2016 10:29
@shaunyap Thanks, i have another go
CamperBot
@camperbot
Feb 26 2016 10:29
naassi sends brownie points to @shaunyap :sparkles: :thumbsup: :sparkles:
:star: 333 | @shaunyap | http://www.freecodecamp.com/shaunyap
Ann Siapno
@AnnSiapno
Feb 26 2016 10:30
Can someone please point me to the right direction on how to create a twitter button that tweets whatever is in a <p> with an ID.
JadstaSeven
@JadstaSeven
Feb 26 2016 10:32
How do I add code into my document ready function? I've been trying with this code but it does not work:
<script>
$(document).ready(function() {
$("button").addclass("animated bounce");

});
</script>
Is $("button").addclass("animated bounce"); meant to go inside () after function?
Shaun Yap
@shaunyap
Feb 26 2016 10:33
@AnnSiapno: https://dev.twitter.com/web/tweet-button/parameters#button this seems to be the right article to try and get that information.
Ann Siapno
@AnnSiapno
Feb 26 2016 10:33
@JadstaSeven try capitalizing the 'C' in addClass()
JadstaSeven
@JadstaSeven
Feb 26 2016 10:33
@AnnSiapno Wow that fixed it, thank you
CamperBot
@camperbot
Feb 26 2016 10:33
jadstaseven sends brownie points to @annsiapno :sparkles: :thumbsup: :sparkles:
:star: 278 | @annsiapno | http://www.freecodecamp.com/annsiapno
Tom
@ch4tml
Feb 26 2016 10:34
This message was deleted
Ann Siapno
@AnnSiapno
Feb 26 2016 10:35
@shaunyap I can't believe I didn't come across this article before... Thank you I'll give it a go!
CamperBot
@camperbot
Feb 26 2016 10:35
annsiapno sends brownie points to @shaunyap :sparkles: :thumbsup: :sparkles:
:star: 334 | @shaunyap | http://www.freecodecamp.com/shaunyap
Shaun Yap
@shaunyap
Feb 26 2016 10:35
@AnnSiapno happens to the best of us, good luck!
Humphrey
@Humphreto
Feb 26 2016 10:40
i come across this site https://codyhouse.co/ it is very inspiring
fro CSS transitionns
*transitions
Gustavo Chávez
@gchavez2
Feb 26 2016 10:43
help bot
CamperBot
@camperbot
Feb 26 2016 10:43

:point_right: bot announce [wiki]

Announcing CamperBot!

CamperBot is our new AI friend who's going to make the FCC chatrooms more fun.
He can get info from the wiki, share Algorithm hints, and help you get brownie points for helping people!

https://twitter.com/FreeCodeCamp/status/627338604134559744

beta testing

Currently in beta test in the #HelpBonfires channel. Try it out here:
https://gitter.im/FreeCodeCamp/HelpBonfires

read about what CamperBot features

https://github.com/FreeCodeCamp/freecodecamp/wiki/camperbot

talk to the Dev Team

https://gitter.im/dcsan/gitterbot

:pencil: read more about bot announce on the FCC Wiki

Blauelf
@Blauelf
Feb 26 2016 10:50
Looks a bit outdated? HelpBonfires should no longer be used...
CamperBot
@camperbot
Feb 26 2016 10:50
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Lars Jönsson
@devpaps
Feb 26 2016 11:02
bonfire name
CamperBot
@camperbot
Feb 26 2016 11:02
no, type part of the name of the bonfire! eg bonfire roman
Humphrey
@Humphreto
Feb 26 2016 11:04
bonfire Humphreto
CamperBot
@camperbot
Feb 26 2016 11:04
Sorry, can't find a bonfire called humphreto. [ Check the map? ]
Humphrey
@Humphreto
Feb 26 2016 11:04
bonfire javascript
CamperBot
@camperbot
Feb 26 2016 11:04
Sorry, can't find a bonfire called javascript. [ Check the map? ]
Humphrey
@Humphreto
Feb 26 2016 11:05
bonfire Global Scope and Functions Incomplete
CamperBot
@camperbot
Feb 26 2016 11:05
Sorry, can't find a bonfire called global scope and functions incomplete. [ Check the map? ]
Humphrey
@Humphreto
Feb 26 2016 11:05
bot help
CamperBot
@camperbot
Feb 26 2016 11:05

:point_right: coding help [wiki]

Coding Help

I started this list while doing Algorithms, noticing a few things that were common issues / questions but I think most of them are going to be useful to people coding in general. If you've got some tips to help people code I'd love to hear them.

  1. If you don't know where to start, write some pseudocode. Plan out the logic you're trying to implement in your native language before you try to put it into code.

  2. Comment your code! Can't stress that one enough, if you get lost or take a break then come back you need to know what your code is trying to do. It will also reinforce what the code means to you, and help other people understand what your code does if you get stuck and ask for help. If you've got a any other tips for campers I'd love to see them!

  3. Use the chrome javascript debugger console in conjunction with something like netbeans IDE or sublime text to write your code. Both are free to download. <br />
    The free code camp window is great but you can get a lot more feedback on your code's behaviour by using chrome's JS debugger and a bunch of console.log(myVariableGoesHere); <br />
    https://developer.chrome.com/devtools/docs/console <br />
    http://www.sublimetext.com/ <br />
    https://netbeans.org/downloads/

  4. Posting your code in gitter is as simple as adding a line consisting of only

    ```

    Then your code on the next lines, followed by a final

    ```

:pencil: read more about coding help on the FCC Wiki

Humphrey
@Humphreto
Feb 26 2016 11:06
bot bonfire
CamperBot
@camperbot
Feb 26 2016 11:06
no wiki entry for: bonfire
Humphrey
@Humphreto
Feb 26 2016 11:06
bot javascript
CamperBot
@camperbot
Feb 26 2016 11:06

:point_right: challenge add new properties to a javascript object [wiki]

Add New Properties to a JavaScript Object

You can add new properties to existing JavaScript objects the same way you would modify them. Here is how: myDog.bark = "woof-woof";

:pencil: read more about challenge add new properties to a javascript object on the FCC Wiki

Gustavo Chávez
@gchavez2
Feb 26 2016 11:06
help seek and destroy
CamperBot
@camperbot
Feb 26 2016 11:06

:point_right: algorithm seek and destroy [wiki]

Explanation:

This problem is a bit tricky because you have to familiarize yourself with Arguments, as you will have to work with two or more but on the script you only see two. Many people hardcode this program for three arguments. You will remove any number from the first argument that is the same as any other other arguments.

:pencil: read more about algorithm seek and destroy on the FCC Wiki

Humphrey
@Humphreto
Feb 26 2016 11:06
bot jquery
CamperBot
@camperbot
Feb 26 2016 11:06

:point_right: challenge change text inside an element using jquery [wiki]

Change Text Inside an Element Using jQuery

Using jQuery, you can change the text between the start and end tags of an element. You can even change HTML markup.

jQuery has a function called .html() that lets you add HTML tags and text within an element. Any content previously within the element will be completely replaced with the content you provide using this function.

Here's how you would rewrite and italicize the text of our heading:

$("h3").html("<i>jQuery Funhouse</i>");

jQuery also has a similar function called .text() that only alters text without adding tags. So when using .html() please remember that you will be editing the whole markup and not just the text.

:pencil: read more about challenge change text inside an element using jquery on the FCC Wiki

Humphrey
@Humphreto
Feb 26 2016 11:07
:thumbsup: i found the bot very extremely helpful
goodbye world
Blauelf
@Blauelf
Feb 26 2016 11:13
I think it only reacts on Hello World... probably noisy enough :P
Arindam Bhattacharya
@3vil633k
Feb 26 2016 11:17
hello world!
CamperBot
@camperbot
Feb 26 2016 11:17

welcome to FreeCodeCamp @3vil633k!

Aleksander Gębicki
@Takumar
Feb 26 2016 11:19

@3vil633k welcome :-)

Arindam Bhattacharya
@3vil633k
Feb 26 2016 11:19
@Takumar thank you :smile:
CamperBot
@camperbot
Feb 26 2016 11:19
3vil633k sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 2449 | @takumar | http://www.freecodecamp.com/takumar
DCOSMINC
@DCOSMINC
Feb 26 2016 11:20
Does anyone why the background image doubles itself rather than stretching when using the "background: url() etc; command in css ?
Alessandro Giordo
@bovas85
Feb 26 2016 11:21
@DCOSMINC there's a handy solution for that called no-repeat
Aleksander Gębicki
@Takumar
Feb 26 2016 11:21
@DCOSMINC you have to apply background-repeat: none; to it, or you can choose to repeat it only in horizontal or vertical side.
Alessandro Giordo
@bovas85
Feb 26 2016 11:21
also look up background-size property
yuliia
@YuliiaPontah
Feb 26 2016 11:22
Your image should have a src attribute that points to the kitten image.
where src attribute?

<img src="https://s3.amazonaws.com/freecodecamp/relaxing-cat.jpg">

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Aleksander Gębicki
@Takumar
Feb 26 2016 11:23
@YuliiaPontah put your image after heading <h2> and add src attribute to it
<img src=" ...">
yuliia
@YuliiaPontah
Feb 26 2016 11:23
thank you
DCOSMINC
@DCOSMINC
Feb 26 2016 11:24

Ehm, .page1 {
background-size: cover;
background: url(http://i.imgur.com/ibOc7I3.jpg?1) center ;
height: 500px;
background-repeat: none;

}

is that not ok? >.>
It's confusing just because if i throw it in html the image stretches itself when i give it the 100% width and so on, but in css it doesn't.
Aleksander Gębicki
@Takumar
Feb 26 2016 11:26
@DCOSMINC put address of image in quotation marks
background: url('http://i.imgur.com/ibOc7I3.jpg?1') center;
William
@dwynewilly
Feb 26 2016 11:26
Hello Guys. I am having problem in the "Learn how Script Tags and Document Ready Work" challenge. I definetely dont understand how to proceed.
DCOSMINC
@DCOSMINC
Feb 26 2016 11:27
@Takumar that doesn't do anything
Aleksander Gębicki
@Takumar
Feb 26 2016 11:30
@DCOSMINC I am sorry it should be no-repeat: background-repeat: no-repeat;
@dwynewilly your instruction says to add fragment of code to the beginning of your code:
Inside your script element, add this code: $(document).ready(function() { to your script. Then close it on the following line (still inside your script element) with: });
that is all you have to do in this exercise.
@DCOSMINC is it working now? It should.
DCOSMINC
@DCOSMINC
Feb 26 2016 11:32
@Takumar ya, saw that on google, now the image doesn't repeat anymore, but it still doesn't stretch
Vibhor Thakral
@VibhorThakral
Feb 26 2016 11:38
Hey everyone :)
Is it just me or fcc not working?
Aleksander Gębicki
@Takumar
Feb 26 2016 11:40
@VibhorThakral it is working :-)
DCOSMINC
@DCOSMINC
Feb 26 2016 11:40
@Takumar >.> with my image? i tried another one and now it works
Vibhor Thakral
@VibhorThakral
Feb 26 2016 11:40
@Takumar it's 504 gateway time out for me o.O
Aleksander Gębicki
@Takumar
Feb 26 2016 11:41
@DCOSMINC have you used bigger image?
William
@dwynewilly
Feb 26 2016 11:41
@Takumar what i dont understand is that word "script element" do i just add that code on top of my page? I just dont understand what is the "script element>
DCOSMINC
@DCOSMINC
Feb 26 2016 11:41
@Takumar yes it is bigger
@Takumar i guess that there's a limit on how much an image can stretch when used in css background compared to when you dump it in html and give it a width of 100%
or something like that, kinda confusing
Vibhor Thakral
@VibhorThakral
Feb 26 2016 11:42
@dwynewilly just add <script> </script> on top of your page
Aleksander Gębicki
@Takumar
Feb 26 2016 11:42
@dwynewilly you should have such block in your code:
<script>

</script>
William
@dwynewilly
Feb 26 2016 11:46
Thanks @Takumar i got it now
CamperBot
@camperbot
Feb 26 2016 11:46
dwynewilly sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 2451 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Feb 26 2016 11:47
@dwynewilly you are welcome :-)
DCOSMINC
@DCOSMINC
Feb 26 2016 11:47
@Takumar the image size must've been it, it's kinda weird but thanks for help
CamperBot
@camperbot
Feb 26 2016 11:47
dcosminc sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 2452 | @takumar | http://www.freecodecamp.com/takumar
Soumitra Varindra Chakravarti
@soumitrachakravarti
Feb 26 2016 11:47

Based on my code below, when I click the #share button, all of generated .quote are being share (eg. if I generated 5 times, 5 twitter popup windows are being opened)

What do I need to do to share only the current .quote?

$(document).ready(function() {
  $('#share').hide();
  $('#generate').on('click', function() {
    $('#share').show();
    $.ajax({
      jsonp: "jsonp",
      dataType: "jsonp",
      url: 'http://api.forismatic.com/api/1.0/',
      contentType: 'application/jsonp',
      data: {
        lang: "en",
        method: "getQuote",
        format: "jsonp"
      },
      success: function(data) {
        var response = '<p>' + data.quoteText + '</p><small><cite title="Source Title">' + data.quoteAuthor + '</cite></small>';
        $('.quote').html(response);
        $('#share').on('click', function() {
          var win = window.open('https://twitter.com/intent/tweet?hashtags=' + data.quoteAuthor + '&related=ChakravartiS&text=' + data.quoteText , '_blank');
          if (win) {
            win.focus();
          } else {
            alert('Please allow popups');
          }
        });
      }
    });
  });

});
Aleksander Gębicki
@Takumar
Feb 26 2016 11:48
@DCOSMINC hmm I was thinking that you can scale also smaller image to full screen with this method, I am checking this now.
Asif Ulfat
@au2020
Feb 26 2016 11:50
Hi to Everyone :smile:
DCOSMINC
@DCOSMINC
Feb 26 2016 11:53
@au2020 hello ^^
Deepak S
@dssal
Feb 26 2016 12:00

<style>
.red-text {
color: red;
}
<p> {font-size: 16px;}</p>
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Give elements with the p tag a font-size of 16px.
Aleksander Gębicki
@Takumar
Feb 26 2016 12:01
@dssal when you crete CSS declaration for paragraph you don't have to use angle brackets, just write:
p { font-size: 16px; }
DCOSMINC
@DCOSMINC
Feb 26 2016 12:02
@dssal p { font-size: 16px; } instead of <p> code </p>
Deepak S
@dssal
Feb 26 2016 12:03
@Takumar @DCOSMINC thanks a lot you guys .i was stuck on it for the past 10 minutes :)
CamperBot
@camperbot
Feb 26 2016 12:03
dssal sends brownie points to @takumar and @dcosminc :sparkles: :thumbsup: :sparkles:
:star: 133 | @dcosminc | http://www.freecodecamp.com/dcosminc
:star: 2453 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Feb 26 2016 12:04
@dssal you're welcome :-)
If only every coding problem could be solved within 10 minutes ;-)
DCOSMINC
@DCOSMINC
Feb 26 2016 12:07
that portfolio website project thingy is put there to depress you >.>
I'm looking at the example website and it looks so nice compared to my abomination, but at least i have cat pictures
Aleksander Gębicki
@Takumar
Feb 26 2016 12:08
@DCOSMINC cat pictures will always give you points :sparkles: :thumbsup: :-)
Gugakip
@Gugakip
Feb 26 2016 12:08
Hello everyone, I built my own tribute page. http://codepen.io/gugakip/pen/NNKWOY Anyone that can give me some feedback? :) (I invented a lot of things in the text :P )
Aleksander Gębicki
@Takumar
Feb 26 2016 12:09
@DCOSMINC I cannot find method for zooming up your small image, maybe it is not possible? You can scale down big image, but you cannot scale up? Strange.
@Gugakip it looks nice :thumbsup:
One thing you could improve I think is to add some space at the top and the bottom using padding-top: on <h1> and some space at the bottom. Now text is to close to border I think.
Gugakip
@Gugakip
Feb 26 2016 12:15
Okay did that. I'm wondering: I did all the css in the html text. Is this a good way of working? or should I use my IDs to add css in the CSS tab?
Aleksander Gębicki
@Takumar
Feb 26 2016 12:15
@Gugakip it is not recommended, better write your CSS in CSS tab of CodePen, it is like another file styles.css next to your .html file
Gugakip
@Gugakip
Feb 26 2016 12:17
Ok, I'll try to do better with the next challenge. I did this because the example of Quincy Larsson did it too, but I guess he knew some better methods and used more bootstrap or so
Aleksander Gębicki
@Takumar
Feb 26 2016 12:17
@Gugakip but am I wrong, or earlier your work was centered? It looked better I think. (now margins are better)
Gugakip
@Gugakip
Feb 26 2016 12:18
Hmm you're right, it went to the left now... let's see
Done, deleted 'auto' by error ;)
@Takumar , thank you!
Wait, @Takumar thanks!
CamperBot
@camperbot
Feb 26 2016 12:20
gugakip sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 2455 | @takumar | http://www.freecodecamp.com/takumar
Gugakip
@Gugakip
Feb 26 2016 12:20
That's better :)
Aleksander Gębicki
@Takumar
Feb 26 2016 12:21
@Gugakip well done! ;-)
DCOSMINC
@DCOSMINC
Feb 26 2016 12:28
choosing colors that match and look nice is hell, i guess i'll just throw some random ones in there >.>
Aleksander Gębicki
@Takumar
Feb 26 2016 12:34
@DCOSMINC maybe use existing schemes from this page: https://color.adobe.com/pl/explore/newest/
DCOSMINC
@DCOSMINC
Feb 26 2016 12:35
So i have 4 background pictures one under each other and i need to have writing in all of them. If i use position absolute on the first one, the writing actually goes in the center where i tell it and it looks nice, but my second cat picture disappears
Any way to fix that? @Takumar i'll look around there thanks
CamperBot
@camperbot
Feb 26 2016 12:35
dcosminc sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:warning: dcosminc already gave takumar points
Bojan
@Baseworking
Feb 26 2016 12:39
hello guys
i kinda need help
Deepak S
@dssal
Feb 26 2016 12:41
i find it weird that fcc didnt include !DOCTYPE and <head> </head> in the course till now those are html basics or did i miss something? :)
DCOSMINC
@DCOSMINC
Feb 26 2016 12:43
@dssal the html/css courses are kinda lackluster
Gustavo Chávez
@gchavez2
Feb 26 2016 12:44
@Takumar hi!
Age
@Shirmardi
Feb 26 2016 12:47
Is there a way to play out the entire mouse-hover animation on css; even if the mouse was no longer hovering over target halfway through animation?
I hope that makes sense.
Deepak S
@dssal
Feb 26 2016 12:48
@DCOSMINC can you suggest me something else?
DCOSMINC
@DCOSMINC
Feb 26 2016 12:49
@dssal codecademy.com has pretty good html/css courses imo
kawika219
@kawika219
Feb 26 2016 12:53
Hello all! I'm new here and brand new to coding. Just stopping by!
GrzegorzRybkowski
@GrzegorzRybkowski
Feb 26 2016 12:58
guys do you have some good tutorials - how to code quote carousel WITHOUT bootstrap ?
Vibhor Thakral
@VibhorThakral
Feb 26 2016 12:58
@kawika219 welcome to FCC!
Bojan
@Baseworking
Feb 26 2016 12:59
erm
Shammas
@anoninferno
Feb 26 2016 13:02
some help needed please. i am making the tribute page and having a tough time remembering how do all that i learned in html/css
Vibhor Thakral
@VibhorThakral
Feb 26 2016 13:03
@anoninferno go ahead ask
Marsel
@marselcode
Feb 26 2016 13:08

please give me an advice with: Profile Lookup

function lookUp(firstName, prop){
// Only change code below this line
if (contacts.hasOwnProperty(firstName) ) {

   return contacts;

} else if (firstName !== "" ) {

   return "No such contact";

} else if (prop !== "") {

   return "No such property";

}

// Only change code above this line
}

// Change these values to test your function
lookUp("Akira", "likes");

Markus Kiili
@Masd925
Feb 26 2016 13:13
@marselcode Because contacts is an array of objects you need to loop through contacts.
Roman Macak
@DrMacak
Feb 26 2016 13:15
Hi, can somebody explain why this is wrong?
function ObjectApple () {
    this.beeper = function () {
        console.log('beep');
    };
    function _beeping() {
       this.beeper();
    }
}
Marsel
@marselcode
Feb 26 2016 13:17
@Masd925
function lookUp(firstName, prop){
// Only change code below this line
if (firstName !== "" && prop !== "" ) {
   return contacts[firstName][prop]; - like this?
David Suilea
@Foryah
Feb 26 2016 13:18
@DrMacak
It's not wrong, it's just that if you define _beeping() like that... it's a private function with the scope inside the ObjectApple
Roman Macak
@DrMacak
Feb 26 2016 13:19
But its not working. Im not able to call public method with the private
Maybe Im doing something wrong
David Suilea
@Foryah
Feb 26 2016 13:19
So, you won't be able to do :
oa = new ObjectApple();
// This will return an error, since you cannot see _beeping from outside the ObjectApple object
oa._beeping();
// This will work, since beeper is a public method
oa.beeper();
Markus Kiili
@Masd925
Feb 26 2016 13:20
This message was deleted
David Suilea
@Foryah
Feb 26 2016 13:20
It's the other way around :)
The _beeping is private, beeper is public :)
Roman Macak
@DrMacak
Feb 26 2016 13:21
I just get that the example is not best. But say I have
``` this.doBeeping () {
Markus Kiili
@Masd925
Feb 26 2016 13:21
@marselcode You have to loop through the contacts array.
Roman Macak
@DrMacak
Feb 26 2016 13:21
this.doBeeping () { _beeping} in the class