These are chat archives for FreeCodeCamp/Help

28th
Feb 2016
William Smith
@wxiv
Feb 28 2016 00:10
I believe I found a way to cheat the system on "Responsive Design with Bootstrap Fluid Containers"
I've been able to pass the challenge without completing the requirement of adding a class called "container-fluid" and nesting all HTML elements inside
Hasham Babar
@hash004
Feb 28 2016 00:12
Hi Guys, I’m having a little css issue for my portfolio page. When you hover over the portfolio projects, a translucant div appears on top but for some reason it’s larger than the thumbnail divs. I can’t seem to figure out why. Any help is appreciated. http://codepen.io/hash004/full/dMydYZ/
slewis185
@slewis185
Feb 28 2016 00:25
I have no idea what theyre asking for in the "word blanks" javascript challenge
can anyone help
Alan Bruce
@alanbruce
Feb 28 2016 00:25
Hi guys!
Daniela
@undefinedsymbol
Feb 28 2016 00:26
@hash004 The width of the .thumbnail-hover:hover class has been set to 100% which means 100% of the surrounding div with class col-lg-4. Try setting the width of .thumbnail-hover:hover to 90%, for example.
slewis185
@slewis185
Feb 28 2016 00:27
nvm figured out my issues
tekac
@tekac
Feb 28 2016 00:29
I seem to be stuck on nesting. I need to create a new p element and nest an a element into it. My code is as follows...
<p>View more <a href="http://freecatphotoapp.com"> cat photos</a></p>
it doesn't appear to be working for some reason
Jason
@gitPhunky
Feb 28 2016 00:32
@tekac it looks right, and it works on codepen for me
tekac
@tekac
Feb 28 2016 00:32
is there a way I can post my entire code without spamming everybody
Jason
@gitPhunky
Feb 28 2016 00:33
if it's an exercise i think you can link to it.
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 00:36
Just a general question: is it possible to change the color scheme of bootstrap without manually changing each class?
tekac
@tekac
Feb 28 2016 00:39
thanks for help @gitPhunky .. i reset the code and tried again and it worked, not sure what was going wrong
CamperBot
@camperbot
Feb 28 2016 00:39
tekac sends brownie points to @gitphunky :sparkles: :thumbsup: :sparkles:
:star: 238 | @gitphunky | http://www.freecodecamp.com/gitphunky
Francis
@Francis-p
Feb 28 2016 00:39
hi, just wondering how do you create a script element?
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 00:40
@Francis-p Is this what you're looking for: <script></script> ?
Francis
@Francis-p
Feb 28 2016 00:40
oh
thanks
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 00:40
np :)
Jason
@gitPhunky
Feb 28 2016 00:40
@TilenPogacnik you can customize one on the actual bootstrap site and download it if you don't want to deal with classes.. http://getbootstrap.com/customize/
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 00:42
@gitPhunky wow this looks awesome! lets you change pretty much every detail
thanks @gitPhunky , have some brownies :D
CamperBot
@camperbot
Feb 28 2016 00:43
tilenpogacnik sends brownie points to @gitphunky :sparkles: :thumbsup: :sparkles:
:star: 239 | @gitphunky | http://www.freecodecamp.com/gitphunky
Jason
@gitPhunky
Feb 28 2016 00:44
nomnomnomnonmnom!
Moustachi
@Moustachi
Feb 28 2016 00:47
hey folks, was wondering if i can add "id" by putting <form [id="cat-photo-app"] action="/submit-cat-photo">
Shayan Javadi
@ShayanJavadi
Feb 28 2016 00:47
How would I go by adding boxes that link to my projects ? I see people other people's portfolios with it , but I have no idea how to fit 9 boxes. could someone point me in the right direction. Here's what I have so far : http://codepen.io/dunkelheit/pen/JXjMQE/?editors=1100
Luis Alejandro Brito Blanco
@britoblanco
Feb 28 2016 00:47
Hi guys a little help with the Golf Code challenge
function golfScore(par, strokes) {
if(strokes == 1){
return "Hone-in-one!";
} else if (strokes <= par -2){
return "Eagle";
} else if (strokes == par -1){
return "Birdie";
} else if (strokes == par){
return "Par";
} else if (strokes == par + 1){
return "Bogey";
} else if (strokes == par + 2){
return "Double Bogey";
} else if (strokes >= par + 3){
return "Go Home!";
}
}
Whats wrong with my code?
Aled Wassell
@aledwassell
Feb 28 2016 00:48
Hey guys, hello world
Luis Alejandro Brito Blanco
@britoblanco
Feb 28 2016 00:48
@aledwassell Hello welcome!
William Smith
@wxiv
Feb 28 2016 00:49
@britoblanco do you get an error message?
77githubfrank
@77githubfrank
Feb 28 2016 00:50
HI Everyone, Thanks firs of all, God for providing and opportunity to learn. I am looking forward to be part of this group and learn as much as I can help others. Thank you guys for the great community.
Aled Wassell
@aledwassell
Feb 28 2016 00:51
Im just starting the tutorials for free code camp but don't want to sound too big headed but i kind of already know the first parts
I want something more challenging, is there anyway i can skip ahead?
Luis Alejandro Brito Blanco
@britoblanco
Feb 28 2016 00:52
@whsmithiv No, it just doesn't pass, it has every test on green except for these two which are not met: golfScore(4, 1) should return "Hole-in-one!" and golfScore(1, 1) should return "Hole-in-one!"
@whsmithiv They do return the "Hole-in-on!" but I don't know what I'm missing
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 00:52
@aledwassell you can skip ahead, mandatory challenges are marked with a "*"
William Smith
@wxiv
Feb 28 2016 00:52
@britoblanco return "Hone-in-one!"; might be an issue
@britoblanco You have "Hone" being returned
Luis Alejandro Brito Blanco
@britoblanco
Feb 28 2016 00:53
@whsmithiv Omg haha I feel so dumb, thank you!
CamperBot
@camperbot
Feb 28 2016 00:53
britoblanco sends brownie points to @whsmithiv :sparkles: :thumbsup: :sparkles:
:star: 81 | @whsmithiv | http://www.freecodecamp.com/whsmithiv
William Smith
@wxiv
Feb 28 2016 00:53
You're welcome.
Aled Wassell
@aledwassell
Feb 28 2016 00:54
how do i skip ahead on the tutorials, i want something more challenging
i am at the beggining
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 00:54
@aledwassell click on map in the upper right corner, it should open a list of all challenges
Hasham Babar
@hash004
Feb 28 2016 01:00
@undefinedsymbol Hi, thanks, I tried that but it looks weird when I resize the window smaller
CamperBot
@camperbot
Feb 28 2016 01:00
hash004 sends brownie points to @undefinedsymbol :sparkles: :thumbsup: :sparkles:
:star: 402 | @undefinedsymbol | http://www.freecodecamp.com/undefinedsymbol
Aled Wassell
@aledwassell
Feb 28 2016 01:01
thanks @TilenPogacnik
CamperBot
@camperbot
Feb 28 2016 01:01
aledwassell sends brownie points to @tilenpogacnik :sparkles: :thumbsup: :sparkles:
:star: 158 | @tilenpogacnik | http://www.freecodecamp.com/tilenpogacnik
philipsiu
@philipsiu
Feb 28 2016 01:16
Can anyone help with the challenge "Caesars Cipher"?
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 01:20
I'm just starting with javascript algorithm challenges. how can I output some text to see how my variables are changing? I tried Console.log() but nothing happened
William Smith
@wxiv
Feb 28 2016 01:21
@TilenPogacnik return
Hasham Babar
@hash004
Feb 28 2016 01:21
@TilenPogacnik lower case c for console.log()
William Smith
@wxiv
Feb 28 2016 01:21
^my bad
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 01:23
@hash004 that doesn't work either..
Hasham Babar
@hash004
Feb 28 2016 01:23
can you show me the code
Alan Bruce
@alanbruce
Feb 28 2016 01:23
Please help. How do I turn
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 01:23
or is there another window where it outputs the code?
Hasham Babar
@hash004
Feb 28 2016 01:23
it should display it in the console.
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 01:24

function titleCase(str) {
console.log("test");
str = str.split(" ");
var temp;
for (var i = 0; i < str.length; i++){
temp = str[i].split("");
for (var j = 0; j < temp.length; j++){
if(j === 0){
temp[j] = temp[j].toUpperCase();
} else {
temp[j] = temp[j].toLowerCase();
}

    str[i] = temp.join("");
 }

}
str = str.join("");
}
console.log("test");
titleCase("I'm a little tea pot");

(Ignore the bad code, just a quick sketch :) )

It’s on a different screen try that link to find out the shortcut to access it
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 01:25
@hash004 oooh, I thought it would display in the window on the screen.. Thanks, it works now!
CamperBot
@camperbot
Feb 28 2016 01:25
tilenpogacnik sends brownie points to @hash004 :sparkles: :thumbsup: :sparkles:
:star: 131 | @hash004 | http://www.freecodecamp.com/hash004
William Smith
@wxiv
Feb 28 2016 01:26
@alanbruce Turn what?
Tim Bell
@MindfulBell
Feb 28 2016 01:26
why would a bootstrap accordion menu render properly in my index.html file, but when i put it in my React app.jsx it does not render properly...
George
@GeorgeGidim
Feb 28 2016 01:35
I'm a little confused with this one, I got all the checks but "Add a div element below your h3 element." what does that mean? I
William Smith
@wxiv
Feb 28 2016 01:35
<div> below your <h3>
George
@GeorgeGidim
Feb 28 2016 01:36
<div class="container-fluid">
<div class="row">
<h3 class="text-primary text-center">jQuery Playground</h3>
</div>
</div>
I tried adding <div> <div>
/div*
and all that
still won't uncheck
William Smith
@wxiv
Feb 28 2016 01:37
And you had the opening div below the h3?
George
@GeorgeGidim
Feb 28 2016 01:37
yeah
William Smith
@wxiv
Feb 28 2016 01:38

`<div class="container-fluid">

<div class="row">

<h3 class="text-primary text-center">jQuery Playground</h3>
</div>
</div>`

Hasham Babar
@hash004
Feb 28 2016 01:39
@GeorgeGidim Do you have a link to the challenge?
William Smith
@wxiv
Feb 28 2016 01:39
Accidental submission there...
George
@GeorgeGidim
Feb 28 2016 01:39
Create a Bootstrap Row
its not hard, so I assume its something dumb I'm not seeing
(like always :smile: )
Hasham Babar
@hash004
Feb 28 2016 01:40
You need to create a div with a class of row under your h3 tags @GeorgeGidim
William Smith
@wxiv
Feb 28 2016 01:40
@GeorgeGidim Can confirm, just cleared it with @hash004 's suggestion
George
@GeorgeGidim
Feb 28 2016 01:41
<div class="container-fluid">
<div class="row">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
</div>
</div>
</div>
like that?
or
Hasham Babar
@hash004
Feb 28 2016 01:41
@GeorgeGidim yep
William Smith
@wxiv
Feb 28 2016 01:41
yep
George
@GeorgeGidim
Feb 28 2016 01:41
weird, won't uncheck
Hasham Babar
@hash004
Feb 28 2016 01:42
@GeorgeGidim remove the first div row
William Smith
@wxiv
Feb 28 2016 01:43
@GeorgeGidim and the extra </div>
Hasham Babar
@hash004
Feb 28 2016 01:43
@GeorgeGidim you should only have one div with a class row which should be under your h3

@GeorgeGidim so it will look like this:

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row"></div>
</div>

George
@GeorgeGidim
Feb 28 2016 01:43
derp
ya
got it
Thanks @whsmithiv and @hash004
CamperBot
@camperbot
Feb 28 2016 01:43
georgegidim sends brownie points to @whsmithiv and @hash004 :sparkles: :thumbsup: :sparkles:
:star: 89 | @whsmithiv | http://www.freecodecamp.com/whsmithiv
:star: 132 | @hash004 | http://www.freecodecamp.com/hash004
SirSands
@SirSands
Feb 28 2016 01:45

Hello everybody. I can't seem to change the width of the image in the following code: <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.smaller-image {
width: 100px;
}
.red-text {
color: red;
}

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>

Hasham Babar
@hash004
Feb 28 2016 01:46
@SirSands You need to apply the class smaller-image to the img tag
so it should look something like <img class=“smaller-image”………….
SirSands
@SirSands
Feb 28 2016 01:49
Should it be included within the <style> .....</style> or separate?
William Smith
@wxiv
Feb 28 2016 01:49
@SirSands with the img tag. It's being referenced from the style element
Manish Giri
@Manish-Giri
Feb 28 2016 01:49
@SirSands include it in this
<img src="https://bit.ly/fcc-relaxing-cat”>
Hasham Babar
@hash004
Feb 28 2016 01:50
@SirSands You have the class defined in the style tags. In order to use the class, you have to add it to the elements/tag you want to apply it to so <img class=“smaller-image” src=“https://bit.ly/fcc-relaxing-cat” /> would apply the smaller-image class to the img tag
Matthew Stettner
@mstettner
Feb 28 2016 01:52
what would the code for this look like?
Nest three button elements within each of your div elements with class well.
SirSands
@SirSands
Feb 28 2016 01:53
Thanks guys.
Hasham Babar
@hash004
Feb 28 2016 01:54
@mstettner You will have div tags and within each of divs you will have 3 button tags
Matthew Stettner
@mstettner
Feb 28 2016 01:54
would it look like this
<div class="well">
        <button></button>
@hash004
Hasham Babar
@hash004
Feb 28 2016 01:55
<div class=“well”>
<button></button>
<button></button>
<button></button>
</div>
Matthew Stettner
@mstettner
Feb 28 2016 01:55
what about the button? @hash004
hmmm
Hasham Babar
@hash004
Feb 28 2016 01:55
sorry I pressed enter too quickly @mstettner
Matthew Stettner
@mstettner
Feb 28 2016 01:57
thanks @hash004
CamperBot
@camperbot
Feb 28 2016 01:57
mstettner sends brownie points to @hash004 :sparkles: :thumbsup: :sparkles:
:star: 133 | @hash004 | http://www.freecodecamp.com/hash004
Daniel Bashir
@db7894
Feb 28 2016 02:00
Hi. I'm on the challenge about sizing images in the HTML/CSS portion. I know what code I would need to put in, but can anyone tell me where I should enter it? I tried adding ".smaller-image { width: 100px; }" by itself into the <style> section and that didn't seem to work
Hasham Babar
@hash004
Feb 28 2016 02:00
@db7894 have you applied the smaller-image class to the img tag after?
Daniel Bashir
@db7894
Feb 28 2016 02:02
Ah, that's what I was missing. It worked! Thanks @hash004
CamperBot
@camperbot
Feb 28 2016 02:02
db7894 sends brownie points to @hash004 :sparkles: :thumbsup: :sparkles:
:star: 134 | @hash004 | http://www.freecodecamp.com/hash004
Matthew Stettner
@mstettner
Feb 28 2016 02:10
is this wrong?
<div class="col-xs-6" <h4>#left-well</h4>
Arun Galva
@arungalva
Feb 28 2016 02:11
@mstettner ya you are missing a > bracket after the div
This message was deleted
Matthew Stettner
@mstettner
Feb 28 2016 02:12
<div class="col-xs-6" <h4>#left-well</h4>>
like this? @arungalva
Arun Galva
@arungalva
Feb 28 2016 02:12
@mstettner should look like <div class="col-cs-6><h4>#left-well<h4></div>
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 02:12

@mstettner ```html

<div class="col-xs-6"> <h4>#left-well</h4></div> like this
```

Matthew Stettner
@mstettner
Feb 28 2016 02:13
thanks
Greg
@greggordonsmith
Feb 28 2016 02:13
Hi, I'm on page 13 of the first HTML task, changing font size. It says "create an entry for p elements" inside the same style tag -- this isn't working for me
Arun Galva
@arungalva
Feb 28 2016 02:13
could someone tell me how to have that black background on code ? I am new to this
Matthew Stettner
@mstettner
Feb 28 2016 02:14
<div class="col-xs-6" <h4>#left-well</h4></div>
@arungalva added that but something is still wrong
Hasham Babar
@hash004
Feb 28 2016 02:15
@mstettner
<div class="col-xs-6"> <h4>#left-well</h4></div>
Arun Galva
@arungalva
Feb 28 2016 02:15
@hash004 this looks right
Greg
@greggordonsmith
Feb 28 2016 02:15
how do I create this entry?
Randy
@techtolentino
Feb 28 2016 02:16
@arungalva you need to use css
<style>
  body {background-color: black;}
</style>
Hasham Babar
@hash004
Feb 28 2016 02:16
@arungalva if you click on the M icon on the right of this text box it will show you the markdown to get the code box
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 02:16
@greggordonsmith I think it means you need to add a class
Matthew Stettner
@mstettner
Feb 28 2016 02:16
thanks @hash004
CamperBot
@camperbot
Feb 28 2016 02:16
mstettner sends brownie points to @hash004 :sparkles: :thumbsup: :sparkles:
:warning: mstettner already gave hash004 points
Randy
@techtolentino
Feb 28 2016 02:17
any sorta style that you want to apply to your code will be in-between <style> </style> tags
Greg
@greggordonsmith
Feb 28 2016 02:17
I've been told I lack class. How do I doo that
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 02:17
<style>
p { your css here }
</style>
@greggordonsmith this will change all the p (paragraph) elements
Greg
@greggordonsmith
Feb 28 2016 02:18
Hmm... it specifies to add it within the same <style> tag...
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 02:19
yes, you should have just one style tag
Randy
@techtolentino
Feb 28 2016 02:19
@greggordonsmith so just a rule of thumb, most of the time when they say in between style tags, it means the correct syntax is:
<style>
  styles go here
</style>
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 02:19
so all you need to do is add the p { } part inside
Arun Galva
@arungalva
Feb 28 2016 02:20
This message was deleted
Greg
@greggordonsmith
Feb 28 2016 02:21
well here's what I'm doing - it isn't right btw
<style>
.red-text {
color: red;
p {font-size: 16px;}
}

</style>
Randy
@techtolentino
Feb 28 2016 02:21
you're close!
Greg
@greggordonsmith
Feb 28 2016 02:21
so, brackets within brackets
Randy
@techtolentino
Feb 28 2016 02:21
<style>
  .red-text {
    color: red; 
    }
  p {font-size: 16px;}
</style>
Arun Galva
@arungalva
Feb 28 2016 02:21
This message was deleted
This message was deleted
Greg
@greggordonsmith
Feb 28 2016 02:22
Oh!
Randy
@techtolentino
Feb 28 2016 02:22
@greggordonsmith so what this is saying is... anything with a .red-text class, should be colored red. And anything p tag element (paragraph), should have the font-size of 16px
Greg
@greggordonsmith
Feb 28 2016 02:22
ok. So there can be numerous internal loops like that?
Randy
@techtolentino
Feb 28 2016 02:23
yeah those are all called style rules, basically
Tai Yau
@alextychan
Feb 28 2016 02:23
Quick question on spacing between two elements (HTML), let's say if we have two divs and we place them side by side. What do you guys usually use to space them out? Margin or Padding?
Greg
@greggordonsmith
Feb 28 2016 02:24
thanks very much @techtolentino
CamperBot
@camperbot
Feb 28 2016 02:24
greggordonsmith sends brownie points to @techtolentino :sparkles: :thumbsup: :sparkles:
:star: 141 | @techtolentino | http://www.freecodecamp.com/techtolentino
Arun Galva
@arungalva
Feb 28 2016 02:24
@alextychan I would use margin
Randy
@techtolentino
Feb 28 2016 02:24
@alextychan either can achieve spacing, right
but... margin is more outside of the element, and spacing is within it... if that makes sense
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 02:24
@alextychan I don't have much experience but I would use margin because it adds space outside of the div while padding adds space on the inside of the div
Randy
@techtolentino
Feb 28 2016 02:24
:point_up: exactly
Tai Yau
@alextychan
Feb 28 2016 02:24
@arungalva @techtolentino @TilenPogacnik thanks!
CamperBot
@camperbot
Feb 28 2016 02:24
alextychan sends brownie points to @arungalva and @techtolentino and @tilenpogacnik :sparkles: :thumbsup: :sparkles:
:star: 130 | @arungalva | http://www.freecodecamp.com/arungalva
:star: 142 | @techtolentino | http://www.freecodecamp.com/techtolentino
:star: 178 | @tilenpogacnik | http://www.freecodecamp.com/tilenpogacnik
Tai Yau
@alextychan
Feb 28 2016 02:25
Yeah I know, tho sometimes it is tempting LOL, tho it ain't a good practice
Suomiprogramming
@Suomiprogramming
Feb 28 2016 02:37
how to make label indoor and outdoor? Should I add a class or attribute?
Chady Kamar
@chadykamar
Feb 28 2016 02:39
use the label and input tags
Suomiprogramming
@Suomiprogramming
Feb 28 2016 02:39
I tried to add class and attribute, but it doesn't work
Chady Kamar
@chadykamar
Feb 28 2016 02:40
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
Suomiprogramming
@Suomiprogramming
Feb 28 2016 02:40
ohh
I haven't written Indoor and Outdoor
thanks
Chady Kamar
@chadykamar
Feb 28 2016 02:41
you’re welcome
Suomiprogramming
@Suomiprogramming
Feb 28 2016 02:45
@chadykamar have you passed certifications?
leanliam
@leanliam
Feb 28 2016 02:45
how do i access an image from my picture folder from codepen? i have a mac os x yosemite laptop.
Chady Kamar
@chadykamar
Feb 28 2016 02:49
@Suomiprogramming no I just started
Rachel
@totallyrhombus
Feb 28 2016 02:57
How can I center an image on codepen?
I've tried multiple ways but it stays left-aligned
Rita Alfonso
@alfonsotech
Feb 28 2016 03:00
@totallyrhombus A couple ways, but you can do it in the CSS panel. Info here: https://www.w3.org/Style/Examples/007/center.en.html
Rachel
@totallyrhombus
Feb 28 2016 03:01
@alfonsotech thanks! I put that code within <style> </style> right?
CamperBot
@camperbot
Feb 28 2016 03:01
totallyrhombus sends brownie points to @alfonsotech :sparkles: :thumbsup: :sparkles:
:star: 308 | @alfonsotech | http://www.freecodecamp.com/alfonsotech
Chady Kamar
@chadykamar
Feb 28 2016 03:01
<img src=“whatever” align=“middle”>?
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:02
yes @totallyrhombus
Rita Alfonso
@alfonsotech
Feb 28 2016 03:02
@totallyrhombus If you put the code in the HTML document, you do need to put it between script tags. If you place it in the CSS panel, no script tags are needed.
William Smith
@wxiv
Feb 28 2016 03:03
@totallyrhombus example: http://codepen.io/trevanhetzel/pen/DbEFp
Rita Alfonso
@alfonsotech
Feb 28 2016 03:03
@chadykamar This is in-line styling, and can be done this way, only it's not "middle" but "center".
Rachel
@totallyrhombus
Feb 28 2016 03:04
Ahh, perhaps that's why it's not working. I have everything in script tags
I put it into HTML and it worked! Thanks for the example, @whsmithiv
CamperBot
@camperbot
Feb 28 2016 03:04
totallyrhombus sends brownie points to @whsmithiv :sparkles: :thumbsup: :sparkles:
:star: 95 | @whsmithiv | http://www.freecodecamp.com/whsmithiv
Kush
@Kushal5
Feb 28 2016 03:05
doesnt work.PNG
hey guys can anyone help me with this, i dont see the problem with my css
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:06
try refresfing, kaosh
Kush
@Kushal5
Feb 28 2016 03:07
@madebymtr nope doesnt work
camillestomer
@camillestomer
Feb 28 2016 03:08
Can anyone see my error o_O
blob
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:09
@camillestomer add the class "smaller-image" to your img tag
<img src="path-to-image" class="smaller-image">
camillestomer
@camillestomer
Feb 28 2016 03:10
Thank you!!
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:10
@kaosh try <style>body {background: black; }</style>
NormalWare
@Centuriom
Feb 28 2016 03:12
Hello guys, in the random quote generator exercise, what's the usual code to share some text on twitter using jQuery ?
Mikayla Porter
@mikaylaporter
Feb 28 2016 03:17
Hello, how do I get the "p" tab to say "Hello Paragraph"
Tai Yau
@alextychan
Feb 28 2016 03:17
@Kaosh Try refreshing the page? Everything seems fine
camillestomer
@camillestomer
Feb 28 2016 03:18
<p>Hello Paragraph</p> @mikaylaporter
Mikayla Porter
@mikaylaporter
Feb 28 2016 03:18
Okay, thank you
camillestomer
@camillestomer
Feb 28 2016 03:19
blob
@madebymtr I added "smaller-image"..... still not working is it my style tag?
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:19
what does the red x say under the instructions?
should have green checks for what's good and red x for the errors
tekac
@tekac
Feb 28 2016 03:20
I'm trying to have my h1 element inherit font style & color from my body element. I'm pretty sure i'm supposed to make a class, is this correct?
<style>
body {
background-color: green;
font-family: Monospace;
}

<h1> Hello World </h1>

</style>
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:20
also, remove the img part in the stylesheet
Tai Yau
@alextychan
Feb 28 2016 03:21
@camillestomer you don't need to have a "img" there just ".smaller-image" will do
camillestomer
@camillestomer
Feb 28 2016 03:21
@madebymtr "Your image should be 100 pixels wide. Browser zoom should be at 100%."
@alextychan thank you
CamperBot
@camperbot
Feb 28 2016 03:21
camillestomer sends brownie points to @alextychan :sparkles: :thumbsup: :sparkles:
:star: 87 | @alextychan | http://www.freecodecamp.com/alextychan
camillestomer
@camillestomer
Feb 28 2016 03:21
@madebymtr @alextychan it worked. Thank you both
CamperBot
@camperbot
Feb 28 2016 03:21
camillestomer sends brownie points to @madebymtr and @alextychan :sparkles: :thumbsup: :sparkles:
:warning: camillestomer already gave alextychan points
:star: 58 | @madebymtr | http://www.freecodecamp.com/madebymtr
Tai Yau
@alextychan
Feb 28 2016 03:22
@camillestomer You're welcome :)
Matthew Stettner
@mstettner
Feb 28 2016 03:22
whats wrong with this?
<button class="btn btn-default target" id="target1"><p>#target1></P></button>
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:23
you don't need a p tag inside your button
Matthew Stettner
@mstettner
Feb 28 2016 03:23
you can just write it?
this looks correct
Tai Yau
@alextychan
Feb 28 2016 03:24
@mstettner What's the "#target1" for?
Matthew Stettner
@mstettner
Feb 28 2016 03:24
<button class="btn btn-default target" id="target1">#target1</button>
a button label
or element
Tai Yau
@alextychan
Feb 28 2016 03:24
@mstettner Yup all looks well
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:24
much improved
Matthew Stettner
@mstettner
Feb 28 2016 03:24
thanks @alextychan
CamperBot
@camperbot
Feb 28 2016 03:24
mstettner sends brownie points to @alextychan :sparkles: :thumbsup: :sparkles:
:star: 88 | @alextychan | http://www.freecodecamp.com/alextychan
Tai Yau
@alextychan
Feb 28 2016 03:25
@mstettner You're welcome :) tho you did all the work ;)
Rachel
@totallyrhombus
Feb 28 2016 03:26
blob
anyone know why everything suddenly disappeared?
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:27
you're putting your html in the CSS tab
everything from <h1> on down should go in the HTML box
Rachel
@totallyrhombus
Feb 28 2016 03:28
I didn't realize I was supposed to keep them in separate tabs!
thanks @madebymtr
CamperBot
@camperbot
Feb 28 2016 03:28
totallyrhombus sends brownie points to @madebymtr :sparkles: :thumbsup: :sparkles:
:star: 59 | @madebymtr | http://www.freecodecamp.com/madebymtr
11wrx
@11wrx
Feb 28 2016 03:29

<button><i class="fa fa-thumbs-up btn btn-block btn-primary">Like</i></button>

anyone know why my "fa-thumbs-up" icon is NOT within my like button?

Tai Yau
@alextychan
Feb 28 2016 03:31
@11wrx everything behind fa-thumbs-up should be in a class="..." if I am not mistaken
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:31
looks like a bootstrap project to me
lol
11wrx
@11wrx
Feb 28 2016 03:31
it is bootstrap
gloriousjob
@gloriousjob
Feb 28 2016 03:31
@11wrx Try putting the </i> before the Like
@11wrx Also, I think your button needs to have the button classes while the i needs the fa classes
Tai Yau
@alextychan
Feb 28 2016 03:32
@11wrx I think it should be this <button class ="btn btn-block btn-primary">
11wrx
@11wrx
Feb 28 2016 03:33
@gloriousjob it has classes i just didn't include that in my paste
gloriousjob
@gloriousjob
Feb 28 2016 03:33
@11wrx They're mixed together in the i list. i is for the icon, not for the button
11wrx
@11wrx
Feb 28 2016 03:34
@gloriousjob so include all the classes in the i list?
gloriousjob
@gloriousjob
Feb 28 2016 03:34
@11wrx That's what your paste already has... you need to the button ones out
Tai Yau
@alextychan
Feb 28 2016 03:34
@11wrx dude, the "btn btn-clock btn-primary" is only for the buttons, not for the <i> tag
gloriousjob
@gloriousjob
Feb 28 2016 03:35
*take the button ones out
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:35
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i>Like</button>
gloriousjob @gloriousjob was trying not to give away the answer...
11wrx
@11wrx
Feb 28 2016 03:38

thanks @madebymtr

that worked. I was just putting it in the wrong place. :(

CamperBot
@camperbot
Feb 28 2016 03:38
11wrx sends brownie points to @madebymtr :sparkles: :thumbsup: :sparkles:
:star: 65 | @madebymtr | http://www.freecodecamp.com/madebymtr
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:38
i usually do that as well.
11wrx
@11wrx
Feb 28 2016 03:38
thanks @gloriousjob
CamperBot
@camperbot
Feb 28 2016 03:38
11wrx sends brownie points to @gloriousjob :sparkles: :thumbsup: :sparkles:
:star: 138 | @gloriousjob | http://www.freecodecamp.com/gloriousjob
11wrx
@11wrx
Feb 28 2016 03:38
thanks @alextychan
CamperBot
@camperbot
Feb 28 2016 03:38
11wrx sends brownie points to @alextychan :sparkles: :thumbsup: :sparkles:
:star: 92 | @alextychan | http://www.freecodecamp.com/alextychan
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:38
no problem, bootstrap stuff can be a bit tedius
tedious*
Tai Yau
@alextychan
Feb 28 2016 03:38
no prob
Gotta love bootstrap, never knew it existed, made life so much simpler
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:39
oh man, i loathe bootstrap
but it's good to know/learn
Manish Giri
@Manish-Giri
Feb 28 2016 03:39
@alextychan at some point you’ll realize that everything that bootstrap does, it’s more fun to do it yourself! Till then, happy learning!
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:40
yeah, i build my own frameworks for the most part. never been a fan of 15 classes attached to an element lol
Manish Giri
@Manish-Giri
Feb 28 2016 03:40
lol
Tai Yau
@alextychan
Feb 28 2016 03:40
@Manish-Giri @madebymtr LOL, alright thanks for the advice
CamperBot
@camperbot
Feb 28 2016 03:40
alextychan sends brownie points to @manish-giri and @madebymtr :sparkles: :thumbsup: :sparkles:
:star: 66 | @madebymtr | http://www.freecodecamp.com/madebymtr
:star: 680 | @manish-giri | http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Feb 28 2016 03:40

never been a fan of 15 classes attached to an element

this should be in “quote of the day”!

Michael Thomas Richards
@madebymtr
Feb 28 2016 03:41
lol
NormalWare
@Centuriom
Feb 28 2016 03:43
Guys how can i put a tweet it button to my page
please, this thing is harder than FORTRAN
Franco Zapata
@Francozt01
Feb 28 2016 03:49
@Centuriom use google StackOverFlow
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:49
twitter probably has the documentation too
Rita Alfonso
@alfonsotech
Feb 28 2016 03:54
This message was deleted
NormalWare
@Centuriom
Feb 28 2016 03:56
@alfonsotech oh thanks dude i'll give it a look
CamperBot
@camperbot
Feb 28 2016 03:56
centuriom sends brownie points to @alfonsotech :sparkles: :thumbsup: :sparkles:
:star: 309 | @alfonsotech | http://www.freecodecamp.com/alfonsotech
Tai Yau
@alextychan
Feb 28 2016 03:56
Is it worth the time to look at how bootstrap works in general? Like at their source code...
Rita Alfonso
@alfonsotech
Feb 28 2016 03:57
<--- dudette :-)
Tai Yau
@alextychan
Feb 28 2016 03:57
@alfonsotech sweet site
Rita Alfonso
@alfonsotech
Feb 28 2016 03:58
@alextychan thanks! :sparkling_heart:
CamperBot
@camperbot
Feb 28 2016 03:58
alfonsotech sends brownie points to @alextychan :sparkles: :thumbsup: :sparkles:
:star: 107 | @alextychan | http://www.freecodecamp.com/alextychan
Michael Thomas Richards
@madebymtr
Feb 28 2016 03:58
@alextychan absolutely yes, lots of companies/startups/etc use bootstrap
Tai Yau
@alextychan
Feb 28 2016 04:00
@madebymtr thx, I will definitely look into it.
CamperBot
@camperbot
Feb 28 2016 04:00
alextychan sends brownie points to @madebymtr :sparkles: :thumbsup: :sparkles:
:warning: alextychan already gave madebymtr points
anthonygallina1
@anthonygallina1
Feb 28 2016 04:02
@madebymtr Hi
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:03
yo
anthonygallina1
@anthonygallina1
Feb 28 2016 04:03
@madebymtr Do you know where the San Gabriel mountians are? Finaly met some body from close by.
Matthew Stettner
@mstettner
Feb 28 2016 04:04
very confused about what this is asking
<script>
  $(document).ready(funcion()){

                    });
</script>
Franco Zapata
@Francozt01
Feb 28 2016 04:04
@mstettner when the document is ready execute the code inside
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:04
of course @anthonygallina1
Matthew Stettner
@mstettner
Feb 28 2016 04:05
@Francozt01 not sure what you mean
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:05
thi is javascript, @mstettner
Manish Giri
@Manish-Giri
Feb 28 2016 04:05
@mstettner what s the question
anthonygallina1
@anthonygallina1
Feb 28 2016 04:05
@madebymtr Good to meet you.
Matthew Stettner
@mstettner
Feb 28 2016 04:05
You should add $(document).ready(function() { to the beginning of your script element.
Close your $(document).ready(function() { function with });
@Manish-Giri
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:06
you spelled function wrong
Franco Zapata
@Francozt01
Feb 28 2016 04:06
<script>
  $(document).ready(funcion()){
            write ur functions or Jquery code here..      and they will be executed when the document has already loaded   
       });
</script>
Manish Giri
@Manish-Giri
Feb 28 2016 04:06
@mstettner typo in function
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:07
.ready(function()
also you have an extra closing parentheses in your function call
Matthew Stettner
@mstettner
Feb 28 2016 04:07
What does all this mean?
write ur functions or Jquery code here.. and they will be executed when the document has already loaded
Tai Yau
@alextychan
Feb 28 2016 04:09
@mstettner check your spelling for "function"
Franco Zapata
@Francozt01
Feb 28 2016 04:10
@mstettner have u reached Js yet?
Matthew Stettner
@mstettner
Feb 28 2016 04:10
<script>
  $(document).ready(function() {

  });
</script>
does this look correct?
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:10
there you go
Tai Yau
@alextychan
Feb 28 2016 04:10
Yup it looks good
Franco Zapata
@Francozt01
Feb 28 2016 04:10
yes
Matthew Stettner
@mstettner
Feb 28 2016 04:10
okay so where does this go?
$("button").addClass("animated bounce");
Franco Zapata
@Francozt01
Feb 28 2016 04:11
@mstettner at the bottom of ur HTML code before the close </body> tag
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:11
inside the { }
Tai Yau
@alextychan
Feb 28 2016 04:12
Quick question, where does the script tag usually go to for jQuery and javascript. I remember seeing an example where they placed it at the end of body or something like that. Not sure if it was a script tag or a link tag...
Matthew Stettner
@mstettner
Feb 28 2016 04:12
thanks @madebymtr
CamperBot
@camperbot
Feb 28 2016 04:12
mstettner sends brownie points to @madebymtr :sparkles: :thumbsup: :sparkles:
:star: 67 | @madebymtr | http://www.freecodecamp.com/madebymtr
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:12
the questions you're asking are just the beginning of what will be a very important part to learn, make sure you read the teaching and get an understanding @mstettner
Matthew Stettner
@mstettner
Feb 28 2016 04:12
thanks @Francozt01 @Manish-Giri
CamperBot
@camperbot
Feb 28 2016 04:12
mstettner sends brownie points to @francozt01 and @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 681 | @manish-giri | http://www.freecodecamp.com/manish-giri
:star: 560 | @francozt01 | http://www.freecodecamp.com/francozt01
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:13
@alextychan most people place their scripts before the closing </body> tag
Matthew Stettner
@mstettner
Feb 28 2016 04:13
@madebymtr I have been reading all the lessons and following along as closely as possible. is there readings that I am missing?
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:14
no, i'm sure it's fine
javascript is just important and can be frustrating
Franco Zapata
@Francozt01
Feb 28 2016 04:14
u can search in google when u have a doubt or go to youtube for tutorials
Tai Yau
@alextychan
Feb 28 2016 04:14
@madebymtr Noted
Shayan Javadi
@ShayanJavadi
Feb 28 2016 04:15
@madebymtr to rephrase that, it will most certainly be frustrating
a lot
Matthew Stettner
@mstettner
Feb 28 2016 04:15
@madebymtr how can I gain a better grasp on what i am learning? i feel as though I am just going through the motions and not sure exactly what I am doing.
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:15
there's all sorts of sites like this one, as well as books
it's a programming language, so it will appear different to html and css
anthonygallina1
@anthonygallina1
Feb 28 2016 04:16
@alextychan i like to put mine at the end before the closing body tag so the rest of the page loads first But some say it doesnt make a difference in head the head tags or the bottom
Matthew Stettner
@mstettner
Feb 28 2016 04:16
Should I have a better grasp f what Im doing at this point?
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:16
no, you're doing fine
Matthew Stettner
@mstettner
Feb 28 2016 04:16
I feel very overwhelmed
Tai Yau
@alextychan
Feb 28 2016 04:16
If you want to be frustrated why not try web dev using machine language
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:16
it's gonna feel overwhelming
Matthew Stettner
@mstettner
Feb 28 2016 04:17
okay so its normal to be like wtf is going on lol
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:17
oh man, constantly
things are gonna break and you're gonna pound your head against a wall. but keep at it
Matthew Stettner
@mstettner
Feb 28 2016 04:17
great glad im not the only one
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:17
it might take 15 minutes, it might take two days
but when you reach that "a-ha!" moment, it's kinda worth it
Tai Yau
@alextychan
Feb 28 2016 04:17
@anthonygallina1 Hmm makes sense for the page to load before all the responsive stuff comes into play
Matthew Stettner
@mstettner
Feb 28 2016 04:17
and why should I keep moving forward with the most confusing thing I have ever learned lol?
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:18
haha cause if you're looking for a career in this, that confusing thing is where the jobs are
Matthew Stettner
@mstettner
Feb 28 2016 04:18
not even sure where this is taking me
Tai Yau
@alextychan
Feb 28 2016 04:18
@mstettner It's like drinking coffee, it's bitter at the start and get's better at the end with time
Matthew Stettner
@mstettner
Feb 28 2016 04:18
lol this is true. I would like a career in coding so I guess ill continue to take this one day at a time
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:19
the great thing about javascript is that it can open so many paths
Matthew Stettner
@mstettner
Feb 28 2016 04:19
"that confusing thing is where the jobs are"
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:19
especially with things like react becoming popular, but that's getting ahead of ourselves
Matthew Stettner
@mstettner
Feb 28 2016 04:19
is react part of java script?
Jerry Batorski
@jarekb84
Feb 28 2016 04:20
react is just a framework built on javascript
Matthew Stettner
@mstettner
Feb 28 2016 04:20
okay
Jerry Batorski
@jarekb84
Feb 28 2016 04:20
to an extent, similar to things like ember, angular, aurelia, ect..
Matthew Stettner
@mstettner
Feb 28 2016 04:21
is free code camp a good place for me to be starting to learn code?
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:21
yes
Jerry Batorski
@jarekb84
Feb 28 2016 04:21
it makes building applications a bit easier by laying out some common components
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:21
i tell you what, i've been around a lot of these online learning sites, and this is by far one of the best communities
and it's free.
Matthew Stettner
@mstettner
Feb 28 2016 04:22
seems like a great community so far. people have been very helpful and encouraging
i feel like a huge newb!
Chris Davis
@chrisdav6
Feb 28 2016 04:22
@madebymtr i agree. The communication platform with gitter is invaluble
gregory
@essxiv
Feb 28 2016 04:22
Your p element should contain the first few words of the provided additional kitty ipsum text.
not working..?
CodingwithGreenTea
@CodingwithGreenTea
Feb 28 2016 04:25
For the Twitch API, can someone help me understand why my array isn't working inside the $.getJSON function?
 for (i = 0; i < streamers.length; i++) {
    var currentStreamer = streamers[i];
    console.log(currentStreamer); //prints list of all streamers

    $.getJSON(endpointURL + streamers[i], function(json) {
      var isStreaming = json.stream;
      console.log(currentStreamer); //prints list of only last streamer in array

      if (isStreaming) {
        var streamer = json.stream.channel.name,
          streamTitle = json.stream.channel.status,
          streamImage = json.image,
          game = json.stream.game;
          //do stuff
Matthew Stettner
@mstettner
Feb 28 2016 04:39
Only add one class with each of your three selectors. ```html
<script>
  $(document).ready(function() {
    $("button").addClass("animated");
    $(".btn").addClass("shake");
    $("#target1").addClass("animated shake btn-primary");

  });
</script>
any ideas?
should i have multiple $("#target1")
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:43
i'm not that far in the exercise, but why not add two of those classes in #target1 directly into the html itself?
Matthew Stettner
@mstettner
Feb 28 2016 04:45
not sure how I would do that.. @madebymtr
Your #target1 element should have the classes animated‚ shake and btn-primary.
this is what it is saying I need to do
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:47
if it's <button id="target1" class="btn">
then you're already adding one each
since you're calling the same element 3 times
Matthew Stettner
@mstettner
Feb 28 2016 04:47
and from what I can tell i do
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:47
so just add "btn-primary"
Chris Davis
@chrisdav6
Feb 28 2016 04:47
yup, your syntax looks correct for adding multiple classes
Matthew Stettner
@mstettner
Feb 28 2016 04:48
so Im cofused what I am missing
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:48
remove animated and shake from the #target1 .addClass()
Matthew Stettner
@mstettner
Feb 28 2016 04:49
I remaoved it
<script>
  $(document).ready(function() {
    $("button").addClass("animated");
    $(".btn").addClass("shake");
    $("#target1").addClass("btn-primary");


</script>
but its asking for:
Your #target1 element should have the classes animated‚ shake and btn-primary.
so now arent I missing animated and shake?
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:50
what does the html look like
Matthew Stettner
@mstettner
Feb 28 2016 04:50
heres everything
<script>
  $(document).ready(function() {
    $("button").addClass("animated");
    $(".btn").addClass("shake");
    $("#target1").addClass("btn-primary");


</script>

<!-- Only change code above this line. -->

<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>
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:50
alright perfect
here
so line by line, you're saying to jquery "hey, when the document is ready, find the <button> element, and give it a class of "animated". also, find any element with the class of "btn" and add "shake" to it, too. while we're there, find the element with the ID of "target1" and give it a class of "btn-primary"
swissricola
@swissricola
Feb 28 2016 04:51
can anyone help me with switch statements?
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:51
in this instance, since the html says <button class="btn btn-default target" id="target1"> you can see how jquery is doing all three things
Matthew Stettner
@mstettner
Feb 28 2016 04:51
@madebymtr okay that makes sense
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:51
it's found button, it has the class of .btn, and it has the id of #target1
swissricola
@swissricola
Feb 28 2016 04:52
function myTest(val) {
  var answer = "";
  // Only change code below this line

  if (val === "bob") {
    answer = "Marley";
  } else if (val === 42) {
    answer = "The Answer";
  } else if (val === 1) {
    answer = "There is no #1";
  } else if (val === 99) {
    answer = "Missed me by this much!";
  } else if (val === 7) {
    answer = "Ate Nine";
  }




  switch (answer) {
    case "bob":
      answer = "Marley";
      break;

    case "42":
      answer = "There is no #1";
      break;

    case "99":
      answer = "Missed me by this much!";
      break;

    case "7":
      answer = "Ate Nine";
      break;








  }






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

// Change this value to test
myTest(7);
having some trouble with this
Chris Davis
@chrisdav6
Feb 28 2016 04:52
@mstettner looks like you are missing the end }); of you $(document).ready function
Matthew Stettner
@mstettner
Feb 28 2016 04:52
@madebymtr do i need to add something into my html so j query can find it
Robert Valmassoi
@valmassoi
Feb 28 2016 04:52
Screen Shot 2016-02-27 at 8.52.19 PM.png
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:53
no, you should be good, @mstettner
Robert Valmassoi
@valmassoi
Feb 28 2016 04:53
not accepting my answer?
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:53
did you test it
Robert Valmassoi
@valmassoi
Feb 28 2016 04:53
i have smallestCommons([1, 5]);
Chris Davis
@chrisdav6
Feb 28 2016 04:53
$(document).ready(function() {
code
});
Matthew Stettner
@mstettner
Feb 28 2016 04:53
BINGO! thats what i was missing
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:53
:+1:
Matthew Stettner
@mstettner
Feb 28 2016 04:53
thanks @madebymtr
CamperBot
@camperbot
Feb 28 2016 04:54
mstettner sends brownie points to @madebymtr :sparkles: :thumbsup: :sparkles:
:warning: mstettner already gave madebymtr points
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:54
so yeah, one of the main concepts of coding is DRY. (Don't repeat yourself)
it was asking you to do it in a way that wasn't redundant
Matthew Stettner
@mstettner
Feb 28 2016 04:55
@madebymtr why was it asking for this though: isnt this still missing from my code?
Your #target1 element should have the classes animated‚ shake and btn-primary.
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:55
no
Matthew Stettner
@mstettner
Feb 28 2016 04:55
<script>
  $(document).ready(function() {
    $("button").addClass("animated");
    $(".btn").addClass("shake");
    $("#target1").addClass("btn-primary");
     });


</script>
Chris Davis
@chrisdav6
Feb 28 2016 04:55
@swissricola use a switch();
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:55
because your target 1 is a button with a class of .btn
so the other two lines of jquery were taking care of that for you
Matthew Stettner
@mstettner
Feb 28 2016 04:55
but it only has the one class "btn-primary"
swissricola
@swissricola
Feb 28 2016 04:55
can anyone aid me with switch statements
Matthew Stettner
@mstettner
Feb 28 2016 04:56
isnt it still missing shake and animated?
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:56
no
animated was added to every single <button> element
and shake was added to every element with a class of .btn
if you look at your html, that's all of them, INCLUDING the one button with the id of Target1
Matthew Stettner
@mstettner
Feb 28 2016 04:56
@madebymtr wow wow wow. Its so hard to wrap my brian around this. I
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:57
think of it this way
Matthew Stettner
@mstettner
Feb 28 2016 04:57
so what I was trying to do was redundant?
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:57
if i said, every boy gets five dollars. then i said okay if your name is matthew you get five more dollars
you would have 10 dollars
Matthew Stettner
@mstettner
Feb 28 2016 04:58
yep
Chris Davis
@chrisdav6
Feb 28 2016 04:58
@swissricola
switch(var) {
case 1 :
doSomething;
break;
case 2:
doSomethingElse;
break;
default:
doTheDefault;
}
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:58
you were basically adding classes that already existed, thanks to your two previous lines of code
Matthew Stettner
@mstettner
Feb 28 2016 04:59
yeah. the way the instructions were putting it made it seem like I had to add those elements
to #target
Michael Thomas Richards
@madebymtr
Feb 28 2016 04:59
yeah that was a gotcha, to get you to look at your code and see if you could figure out why
Matthew Stettner
@mstettner
Feb 28 2016 04:59
I guess i just more of an understanding to process exactly what the instructions mean
gotta be i a super logical mindset
Patrick
@pwcsquared
Feb 28 2016 05:08
hey guys, I have a question about the api projects. I'm trying to get a simple XMLHttpRequest working in codepen but my calls don't go through because my cross-origin request is getting blocked. I'm not really sure what that means, does anyone know a way around it?
Daniel Bashir
@db7894
Feb 28 2016 05:09
I have a question on the Create a Form Element section. I don't understand where to nest a text field element within the form element. Can anyone help/explain?
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:10
@db7894 do they ask for an input with the text type?
Daniel Bashir
@db7894
Feb 28 2016 05:11
@madebymtr Not sure if I understand your question... (yet) I figured it out though.
Matthew Stettner
@mstettner
Feb 28 2016 05:11
does this look correct?
$("#target4").html( <i>target4</i>");
  });
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:12
what was the code, @db7894
@mstettner no
you're missing a quote before <i>
Daniel Bashir
@db7894
Feb 28 2016 05:13

@madebymtr I'm not sure how to post screenshots like the one above, but it's:

<form action="/submit-cat-photo">
<input type="text" placeholder="cat photo URL">
</form>

Matthew Stettner
@mstettner
Feb 28 2016 05:13
how about this
$("target4").html("<i>#target4</i>")
  });
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:14
good stuff, that looks good @db7894 - do you understand what the question asked?
@mstettner it looks backwards.
Matthew Stettner
@mstettner
Feb 28 2016 05:15
@madebymtr really?
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:15
$("#target4).html("<i>target4</i>")
Daniel Bashir
@db7894
Feb 28 2016 05:15
@madebymtr Not really... I'm just at the beginning parts though
Matthew Stettner
@mstettner
Feb 28 2016 05:15
heres the example it gave me
$("h3").html("<i>jQuery Playground</i>");
Patrick
@pwcsquared
Feb 28 2016 05:15
does anyone know how to get api calls to work on codepen?
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:15
right, so in that instance @mstettner jquery was saying "find the h3 element" and add the following inside it
with your example, you need to call the element. there is not element <target4> which is what you wrote down
Chris Davis
@chrisdav6
Feb 28 2016 05:17
@pwcsquared i was searching for issues with xhr requests and codepen and found this, not sure if it will help http://blog.codepen.io/2013/09/23/ajax-codepen/
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:17
you're looking for something with the ID of target4, which is what $("#target4") is
Matthew Stettner
@mstettner
Feb 28 2016 05:17
$("target4").html("#target4</i>")
  });
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:17
okay lets go left to right.
Matthew Stettner
@mstettner
Feb 28 2016 05:18
Im missimg the #
Patrick
@pwcsquared
Feb 28 2016 05:18
@chrisdav6 yeah came across that as well, it's for using pens as resources to access from other pens, but unfortunately not my current issue :P
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:18
you're saying find <target4> and add #target4</i> to it
<target4>#target4</i></target4> is what (in theory) would be produced.
you instead want to do this: $("#target4").html("<i>target4</i>")
Matthew Stettner
@mstettner
Feb 28 2016 05:19
yep gotcha thanks again!!! @madebymtr
CamperBot
@camperbot
Feb 28 2016 05:19
mstettner sends brownie points to @madebymtr :sparkles: :thumbsup: :sparkles:
:star: 68 | @madebymtr | http://www.freecodecamp.com/madebymtr
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:19
that says find the element with #target4 and add <i>target4</i> inside it
L Yeh
@PhotoGeek1
Feb 28 2016 05:21
The jQuery section on freeCodeCamp is short on teaching. What good sources do guys recommend to look at to master jQuery?
Noah Wilkie
@vultureroast
Feb 28 2016 05:22
help when i use the thumbnail component on my image i get really wide white bars on the sides of the image
CamperBot
@camperbot
Feb 28 2016 05:22
no wiki entry for: when i use the thumbnail component on my image i get really wide white bars on the sides of the image
Chris Davis
@chrisdav6
Feb 28 2016 05:23
there is a ton of info out there on jQuery. Youtube tutorials, free sites like codeacademy and codeschool, bunch of good books too
L Yeh
@PhotoGeek1
Feb 28 2016 05:24
@madebymtr thanks!
CamperBot
@camperbot
Feb 28 2016 05:24
photogeek1 sends brownie points to @madebymtr :sparkles: :thumbsup: :sparkles:
:star: 69 | @madebymtr | http://www.freecodecamp.com/madebymtr
Matthew Stettner
@mstettner
Feb 28 2016 05:24
@chrisdav6 does reading a book on it really help. seems like it would be extremly dry. at least with this its hands on
Eduardo Garcia
@eagarcia8
Feb 28 2016 05:25
@mstettner Most books are follow along, and even have some files you can download to get started.
Matthew Stettner
@mstettner
Feb 28 2016 05:25
I can't imagine how anyone can actually understand and memorize everything it takes to be a good coder?
@eagarcia8 interesting
Chris Davis
@chrisdav6
Feb 28 2016 05:25
keeps you sharp on syntax i guess
L Yeh
@PhotoGeek1
Feb 28 2016 05:25
@chrisdav6 which books did you like?
Eduardo Garcia
@eagarcia8
Feb 28 2016 05:25
@mstettner its not about memorization, its more problem solving
Chris Davis
@chrisdav6
Feb 28 2016 05:26
the more you see it...
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:26
repetition
Clifton Choiniere
@crcnum4
Feb 28 2016 05:26
so curious if someone can help me use JSON api data better. I completed my task but I don't like the way I did it. can someone help i'll post the code if someone is able to help. I did the Random Quote Machine zip
L Yeh
@PhotoGeek1
Feb 28 2016 05:26
@eagarcia8 There's a lot of memorization involved
Eduardo Garcia
@eagarcia8
Feb 28 2016 05:26
Most IDEs even have built in documentation for fast pull ups
Matthew Stettner
@mstettner
Feb 28 2016 05:26
its gotta take ten years to get good at this coding stuff
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:26
you say that now
L Yeh
@PhotoGeek1
Feb 28 2016 05:26
As I was going through the algorithms it was reminding me of Organic Chemistry
Matthew Stettner
@mstettner
Feb 28 2016 05:26
the deeper I go, which isnt very deep the more questions I have
L Yeh
@PhotoGeek1
Feb 28 2016 05:27
tons of memorization and lots of problem solving
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:27
it will get easier
you gotta just take it slow and go at your pace
if you feel like you're stuck, google stuff
explore why it works, why got you stuck
what got you stuck*
Matthew Stettner
@mstettner
Feb 28 2016 05:27
Yeah, some of my friends code for a living and they say they are professional googlers
Clifton Choiniere
@crcnum4
Feb 28 2016 05:27
@mstettner I can agree with most of the others. It's mostly about problem solving and getting good at knowing what you can do then how to research it. i don't try to memorize syntax i just know for example that i can sort an array i can look up the function and syntax how to do it anytime
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:27
google is a developers BFF
Eduardo Garcia
@eagarcia8
Feb 28 2016 05:27
@PhotoGeek1 I never really needed to memorize stuff except for the really basic stuff, I love using docs since they have all the info
My method is to learn how to read the documentation haha!
Clifton Choiniere
@crcnum4
Feb 28 2016 05:28
@mstettner you also have to be willing to ask people for help :)
Matthew Stettner
@mstettner
Feb 28 2016 05:28
yeah Ive been doing a good job of asking for help. thanks everyone
Clifton Choiniere
@crcnum4
Feb 28 2016 05:28
I come in here once in a while after completing a task to see how others may have done what I did
L Yeh
@PhotoGeek1
Feb 28 2016 05:28
@eagarcia8 some of the documentation doesn't explain concepts very well. I had to look at youtube videos to decipher the documentation
filter() and arguments come to mind
Clifton Choiniere
@crcnum4
Feb 28 2016 05:29
like right now I'm curious how others handled the API data they pulled for the random quote machine project
@PhotoGeek1 I can agree completely with the filter() command that gave me issues
Matthew Stettner
@mstettner
Feb 28 2016 05:29
@PhotoGeek1 I think the lesson are set up to make you think. They purposely leave stuff out. forcing you to figure it out and ask for help
Eduardo Garcia
@eagarcia8
Feb 28 2016 05:29
@PhotoGeek1 I don't think documentation should even show concepts, you should know the basic concepts, the documentation shows you all the options.
Tikh
@atikh
Feb 28 2016 05:29
i am struggling big time. how can I get the divs to sit next to each other in my thumbnail gallery?
Clifton Choiniere
@crcnum4
Feb 28 2016 05:30
@atikh using inline conventions. are you using bootstrap or not?
Tikh
@atikh
Feb 28 2016 05:30
I am!
I’ve tried the inline, not working :(
Clifton Choiniere
@crcnum4
Feb 28 2016 05:30
look up div - rows and div columns for bootstrap
Eduardo Garcia
@eagarcia8
Feb 28 2016 05:30
@atikh You can also try, float = left on all your divs
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:31
god i hate bootstrap
Clifton Choiniere
@crcnum4
Feb 28 2016 05:31
@atikh col divs nested inside a row div will be placed side by side
L Yeh
@PhotoGeek1
Feb 28 2016 05:31
@mstettner @eagarcia8 I'm more talking about how to use specific functions/methods/whatnot. Some of the documentation is inadequate. The coding landscape is still very much the wild west.
Clifton Choiniere
@crcnum4
Feb 28 2016 05:31
@madebymtr I enjoy it a lot actually makes the initial setup quick then I can tweak it to more of how I want.
L Yeh
@PhotoGeek1
Feb 28 2016 05:32
Did you guys do the intermediate algorithms first or the intermediate front end dev projects first?
Clifton Choiniere
@crcnum4
Feb 28 2016 05:32
@madebymtr I mainly use it cause I suck at positioning
Eduardo Garcia
@eagarcia8
Feb 28 2016 05:32
@atikh If you want to use bootstrap, float is used as pull-left and pull-right
Clifton Choiniere
@crcnum4
Feb 28 2016 05:32
@PhotoGeek1 i've been going one by one down the list.
Palakurthi Durga Kiran Kumar
@durgakiran
Feb 28 2016 05:32
how to make image fit to the screen
Tikh
@atikh
Feb 28 2016 05:33
http://codepen.io/teekers/full/wGvmbe/ this is what I got now :(
Eduardo Garcia
@eagarcia8
Feb 28 2016 05:33
@PhotoGeek1 I can give you that one, I've seen crappy documentation before
Palakurthi Durga Kiran Kumar
@durgakiran
Feb 28 2016 05:33
in html
Tikh
@atikh
Feb 28 2016 05:33
@crcnum4 took your advice! col divs nested inside a row div will be placed side by side
Matthew Stettner
@mstettner
Feb 28 2016 05:33
@PhotoGeek1 in what way do you mean the wild west?
Clifton Choiniere
@crcnum4
Feb 28 2016 05:33
awesome! @atikh glad to have pointed you in the right direction
Tikh
@atikh
Feb 28 2016 05:33
but why are they so small?
Clifton Choiniere
@crcnum4
Feb 28 2016 05:34
You need to tell the system how many columns the col divs are. I can't give you the straight code it's up to you to learn i'm here to point you in the right direction
@atikh use this site to learn how to use the bootstrap grid system.
Tikh
@atikh
Feb 28 2016 05:35
@crcnum4 ahhhh I see what I did wrong! thank you!
CamperBot
@camperbot
Feb 28 2016 05:35
atikh sends brownie points to @crcnum4 :sparkles: :thumbsup: :sparkles:
:star: 279 | @crcnum4 | http://www.freecodecamp.com/crcnum4
Clifton Choiniere
@crcnum4
Feb 28 2016 05:35
anytime :D
Chris Davis
@chrisdav6
Feb 28 2016 05:35
@durgakiran
img {
width: 100%;
}
Clifton Choiniere
@crcnum4
Feb 28 2016 05:36
so anyone here good with API's http://codepen.io/crcnum4/pen/mPdMdO this is my random quote project. I pulled data from the api. however I then put it into an array and accessed the data directly using index's anyone know of a way to pull the api data into an object and access it via dot or bracket notation?
Noah Wilkie
@vultureroast
Feb 28 2016 05:36
can somebody help me. my bootstrap thumbnails aren't working correctly
i get really the bars on the sides are huge
Palakurthi Durga Kiran Kumar
@durgakiran
Feb 28 2016 05:38
@chrisdav6 thanks but if i just want to make the image appear at centre without increasing the width
CamperBot
@camperbot
Feb 28 2016 05:38
durgakiran sends brownie points to @chrisdav6 :sparkles: :thumbsup: :sparkles:
:star: 289 | @chrisdav6 | http://www.freecodecamp.com/chrisdav6
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:39
multiple ways, @durgakiran
Chris Davis
@chrisdav6
Feb 28 2016 05:39
text-align: center; should work. if you changed it to a block level element, use margin: 0 auto;
L Yeh
@PhotoGeek1
Feb 28 2016 05:39
@mstettner coding isn't like like the physical sciences. Languages seem to pop up all the time, which makes programmers or wannabe programmers scramble to learn the next new language. This makes creating documentation/teaching material tough. For example, there's only so many ways to teach basic chemistry concepts, the different kinds of chemical bonds and how atoms share their electron pairs. I'm sure every single one of those ways to teach that concept has been explored and documented . I'm not sure the same can be said when it comes to coding. OR perhaps I'm just so new to it that I haven't learned to decipher the documentation.
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:40
javascript isnt going anywhere. start there. lol
build a foundation. a lot of these languages share the same principles
Clifton Choiniere
@crcnum4
Feb 28 2016 05:42
everyone ignore my request for assistance I overthank the whole think. the item I pulled from the api was an Object so dot notation was already available the entire code section pushing the items into an array was unnecessary.
no sure why but simply posting it here and relooking at it seemed to help. lol
Chris Davis
@chrisdav6
Feb 28 2016 05:44
@crcnum4 awesome! love that feeling when it just comes to you!
L Yeh
@PhotoGeek1
Feb 28 2016 05:45
@madebymtr there just seem to be so many shiny new languages that pop up.
All I wanted to do was learn swift to build an app. There's just more resources for learning javascript than swift. ha.
Clifton Choiniere
@crcnum4
Feb 28 2016 05:46
@chrisdav6 it's one of those love hate things. Love that I figured it out myself. Facepalm worthy that i didn't notice it since now it seems so obvious lol :D
alright onto the weather app!
Michael Thomas Richards
@madebymtr
Feb 28 2016 05:49
the web is still in it's infancy
think about where the internet was 5, 10, 20 years ago
Chris Davis
@chrisdav6
Feb 28 2016 05:53
@crcnum4 good luck man, i hear that one is tricky!
Clifton Choiniere
@crcnum4
Feb 28 2016 05:54
@chrisdav6 thanks i have some ideas mainly it will be figuring out the location and pulling the weather. I think i will need two api's for this. the google location api and a weather api...
CamperBot
@camperbot
Feb 28 2016 05:54
crcnum4 sends brownie points to @chrisdav6 :sparkles: :thumbsup: :sparkles:
:star: 290 | @chrisdav6 | http://www.freecodecamp.com/chrisdav6
Chris Davis
@chrisdav6
Feb 28 2016 05:56
I havent gotten that far, does the lesson use jQuery to initiate the xhr request or strait javascript?
Clifton Choiniere
@crcnum4
Feb 28 2016 05:57
I used Jquery. actually the method that was used by the lesson's didn't work for me i used https://market.mashape.com/dashboard to find the API then their documentation to generate the GET request
Chris Davis
@chrisdav6
Feb 28 2016 05:58
good to know, thanks :+1:
Clifton Choiniere
@crcnum4
Feb 28 2016 05:58
the lesson gives you a very basic concept of it but you will probably need to go through the documentation of the api you choose to use
np
Jason
@gitPhunky
Feb 28 2016 05:59
hello there... my submit button is not disabling when newComment.name is null.. any ideas:
  <label for="commentName" class="col-sm-2 control-label">Your Name</label>
                <div class="col-sm-10">
                  <input type="text" class="form-control" id="commentName" name="commentName" placeholder="Enter Your Name" ng-model="newComment.name" required>
                </div>
<div class="col-sm-offset-2 col-sm-10">
                  <span ng-show="newComment.name.$dirty">test</span>
                  <button type="submit" class="btn btn-primary" ng-disabled="newComment.name.$dirty && newComment.name.$invalid || newComment.comment.$dirty && newComment.comment.$invalid">Submit Comment</button>
              </div>
oh also.. the input carries over to the javascript object.. so no issues there.
Clifton Choiniere
@crcnum4
Feb 28 2016 06:00
@gitPhunky i'd help if i could but i'm not there yet not sure what you doing. hopefully someone else here can help
Rask777
@Rask777
Feb 28 2016 06:01
@gitPhunky Is it Angular?
Jason
@gitPhunky
Feb 28 2016 06:01
@crcnum4 its fine!
@Rask777 it is!
Nikola
@H0g4r
Feb 28 2016 06:02
This message was deleted
Jason
@gitPhunky
Feb 28 2016 06:02
i'm more curious as to whether or not im using the directives correctly
Chris Davis
@chrisdav6
Feb 28 2016 06:02
angular is used right inline the html? Is there no need for a .js file?
Nikola
@H0g4r
Feb 28 2016 06:02
This message was deleted
Jason
@gitPhunky
Feb 28 2016 06:03
i have a seperate js file with the controller for the form
Chris Davis
@chrisdav6
Feb 28 2016 06:03
ahhh
i don;t understand regular expression
how to find a space
CodingwithGreenTea
@CodingwithGreenTea
Feb 28 2016 06:22
The regular expression for a space is \s
So in the function where the regular expression goes, type /\s/ to find the first space, or /\s/g to find all spaces in the string
@CodingwithGreenTea how come "race car" isnt working?
DJ
@qualitymanifest
Feb 28 2016 06:27
@dogis you've got to assign your replace back to something, otherwise you're throwing the replaced value away. str = str.replace(etc....
Yong
@milfordyg
Feb 28 2016 06:28
@qualitymanifest what?
is that .replace(something to be replaced, something replace?)
Palakurthi Durga Kiran Kumar
@durgakiran
Feb 28 2016 06:29
how to give some space between lines or line and image in html
DJ
@qualitymanifest
Feb 28 2016 06:29
@dogis strings are immutable. you can't modify them. so str.replace(/\s/g, '').toLowerCase(); does nothing. you can reassign strings though, so str = str.replace(/\s/g, '').toLowerCase(); will work
Humphrey
@Humphreto
Feb 28 2016 06:29
Hello World!
CamperBot
@camperbot
Feb 28 2016 06:29

welcome to FreeCodeCamp @Humphreto!

Yong
@milfordyg
Feb 28 2016 06:29
@qualitymanifest oh, immutable
thanks @qualitymanifest
CamperBot
@camperbot
Feb 28 2016 06:30
dogis sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1011 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Palakurthi Durga Kiran Kumar
@durgakiran
Feb 28 2016 06:32
how to give some space between lines or line and image in html
Yong
@milfordyg
Feb 28 2016 06:33
@durgakiran try margin?
Chris Davis
@chrisdav6
Feb 28 2016 06:33
@durgakiran add margin or padding to the element you want space between
Abin Chetani
@Abinkumar
Feb 28 2016 06:33
how can i make 100% to text\
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%. this is the question
Palakurthi Durga Kiran Kumar
@durgakiran
Feb 28 2016 06:33
@dogis @chrisdav6 thanks
CamperBot
@camperbot
Feb 28 2016 06:33
durgakiran sends brownie points to @dogis and @chrisdav6 :sparkles: :thumbsup: :sparkles:
:warning: durgakiran already gave chrisdav6 points
:star: 255 | @dogis | http://www.freecodecamp.com/dogis
Abin Chetani
@Abinkumar
Feb 28 2016 06:34
anyone
Humphrey
@Humphreto
Feb 28 2016 06:35
@Abinkumar you try this <style>body{font-size:100%;}</style>
DJ
@qualitymanifest
Feb 28 2016 06:35
@dogis do you understand what \W does?
Yong
@milfordyg
Feb 28 2016 06:35
non work characters?
word*
DJ
@qualitymanifest
Feb 28 2016 06:35
@dogis yep. but underscores are considered a word character
Capt. Sirius
@Sirius2016gy
Feb 28 2016 06:35
for the Profile Lookup challenge, do I "have to" use "for" by force?
Yong
@milfordyg
Feb 28 2016 06:36
**sweat
DJ
@qualitymanifest
Feb 28 2016 06:36

@dogis

A word character is a character from a-z, A-Z, 0-9, including the _ (underscore) character.

so you'll need to get rid of underscores as well

Yong
@milfordyg
Feb 28 2016 06:36
got it @qualitymanifest , thank you very much
CamperBot
@camperbot
Feb 28 2016 06:36
dogis sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:warning: dogis already gave qualitymanifest points
Humphrey
@Humphreto
Feb 28 2016 06:36
@Abinkumar <style>body{font-size:100%;} p{font-size:16px;}</style>
Ronit Chidara
@ronit111
Feb 28 2016 06:36
Hello everyone
Yong
@milfordyg
Feb 28 2016 06:37
hello @ronit111
Humphrey
@Humphreto
Feb 28 2016 06:37
@Abinkumar if it doesnt work give me the link i will try my best
@ronit111 @dogis Hi guys
DJ
@qualitymanifest
Feb 28 2016 06:37
@dogis np :+1:
Chris Davis
@chrisdav6
Feb 28 2016 06:42
@Abinkumar The <h1> would be 100% of the parent container which is 20px. The <p> would be 80% of the parent container of 20px. Hope that helps.
.container {
font-size: 20px;
}

h1 {
font-size: 100%;
}

p {
font-size: 80%;
}

<div class="container">
  <h1>Some Text</h1>
  <p>Some More Text</p>
</div>
Yong
@milfordyg
Feb 28 2016 06:43
@qualitymanifest how to find a single space but excluding tab spaces with regular expression?
DJ
@qualitymanifest
Feb 28 2016 06:44
@dogis you would just use \s without the g (global) flag
HibaKhurshid
@HibaKhurshid
Feb 28 2016 06:44
I don't know how to do the "responsively style radio buttons challenge" I'm super confused to where the <div class="row" goes because there is already one
alihaxor
@alihaxor
Feb 28 2016 06:44
http://www.freecodecamp.com/challenges/using-objects-for-lookups
I can't find the error. please, Help me
// Setup
function phoneticLookup(val) {
  var result = "";

  // Only change code below this line
  var value = val;
  result = lookup[value];
  var lookup = {
    'alpha': 'Adams',
    'bravo': 'Boston',
    'charlie': 'Chicago',
    'delta': 'Denver',
    'echo': 'Easy',
    'foxtrot': 'Frank'
  };

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

// Change this value to test
phoneticLookup("bravo");
DJ
@qualitymanifest
Feb 28 2016 06:44
@dogis you mean you're just trying to find one space, yeah?
Yong
@milfordyg
Feb 28 2016 06:44
if u left out /g, isnt that get only 1st space?
yes
DJ
@qualitymanifest
Feb 28 2016 06:45
@dogis yes, it would just find the first space. so, do you mean you're trying to find a single space repeatedly?
Yong
@milfordyg
Feb 28 2016 06:45
yeah
DJ
@qualitymanifest
Feb 28 2016 06:47
@dogis why? are you just trying to get rid of spaces? what challenge is this for?
camillestomer
@camillestomer
Feb 28 2016 06:47
How do I connect my github to the FCC repository? I've tried to add it over and over...
Yong
@milfordyg
Feb 28 2016 06:48
@qualitymanifest not a challenge, just curious abt that after i read

Matches a single white space character, including space, tab, form feed, line feed. Equivalent to [ \f\n\r\t\v\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff].

For example, /\s\w*/ matches ' bar' in "foo bar."

anshuedu
@anshuedu
Feb 28 2016 06:49
["ate", NaN, "a"]
DJ
@qualitymanifest
Feb 28 2016 06:50
@dogis i imagine you could just replace(/ /, '') instead of using \s, but i've never tried it
anshuedu
@anshuedu
Feb 28 2016 06:50
how to filter NaN from this array - ["ate", NaN, "a"]
Yong
@milfordyg
Feb 28 2016 06:51
@qualitymanifest it works, thank you so much :DD
CamperBot
@camperbot
Feb 28 2016 06:51
dogis sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:warning: dogis already gave qualitymanifest points
DJ
@qualitymanifest
Feb 28 2016 06:51
@dogis yeah that works. see here https://regex101.com/r/gX1mL7/1 i use a space in the regex and a tab in the test string, and it's not highlighted. but here https://regex101.com/r/gX1mL7/2 it is highlighted
Chris Davis
@chrisdav6
Feb 28 2016 06:51
i think this is it...
if(isNaN(var)) {
doSomething();
}
DJ
@qualitymanifest
Feb 28 2016 06:52
@dogis glad to see you're enjoying regex. a lot of people seem to hate it but i think it's fun
anshuedu
@anshuedu
Feb 28 2016 06:52
@chrisdav6 but strings also NaN...
Chris Davis
@chrisdav6
Feb 28 2016 06:52
oh wait, nevermind. that is only to check if var isNaN
Humphrey
@Humphreto
Feb 28 2016 06:52
@HibaKhurshid where is the link of the challenge
Yong
@milfordyg
Feb 28 2016 06:53
@qualitymanifest it doesnt looks fun to me, i just feel that is important and i have to understand it
DJ
@qualitymanifest
Feb 28 2016 06:54
meh, i think it's an satisfying challenge
HibaKhurshid
@HibaKhurshid
Feb 28 2016 06:54
This message was deleted
Humphrey
@Humphreto
Feb 28 2016 06:54
@camillestomer find the FCC respiretory and click on the star. it is similar to bookmarking it
DJ
@qualitymanifest
Feb 28 2016 06:54
@HibaKhurshid radio buttons look like this :radio_button: you're nesting your other buttons with col-xs-6 (which doesn't make sense since they already have col-xs-4)
and with the other buttons, there's three of them. columns are supposed to add up to 12, but if you put col-xs-6 on them that adds up to 18. with your radio buttons, there's 2, so that adds up to 12
HibaKhurshid
@HibaKhurshid
Feb 28 2016 06:57
Thank You @qualitymanifest! I was confused! I got it!
CamperBot
@camperbot
Feb 28 2016 06:57
hibakhurshid sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1012 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Feb 28 2016 06:57
@HibaKhurshid cool :+1: that one gets a lot of people, you're not alone
Mikel Duffy
@mikelduffy
Feb 28 2016 07:20
I just finished the roman numeral converter algo using some crazy switch statements, and although it worked, it wasn't the most elegant code. I found this (http://blog.stevenlevithan.com/archives/javascript-roman-numeral-converter) link on stackoverflow, but I'm having a bit of trouble what the function of "+" is in "+num" and "+digits".. any insights?
just posted to the CodeReview room, but I figure that it's probably more appropriate to ask here...
Tausif Alam
@TausifAlam121
Feb 28 2016 07:20
Your h2 element should be blue.
Ensure that your stylesheet h2 declaration is valid with a semicolon and closing brace.
can someone help?
Michael Thomas Richards
@madebymtr
Feb 28 2016 07:21
h2 {color: blue;}
Tausif Alam
@TausifAlam121
Feb 28 2016 07:21
<style>
<h2> CatPhotoApp </h2>
</style>
how to implement on this code
Michael Thomas Richards
@madebymtr
Feb 28 2016 07:22
<h2>CatPhotoapp</h2> is html
it does not go between <style> tags

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

<h2>CatPhotoApp</h2>

Tausif Alam
@TausifAlam121
Feb 28 2016 07:23
oh alright thanks @madebymtr
CamperBot
@camperbot
Feb 28 2016 07:23
tausifalam121 sends brownie points to @madebymtr :sparkles: :thumbsup: :sparkles:
:star: 70 | @madebymtr | http://www.freecodecamp.com/madebymtr
Marina
@marinakatalina
Feb 28 2016 07:23
yes, thanks @madebymtr 2madebymtr & @TausifAlam121 - I was stuck at the same place as you at the same time haha
woops typo.
Michael Thomas Richards
@madebymtr
Feb 28 2016 07:24
glad to help
Marina
@marinakatalina
Feb 28 2016 07:25
haha seeing it visually actually makes sense corresponding with directions, now. its like leaving a set of instructions prior to h2 that will affect it. . . if that makes any sense.
so, I have a question tho: do you have to place that command on 3 separate lines in order for it to work, or would typing <style> h2 {color: blue;} </style> in the same line suffice, too?
Michael Thomas Richards
@madebymtr
Feb 28 2016 07:28
it would suffice
its just that in all likelihood you will have more than one line of css, so it's meant for readability
some people code like this
h2 {color: blue;}
and some like this:
h2 {
color: blue;
}
Chris Davis
@chrisdav6
Feb 28 2016 07:29
i tend to use the later for readability
Michael Thomas Richards
@madebymtr
Feb 28 2016 07:29
it all gets minified in the end ^_^
Marina
@marinakatalina
Feb 28 2016 07:30
right. okay, thank you :D
Chris Davis
@chrisdav6
Feb 28 2016 07:30
i like to add a space between css selectors as well
Marina
@marinakatalina
Feb 28 2016 07:30
so spacing in code comes down to readability rather than function?
GK
@gktown
Feb 28 2016 07:33
Yeah you could write long lines of code
just go forever, and then hate yourself that you cant really fix anything easily
HeartlessHatter
@MatthewBrannon
Feb 28 2016 07:34
long lines of code is just really hard to look at
rocaportland
@rocaportland
Feb 28 2016 07:34

Does anyone knows how to Create a class called thick-green-border that puts a 10-pixel-wide green border with a style of solid around an HTML element, and apply that class to your cat photo.

Remember that you can apply multiple classes to an element by separating each class with a space within its class

Michael Thomas Richards
@madebymtr
Feb 28 2016 07:34
thats why i have my readable code for dev and then a prod file that is minified
Chris Davis
@chrisdav6
Feb 28 2016 07:35
it does, clean formatting techniques can be a life saver when looking at code you wrote 6 months ago that may need updating
Michael Thomas Richards
@madebymtr
Feb 28 2016 07:35
<style>
.thick-green-border {do what it asks;}
</style>
rocaportland
@rocaportland
Feb 28 2016 07:35
okay
Michael Thomas Richards
@madebymtr
Feb 28 2016 07:35
and then on your photo: <img src="yourphoto" class="thick-green-border">
rocaportland
@rocaportland
Feb 28 2016 07:35

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

}

lets see
Yukti Sareen
@YSAREEN
Feb 28 2016 07:38
hi, I'm trying to create form element.. and I don't know where I'm going wrong. It says Nest your text input element within a form element. This is what I did. <form action ="/submit-cat-photo" <input type="text" placeholder="cat photo URL"> </form>
I get an error, can someone help please
Michael Thomas Richards
@madebymtr
Feb 28 2016 07:38
you didnt close your form
Yukti Sareen
@YSAREEN
Feb 28 2016 07:39
i did
Michael Thomas Richards
@madebymtr
Feb 28 2016 07:39
you did not.
"/submit-cat-photo" <input
Yukti Sareen
@YSAREEN
Feb 28 2016 07:39
got ot
sorry
thanks
rocaportland
@rocaportland
Feb 28 2016 07:40
This is what I did and nothing changed

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

}

</style>

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

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

Michael Thomas Richards
@madebymtr
Feb 28 2016 07:40
you can stack classes within the same class=, @rocaportland
ameyd35a1
@ameyd35a1
Feb 28 2016 07:40
class2="thick-green-border">
class="thick-green-border">
Michael Thomas Richards
@madebymtr
Feb 28 2016 07:41
"smaller-image thick-green-border"
theres no such thing ass class1, class2
so the h2 tag is incorrect as well
meeguustaa
@meeguustaa
Feb 28 2016 07:50

Hello world. I've been trying to complete Basic Javascript task "Stand in Line" but cannot seem to successfully complete all tests. Here is my code:

function queue(arr, item) {
// Your code here
arr = testArr.push(item);
item = testArr.shift();

return item; // Change this line
}

// Test Setup
var testArr = [5,6,7,8,9];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(queue(testArr, 1)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

This works for all tasks except:

  • queue([5,6,7,8,9], 1) should return 5
CamperBot
@camperbot
Feb 28 2016 07:50

welcome to FreeCodeCamp @meeguustaa!

meeguustaa
@meeguustaa
Feb 28 2016 07:50
^I'm thinking this is a bug
DJ
@qualitymanifest
Feb 28 2016 07:56
@meeguustaa don't use testArr. just push into arr, since it was passed into your function. then return the .shift() of arr not testArr
AslamKhan810
@AslamKhan810
Feb 28 2016 07:58

<style>
{
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>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

my font size dosent change for the second P element
can someone help
Michael Thomas Richards
@madebymtr
Feb 28 2016 07:59
you have font-size: 16px in your stylesheet
but you're not telling it what element to apply to
p {font-size: 16px;} will tell it
DhavalThkkar
@DhavalThkkar
Feb 28 2016 07:59
need help
DJ
@qualitymanifest
Feb 28 2016 08:00
:point_up: and you're never doing anything with red-text in your <style> @AslamKhan810
Rita Alfonso
@alfonsotech
Feb 28 2016 08:01
HI all, hi @DhavalThkkar, what do you need help with?
hi @qualitymanifest how are you this fine evening? (or day, as the case may be)?
aoyamacc
@aoyamacc
Feb 28 2016 08:03
This site is really cool
Irene Wong
@irnw
Feb 28 2016 08:04
Hi, I am having problem with the sizing image challenge. tried to insert the code in but was unable to run the test
DJ
@qualitymanifest
Feb 28 2016 08:04
@alfonsotech tired! gotta go to bed, right about now. worked 9 hours today and it's 1am here. thanks for taking over with the help :+1:
CamperBot
@camperbot
Feb 28 2016 08:04
qualitymanifest sends brownie points to @alfonsotech :sparkles: :thumbsup: :sparkles:
:star: 310 | @alfonsotech | http://www.freecodecamp.com/alfonsotech
Rita Alfonso
@alfonsotech
Feb 28 2016 08:04
yw @qualitymanifest :sparkling_heart:
AslamKhan810
@AslamKhan810
Feb 28 2016 08:04
Awesome Thanks @madebymtr
CamperBot
@camperbot
Feb 28 2016 08:04
aslamkhan810 sends brownie points to @madebymtr :sparkles: :thumbsup: :sparkles:
:star: 71 | @madebymtr | http://www.freecodecamp.com/madebymtr
Rita Alfonso
@alfonsotech
Feb 28 2016 08:05
thanks @qualitymanifest
CamperBot
@camperbot
Feb 28 2016 08:05
alfonsotech sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1015 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
meeguustaa
@meeguustaa
Feb 28 2016 08:05

@qualitymanifest So I've modified my code to

arr = arr.push(item);
var removed = arr.shift();

return removed; // Change this line

but now it gives me 'arr.shift is not a function'
I understand that I should keep the function in terms of the argument variables.. but I must be missing something else..

DJ
@qualitymanifest
Feb 28 2016 08:07
@meeguustaa you don't have to assign the push to arr. just arr.push(item); will work
and with that, im out. good night (or day), everybody
meeguustaa
@meeguustaa
Feb 28 2016 08:07
thanks!
Rita Alfonso
@alfonsotech
Feb 28 2016 08:08
be well!
@irnw can you post the code you do have?
Nick Robson
@nickrobson
Feb 28 2016 08:14

@meeguustaa Array#push returns the new array length, so by doing:

arr = arr.push(item);

you're setting arr to a number, and of course 2.shift is not a function.

meeguustaa
@meeguustaa
Feb 28 2016 08:19
@nickrobson Thank you!
CamperBot
@camperbot
Feb 28 2016 08:19
meeguustaa sends brownie points to @nickrobson :sparkles: :thumbsup: :sparkles:
:star: 407 | @nickrobson | http://www.freecodecamp.com/nickrobson
Marina
@marinakatalina
Feb 28 2016 08:26
Alright, i've tried to figure out it out - but i'm not sure what i'm doing wrong: <p>
<a href='http://freecatphotoapp.com'>
cat photos </a>
</p>
or even: <p>
<a href= "http://freecatphotoapp.com" >
cat photos </a>
</p>
Marina
@marinakatalina
Feb 28 2016 08:32
nvm, found a hidden line of code paste twice.
pasted*
Rita Alfonso
@alfonsotech
Feb 28 2016 08:37
@marinakatalina :thumbsup:
Buzz Tarek
@buzzth
Feb 28 2016 08:42
Hey guys, I'm a little confused about how to remove elements in jQuery. I have to remove an html element named target 4, this is my current attempt: $("target4").remove("target4");
clearly its wrong, so any help is appreciated
Rita Alfonso
@alfonsotech
Feb 28 2016 08:47
@buzzth I'm assuming .target4 is a class.
Try $(".target4").remove();
@buzzth or you can paste your code for a closer look...
Buzz Tarek
@buzzth
Feb 28 2016 08:51
@alfonsotech Alright so my issue was that I was adding code in between .remove( ) even though it was sufficient the way it is. Target4 is an id so I also added a #, thank you for your help
CamperBot
@camperbot
Feb 28 2016 08:51
buzzth sends brownie points to @alfonsotech :sparkles: :thumbsup: :sparkles:
:star: 311 | @alfonsotech | http://www.freecodecamp.com/alfonsotech
Rita Alfonso
@alfonsotech
Feb 28 2016 08:51
@buzzth yup! :thumbsup:
Ben McMullan
@benmcm1994
Feb 28 2016 08:57

Can someone help? I'm stuck on a challenge to add a thumbs up to a button. I have to add an i element to the button but i can't seem to figure out how to do it. I currently have it like this

<button i class="fa fa-thumbs-up btn btn-block btn-primary"></i>Like</button>

but its not right...

pmihaic
@pmihaic
Feb 28 2016 08:59
<i class="
Emran Ahmed
@EmranAhmed
Feb 28 2016 09:00
@benmcm1994 you insert a html element as attribute, it should look like <button class=“btn btn-block btn-primary”><i class=“fa fa-thumbs-up”></i></button>
Maulik Darji
@maulikdarji
Feb 28 2016 09:00
@benmcm1994 <button class=" btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i>Like</button>
ameyd35a1
@ameyd35a1
Feb 28 2016 09:00
"i" is an element just like "button". You have used "i" with "button" which is not correct. To make "Like" italics, you have to enclose Like with"i" tags
<button class=" btn btn-block btn-primary"><i class="fa fa-thumbs-up">Like</i></button>
Matthew Stettner
@mstettner
Feb 28 2016 09:01
@mstettner
Hello everyone. I am supposed to build a tribute page. I have absolutely no idea where to start. Any ideas?
if you could point me in the right direction that would be great
Nguyen Quoc Dai Le
@dailepro
Feb 28 2016 09:01
i need help :(
blob
Ben McMullan
@benmcm1994
Feb 28 2016 09:02
Thanks, Emran and Maulik
Maulik Darji
@maulikdarji
Feb 28 2016 09:06
@mstettner Have you checked example project?
@princele $(".well").addClass("animated shake");
Rita Alfonso
@alfonsotech
Feb 28 2016 09:07
@mstettner Start by creating your body tags, then inside that, build out the structure of the page, probably using bootstrap. Do you want to use bootstrap to build it?
Rita Alfonso
@alfonsotech
Feb 28 2016 09:13
Okay, checking out for the night. Happy coding!
pmihaic
@pmihaic
Feb 28 2016 09:41
i need some help
Your p element should have the text "View more " (with a space after it).
<p><a href="http://www.freecatphotoapp.com">cat photos</a> View more </p>
what does it mean a space after it
?
Janardhan-Babu
@Janardhan-Babu
Feb 28 2016 09:46
@pmihaic try <p><a href="http://www.freecatphotoapp.com">cat photos</a> View more </p>
@pmihaic u need to have a space after more and before </p>
Brian
@sludge256
Feb 28 2016 09:47
"View more " should go in the front also
ameyd35a1
@ameyd35a1
Feb 28 2016 09:47
@pmihaic it should be <p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
Brian
@sludge256
Feb 28 2016 09:47
so that on the screen you will see "View more cat photos"
instead of "cat photosView more "
pmihaic
@pmihaic
Feb 28 2016 09:49
thanks!
Connor
@0n-k
Feb 28 2016 09:50
👍🏻
Kenton Ma
@KentonMa
Feb 28 2016 09:52
So I am working on the Seek and Destroyer algorithm. I cannot seem to find a way to access the second and third argument of the function call. Could someone explain? Thanks.
function destroyer(arr) {
  var result = arr;

  result = result.filter(match);

  return result;
}

function match(value, index, array) {
  // i starts at 1 because that is where the first element at which we are trying to destroy is located
  for (var i = 1; i < array.length; i++) {
    if (value === array[i]) {
      return false;
    }
  }

  return true;
}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);
Joshua Swift
@joshuaswift
Feb 28 2016 10:00
hey guys, currently working through the JS section and struggling a little with objects. Could anybody help with the below?


// Setup
function phoneticLookup(val) {
  var result = "";

  // Only change code below this line
var lookup  = {
  "alpha" : "Adams",
  "bravo" : "Boston",
  "charlie" : "Chicago",
  "delta" : "Denver",
  "echo" : "Easy",
  "foxtrot" : "Frank"
};


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

// Change this value to test
phoneticLookup("charlie");
result should return "Chicago" in this case but got nothing so far, any ideas? Thanks
I imagine it's something pretty obvious!
Kenton Ma
@KentonMa
Feb 28 2016 10:02
You are are returning result, which always contains ""
@Joshuaswift Basically, this is your function.
var result = "";
return result;
Joshua Swift
@joshuaswift
Feb 28 2016 10:05
Hmm yeah good point, the challenge says not to change the var = result or the return result; so I'm not sure what to do next
Again probably something obvious but I can't get my head around this one
Kenton Ma
@KentonMa
Feb 28 2016 10:06
@Joshuaswift Try to figure how to access the lookup object and go from there.
Joshua Swift
@joshuaswift
Feb 28 2016 10:07
@KentonMa thanks I'll give it a shot
CamperBot
@camperbot
Feb 28 2016 10:07
joshuaswift sends brownie points to @kentonma :sparkles: :thumbsup: :sparkles:
:star: 264 | @kentonma | http://www.freecodecamp.com/kentonma
Kenton Ma
@KentonMa
Feb 28 2016 10:07
@Joshuaswift No problem. Good luck!
Azrul Zulkifli
@azrulnaut
Feb 28 2016 10:14
This message was deleted
This message was deleted
Azrul Zulkifli
@azrulnaut
Feb 28 2016 10:20

Hi guys and girls, I'm working on the weather report project. As the open source weather API only allows hourly calls, to help me while I'm working on it, I decided to copy the JSON file an upload a copy on dropbox. For some reason, my code doesn't check out.
'''
var apiURL = "https://www.dropbox.com/s/dg2606z3hhpxj9q/weathertest.json?raw=1&callback=?";

function getPosition() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(showPosition);
  }
}

function showPosition(position) {
  $.getJSON(apiURL, function(json) {
    var lat = position.coords.latitude;
    var long = position.coords.longitude;
    var weather = "";
    weather += json.name + ", " 
      + json.weather[0].id + "<br>"
      + json.weather[0].icon + "<br>"
      + json.main.temp + " Kelvin<br>Longitude: " 
      + long + "Latitude: " + lat;
    $('.weather').html(weather);
  });
}

(document).ready(getPosition());

'''
Hope someone could lend a hand.

Bhavesh
@bbhavesh
Feb 28 2016 10:31
Hello Campers
Need help with this lil code here

// Example
var ourStr = "I come first. ";
ourStr += "I come second.";

// Only change code below this line

var myStr = "This is the first sentence. " + "This is the second sentence.";
myStr += "This is the first sentence. " + "This is the second sentence.";

myStr should have a value of This is the first sentence. This is the second sentence.
Use the += operator to build myStr
James Dimitrakopoulos
@JamesDimi
Feb 28 2016 10:35
wow this portofolio page is way too hard. I just dont know how to overlay the backgrounds...
Jason
@gitPhunky
Feb 28 2016 10:36
@bbhavesh the += operator is similar to x = x + y, just shorter, x+=y
@JamesDimi what do you mean overlay :o?
Jurgis Kacens
@jurgenzz
Feb 28 2016 10:37
@gitPhunky i wold never use +=
James Dimitrakopoulos
@JamesDimi
Feb 28 2016 10:37
Jurgis Kacens
@jurgenzz
Feb 28 2016 10:37
would*
Ashwini S
@ashwinis24
Feb 28 2016 10:37
@bbhavesh There need to be a space.
var myStr = "This is the first sentence. ";
myStr += "This is the second sentence.";
James Dimitrakopoulos
@JamesDimi
Feb 28 2016 10:37
do this effect with the backgrounds
ramyomar2020
@ramyomar2020
Feb 28 2016 10:38
<h2 id="cat-photo-app">
Jason
@gitPhunky
Feb 28 2016 10:38
ahh so you use the fixed argument for the background.. so when the div moves up and off the screen, the background image stays "fixed" in place
ramyomar2020
@ramyomar2020
Feb 28 2016 10:38
cant implement it
Bhavesh
@bbhavesh
Feb 28 2016 10:39
@ashwinis24 Thank you so much
CamperBot
@camperbot
Feb 28 2016 10:39
bbhavesh sends brownie points to @ashwinis24 :sparkles: :thumbsup: :sparkles:
:star: 160 | @ashwinis24 | http://www.freecodecamp.com/ashwinis24
Jason
@gitPhunky
Feb 28 2016 10:39
@JamesDimi background-attachment: fixed; is the css code for it
James Dimitrakopoulos
@JamesDimi
Feb 28 2016 10:39
@gitPhunky ahh ok thank you very much! :D
CamperBot
@camperbot
Feb 28 2016 10:39
jamesdimi sends brownie points to @gitphunky :sparkles: :thumbsup: :sparkles:
Bhavesh
@bbhavesh
Feb 28 2016 10:39
@gitPhunky Thank You :-)
CamperBot
@camperbot
Feb 28 2016 10:39
:star: 240 | @gitphunky | http://www.freecodecamp.com/gitphunky
Rachel
@chellybear
Feb 28 2016 10:50
can anyone take a look at my portfolio site and give me some feedback? http://codepen.io/chellybear/full/BKaVxg/ it's super unfinished but want to know if it's alright so far, please and thanks~
axel8591
@axel8591
Feb 28 2016 10:53
@chellybear I see only 2 lines up on black bg
Rachel
@chellybear
Feb 28 2016 10:53
black bg?
Jason
@gitPhunky
Feb 28 2016 10:54
@chellybear looks better than most of what I've seen on here. liking the jumbotron anim.
Thanasis S.
@xakersas
Feb 28 2016 10:55
hello
Rachel
@chellybear
Feb 28 2016 10:55
yaaay okay, i was hoping that was working correctly, thanks @gitPhunky
CamperBot
@camperbot
Feb 28 2016 10:55
chellybear sends brownie points to @gitphunky :sparkles: :thumbsup: :sparkles:
:star: 241 | @gitphunky | http://www.freecodecamp.com/gitphunky
Thanasis S.
@xakersas
Feb 28 2016 10:56
can someone help me resize an image in my pen?
kampoosh
@kampoosh
Feb 28 2016 10:57
hello i recently doing my firstbasic fron end development project can someone give my link to finished projects for other campers?
can someone help me resize the image in the pen?
Nick Robson
@nickrobson
Feb 28 2016 11:01
@xakersas Use the width and height CSS properties.
Jason
@gitPhunky
Feb 28 2016 11:01
@xakersas img src needs to be in quotes! also theres a class called img-responsive which you can use to change your image based on the size of the viewport or you can use the width css property to define it more specifically
ameyd35a1
@ameyd35a1
Feb 28 2016 11:03
@xakersas firstly the image "id" and "src" should be enclosed in double qoutes and secondly in css file you have used "=" to assign width, instead use ":"
Rachel
@chellybear
Feb 28 2016 11:03
i think it's supposed to be container-fluid needs a dash between it
Ashwini S
@ashwinis24
Feb 28 2016 11:04
your code should be like <img class="smaller img-responsive" src=http://i.imgur.com/SBwAL2e.png alt="FF.C Image">
Thanasis S.
@xakersas
Feb 28 2016 11:06
i changed some things
i added the double quotes
used width in css
but nothing
Rachel
@chellybear
Feb 28 2016 11:08
did you add the img-responsive class to your img tag? that should fix it
Jason
@gitPhunky
Feb 28 2016 11:09
@xakersas you used width incorrectly in css.. needs to have a colon not equal sign.. ``width: 500px```
Thanasis S.
@xakersas
Feb 28 2016 11:09
oh
Jason
@gitPhunky
Feb 28 2016 11:09
:p
Thanasis S.
@xakersas
Feb 28 2016 11:09
im feeling bad
:smile:
dumb
Jason
@gitPhunky
Feb 28 2016 11:10
its fine.. everyone usually gets mixed up when first starting since html, css, and js don't follow the same syntax
Thanasis S.
@xakersas
Feb 28 2016 11:10
thanks for your help guys, will probably be here again soon :P
Jason
@gitPhunky
Feb 28 2016 11:11
it's a good place to go to when you're just starting out and get stuck!
Nikhil karkra
@nikuideveloper
Feb 28 2016 11:13
hey guys i need one help
Only add one class with each of your three selectors.
Liam Bang
@Liam345
Feb 28 2016 11:15
function bouncer(arr) {
  // Don't show a false ID to this bouncer.

  arr.filter(function(val){
    return val!==false || val!==null|| val!==0 || val!=="" || val!==undefined ;
  });
  return arr;
}

bouncer([7, "ate", "", false, 9]);
Nguyen Quoc Dai Le
@dailepro
Feb 28 2016 11:15
@maulikdarji Thank a lot ::)
Liam Bang
@Liam345
Feb 28 2016 11:15
Hi what is the problem in this code. I need to filter out all false elements.
is there a way to add a description in the thumbnail without concealing it in an <a> ?
Ashwini S
@ashwinis24
Feb 28 2016 11:29
you can add caption.
Thanasis S.
@xakersas
Feb 28 2016 11:29
how? :)
Jason
@gitPhunky
Feb 28 2016 11:33
@Liam345 dunno if you're still around... but the filter function doesn't modify the original array.. so at the end when you return arr you are returning the original.
Ashwini S
@ashwinis24
Feb 28 2016 11:33
<caption>Some text</caption>
Thanasis S.
@xakersas
Feb 28 2016 11:34
thanks :)
Ashwini S
@ashwinis24
Feb 28 2016 11:34
align it accordingly
Jason
@gitPhunky
Feb 28 2016 11:34
@Liam345 also.. logically it won't filter any item in the array... since it can pass since false !== null is true
@Liam345 you want to use && not ||

TLDR;; ```<script>
function bouncer(arr) {
// Don't show a false ID to this bouncer.

narr = arr.filter(function(val){
return val!==false && val!==null && val!==0 && val!=="" && val!==undefined;
});
return narr;
}

x = bouncer([7, "ate", "", false, 9]);
console.log(x);
</script>
```

Fabian
@carbonbased7
Feb 28 2016 11:37
This message was deleted
This message was deleted
Thanasis S.
@xakersas
Feb 28 2016 11:46
http://codepen.io/xakersas/pen/vGYdJa/ the unordered list bullets are on the far left, why is that happening?
Ashwini S
@ashwinis24
Feb 28 2016 11:51
Use BS grid system
Thanasis S.
@xakersas
Feb 28 2016 11:52
thanks :)
elyazzi
@elyazzi
Feb 28 2016 11:53
dunno why, but when I put <di (yes, only that) they go like intended
Manuele Santoro
@diabolele
Feb 28 2016 11:58
Hi everybody im new
elyazzi
@elyazzi
Feb 28 2016 12:00
hello @diabolele ^^
Yasin Yusuf
@YasinYA
Feb 28 2016 12:01
@diabolele hello welcome to FCC
Manuele Santoro
@diabolele
Feb 28 2016 12:01
@elyazzi how are youi hope its all right how long you are subsribed to fcc
Hello everybody i wish can i help all of you
elyazzi
@elyazzi
Feb 28 2016 12:02
@diabolele subscribed?
I discovered fcc a long time ago but only recently started using it
Manuele Santoro
@diabolele
Feb 28 2016 12:03
Ok hust to know if there is real opportunity to find job ehehhe
UHanczar
@UHanczar
Feb 28 2016 12:04
Hi oll. What's the difference between "http://localhost:63342/elegant/index.html" and "file:///D:/.../index.html", cause page displays differently? And what variant gonna be if it's plased on the server.
elyazzi
@elyazzi
Feb 28 2016 12:05
@UHanczar sorry, can't really help you but what browser are you using?
UHanczar
@UHanczar
Feb 28 2016 12:08
I've tried in different browsers: chrome, opera, safari, ie. And it's the same. With "localhost" it's the same in all of them, but in other case it different in all too
Thanasis S.
@xakersas
Feb 28 2016 12:11
hey how can i allign my list both centered and left
i want one listed item to begin exactly under the last one so the black pin is under the last black pin
this only happens if i have it aligned on the left of the page
i want it this way and the page centered
Bojan
@Baseworking
Feb 28 2016 12:14
hey yall
i really don't understand this
http://www.freecodecamp.com/challenges/create-a-form-element#?solution=%3Clink%20href%3D%22http%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20.red-text%20{%0A%20%20%20%20color%3A%20red%3B%0A%20%20}%0A%0A%20%20h2%20{%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20}%0A%0A%20%20p%20{%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20}%0A%0A%20%20.thick-green-border%20{%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20}%0A%0A%20%20.smaller-image%20{%0A%20%20%20%20width%3A%20100px%3B%0A%20%20}%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%3Cp%3EClick%20here%20for%20%3Ca%20href%3D%22%23%22%3Ecat%20photos%3C%2Fa%3E.%3C%2Fp%3E%0A%0A%3Ca%20href%3D%22%23%22%3E%3Cimg%20class%3D%22smaller-image%20thick-green-border%22%20alt%3D%22A%20cute%20orange%20cat%20lying%20on%20its%20back%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%3C%2Fa%3E%0A%0A%3Cp%3EThings%20cats%20love%3A%3C%2Fp%3E%0A%3Cul%3E%0A%20%20%3Cli%3Ecat%20nip%3C%2Fli%3E%0A%20%20%3Cli%3Elaser%20pointers%3C%2Fli%3E%0A%20%20%3Cli%3Elasagna%3C%2Fli%3E%0A%3C%2Ful%3E%0A%3Cp%3ETop%203%20things%20cats%20hate%3A%3C%2Fp%3E%0A%3Col%3E%0A%20%20%3Cli%3Eflea%20treatment%3C%2Fli%3E%0A%20%20%3Cli%3Ethunder%3C%2Fli%3E%0A%20%20%3Cli%3Eother%20cats%3C%2Fli%3E%0A%3C%2Fol%3E%0A%3Cinput%20type%3D%22text%22%20placeholder%3D%22cat%20photo%20URL%22%3E%0A
Thanasis S.
@xakersas
Feb 28 2016 12:15
i think reading it a few times would help
Coy Sanders
@coymeetsworld
Feb 28 2016 12:15
@xakersas how does the alignment matter?
are you using unordered lists?
Bojan
@Baseworking
Feb 28 2016 12:16
ah yea, i solved it sorry :worried:
Thanasis S.
@xakersas
Feb 28 2016 12:17
yes im using unordered lists
look at the bottom two
i want my list to be like the bottom two but at the middle
@coymeetsworld
ameyd35a1
@ameyd35a1
Feb 28 2016 12:18
@xakersas you can have the alignment left and give margin-left or padding-left style to the "ul" element to bring it to the center
Thanasis S.
@xakersas
Feb 28 2016 12:19
isn't that a kinda ghetto solution?
Ashwini S
@ashwinis24
Feb 28 2016 12:20
you gave left alignment li class="text-left">Discography: Freestyle Productions</li>
<li class="text-left">test2</li>
to bring the list to the center
use text-center
Coy Sanders
@coymeetsworld
Feb 28 2016 12:22
@xakersas what you want to do is not align the list, you want to keep them on the left
put inside a div that's centered
Thanasis S.
@xakersas
Feb 28 2016 12:22
inside where?
Coy Sanders
@coymeetsworld
Feb 28 2016 12:22
adjust the width as necessary
Thanasis S.
@xakersas
Feb 28 2016 12:22
before the <li>'s?
Cris Nagandang
@louger143
Feb 28 2016 12:22

@UHanczar I didn't really get what you ask but the link you put has a different path.

localhost/elegant/index.html - This is to get the index.html where the localhost is located. For example, we have a folder named myFolder under the path C:/. If localhost path is set to myFolder, so the localhost is equal to C:/myFolder/

"file:///D:/.../index.html" - This is to get index.html to this specific path which is D:/.../index.html

so C:/myFolder/elegant/index.html is different from D:/.../index.html

Coy Sanders
@coymeetsworld
Feb 28 2016 12:24
before the <ul> tags
Pedro Figueiredo
@pedronfigueiredo
Feb 28 2016 12:28
Hi, I am stuck with http://www.freecodecamp.com/challenges/no-repeats-please algorithm challenge, any help?
The problem is not the code, it is the math. I cannot reproduce the tests
Coy Sanders
@coymeetsworld
Feb 28 2016 12:29
whats your code @pedronfigueiredo
actually disclaimer haven't gotten that far yet
but i could still probably help
Thanasis S.
@xakersas
Feb 28 2016 12:31
@coymeetsworld http://codepen.io/xakersas/pen/vGYdJa/ i think i did what you told me to?
Coy Sanders
@coymeetsworld
Feb 28 2016 12:33
yeah good start, still need to do more
pboest
@pablobordons
Feb 28 2016 12:34
@pedronfigueiredo Hola Pedro, saludos desde madrid :)
Coy Sanders
@coymeetsworld
Feb 28 2016 12:35
you'll have to do a few more things to the div, probably best to give it an id and change the css of the id
Marsel
@marselcode
Feb 28 2016 12:39

Please help with: Profile Lookup

function lookUp(firstName, prop) {
// Only change code below this line
while (firstName !=="" && prop !=="") {

   contacts[firstName] = prop;

}

   return "No such contact";



   return "No such property";

// Only change code above this line
}

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

suffering
@suffering
Feb 28 2016 12:42
@marselcode
```
function lookUp(firstName, prop){
// Only change code below this line
  for(var i = 0, len = contacts.length; i < len; i++){
    if (contacts[i]["firstName"] == firstName)
      return contacts[i][prop] ? contacts[i][prop] : "No such property";
  }
  return "No such contact"
// Only change code above this line
}
Marsel
@marselcode
Feb 28 2016 12:44
@suffering thanks
CamperBot
@camperbot
Feb 28 2016 12:44
marselcode sends brownie points to @suffering :sparkles: :thumbsup: :sparkles:
:star: 296 | @suffering | http://www.freecodecamp.com/suffering
theone
@theoneinskane
Feb 28 2016 12:50
@suffering you are intro'ing a new variable inside the for arguments.
I don't think that works
Thanasis S.
@xakersas
Feb 28 2016 12:51
@coymeetsworld i still haven't figured out the alignment thing could you get more in-depth
?
suffering
@suffering
Feb 28 2016 12:51
@theoneinskane , which one?
theone
@theoneinskane
Feb 28 2016 12:51
check back to the previous for loop challenges and it should show you how to i < length of array
len
I don't think putting len = contacts.length inside the for loop arguments is necessary
:)
check back to the iterating through an array with for loops challenge :)
Coy Sanders
@coymeetsworld
Feb 28 2016 12:53
@xakersas what have you done so far?
not much
a bunch of google searches
Marsel
@marselcode
Feb 28 2016 12:54
@theoneinskane can you send your solution for an example?
Thanasis S.
@xakersas
Feb 28 2016 12:55
@coymeetsworld
suffering
@suffering
Feb 28 2016 12:55
@theoneinskane ,this is a little trick. you can sign the length to a variable before the loop. think about this: array.length is not cheap. check out this http://coffeescript.org/
it translate all loop in the syntax i used before.
and it works.
theone
@theoneinskane
Feb 28 2016 12:55
@marselcode is that the best way to learn? I can but I think what he has is almost there
Sandu Catalin
@SanduCatalin
Feb 28 2016 12:55
how can i send a photo with the challenge? i got stuck
Coy Sanders
@coymeetsworld
Feb 28 2016 12:55
well you aligned the div, but now you want to align the content inside of the div
Thanasis S.
@xakersas
Feb 28 2016 12:56
so i give ul an id
theone
@theoneinskane
Feb 28 2016 12:56
@suffering but can you do it inside the argument? Also are we worried about how cheap or not things are right now? ;)
Thanasis S.
@xakersas
Feb 28 2016 12:56
and align it to the left?
suffering
@suffering
Feb 28 2016 12:56
@theoneinskane , if you use coffeescript it will translate cubes = (math.cube num for num in list) to this:
cubes = (function() {
  var i, len, results;
  results = [];
  for (i = 0, len = list.length; i < len; i++) {
    num = list[i];
    results.push(math.cube(num));
  }
  return results;
})();
Coy Sanders
@coymeetsworld
Feb 28 2016 12:57
you don't need to give the ul an id, you could if you wanted but you could do without
also, you don't want to align the div by specifying align="center"
Thanasis S.
@xakersas
Feb 28 2016 12:57
what do i do instead?
theone
@theoneinskane
Feb 28 2016 12:57
I don't know about coffee script, I just know I did these challenges just a couple of days ago and it never taught us to put that in the for loop
Coy Sanders
@coymeetsworld
Feb 28 2016 12:57
to center a div you can just set the margins to auto
Thanasis S.
@xakersas
Feb 28 2016 12:57
ok
Coy Sanders
@coymeetsworld
Feb 28 2016 12:57
and specify a width
suffering
@suffering
Feb 28 2016 12:59
@theoneinskane , there are tons of usages of loop.
theone
@theoneinskane
Feb 28 2016 12:59
@suffering, I am sure there are! I just don't know many and didn't need to solve the challenge
suffering
@suffering
Feb 28 2016 13:01
@theoneinskane , you are right. All roads lead to Rome.
theone
@theoneinskane
Feb 28 2016 13:02
@suffering or shenzhen
suffering
@suffering
Feb 28 2016 13:02
ShenZhen city, China.
as you see, my english is poor, I’m chinese.
theone
@theoneinskane
Feb 28 2016 13:03
I used to live in shanghai
@marselcode how you getting on? Any progress?
suffering
@suffering
Feb 28 2016 13:04
x_x
The code is my solution for that challenge.
AslamKhan810
@AslamKhan810
Feb 28 2016 13:08

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

<!--> h2{ font-family:Lobster }<-->


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>

why is commenting not working on the H2 font family lobster
can someone help
Ashwini S
@ashwinis24
Feb 28 2016 13:09
Because of extra <
suffering
@suffering
Feb 28 2016 13:10
// h2{ font-family:Lobster }
or
/*
h2 { 
  font-family: Lobster;
}
*/
Ashwini S
@ashwinis24
Feb 28 2016 13:10
it should be <!--Text to comment -->
Jason
@gitPhunky
Feb 28 2016 13:11
commenting in css is different
Coy Sanders
@coymeetsworld
Feb 28 2016 13:11
yeah the /* wouldn't work if you put your css in a html file
suffering
@suffering
Feb 28 2016 13:12
the code inside <style> is css. <!— something —> is html. they are different.
sorry for that // h2{ font-family:Lobster } is wrong. it should be /*h2{ font-family:Lobster }*/
Ashwini S
@ashwinis24
Feb 28 2016 13:13
okay got it..
suffering
@suffering
Feb 28 2016 13:13
@coymeetsworld , are you sure?
theone
@theoneinskane
Feb 28 2016 13:14
@suffering ah!! Ok :)
Coy Sanders
@coymeetsworld
Feb 28 2016 13:15
not 100% suffering, but then again I don't usually put CSS in the same file as HTML
@suffering
theone
@theoneinskane
Feb 28 2016 13:15
@suffering not sure how helpful it is to throw coffee script at people just learning javascript. The ? separator is nothing that we learn so your code is much simplified to mine
Coy Sanders
@coymeetsworld
Feb 28 2016 13:16
Whenever i put a comment in HTML, i always used <!-- --> tags
suffering
@suffering
Feb 28 2016 13:16
@coymeetsworld , it works, I’ve tested for that.
Pedro Figueiredo
@pedronfigueiredo
Feb 28 2016 13:16
@coymeetsworld I dont have code, I am interested in understanding the problem in pseydo code first….
@pboest hola! :)
Coy Sanders
@coymeetsworld
Feb 28 2016 13:16
hmm ok @suffering interesting, i guess it would make sense
@pedronfigueiredo what test are you failing on with your pseudocode?
Lexar
@LexarZ
Feb 28 2016 13:21
Hello everyone :smile:
UHanczar
@UHanczar
Feb 28 2016 13:21
@louger143 I've written code in webstorm. And, when i open it with ikon of browser, it has adress "localhost/elegant/index.html" and displays in browsers equally. But when I open it from "total commander" in has path "d:/../index.html" and in oll browsers it looks differently from first case.
suffering
@suffering
Feb 28 2016 13:23
@coymeetsworld , you are right. You should never embed your css code in HTML, just use external css files.
Thanasis S.
@xakersas
Feb 28 2016 13:23
if i want 2 divs to have the same css can i give them the same id or i'd have to change the id and make a huge css file?
suffering
@suffering
Feb 28 2016 13:23
@xakersas , you should give them the same class.
Thanasis S.
@xakersas
Feb 28 2016 13:24
ofcourse
thank
thanks :)
suffering
@suffering
Feb 28 2016 13:24
Id should be uniqueness in one page.
quinalia
@quinalia
Feb 28 2016 13:24
@xakersas id is unique
Kat
@Topzie
Feb 28 2016 13:34
iPad trouble: the top navbar doesn't stay in place and the links don't respons (they should take you to the various sections). Also -webkit-background-size doesn't seem to work on my iPad. Anyone got a solution? http://codepen.io/Topzie/pen/MyWyXJ/
hossammoh
@hossammoh
Feb 28 2016 13:37
Your a element should have the anchor text of "cat photos".How to do this???
??????
Negin Alizadeh
@minionlover297
Feb 28 2016 13:39
hello world
CamperBot
@camperbot
Feb 28 2016 13:39

welcome to FreeCodeCamp @minionlover297!

Negin Alizadeh
@minionlover297
Feb 28 2016 13:39
but?
i was already here
Kat
@Topzie
Feb 28 2016 13:39
@chellybear I see you have the same iPad trouwles as I have. The navbar links don't work.
@hossammoh <img alt="cat photos"
Negin Alizadeh
@minionlover297
Feb 28 2016 13:41
hello
Ashwini S
@ashwinis24
Feb 28 2016 13:42

@hossammoh you just need to enclose the img tag inside anchor tag.

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

Michael Nazari
@mikenaza
Feb 28 2016 13:42
Can someone help me with "Title Case a Sentence"
function titleCase(str) {
  var strArray = str.split(" ");
  //iterate through each word
  var newArray = strArray.map(function(val) {
    for(var i = 0; i < val.length; i++){
      if(i > 0){
        return val.charAt(i).toLowerCase();
      } else {
        return val.charAt(i).toUpperCase();
      }
    }
  });

  return newArray;
}

titleCase("I'm a little tea pot");
My code capitalized each first letter but it isn't getting to the rest of the letters
Kat
@Topzie
Feb 28 2016 13:43
oeps sorry @hossammoh @ashwinis24 is right
Michael Nazari
@mikenaza
Feb 28 2016 13:44
So the code above only gives ["I", "A", "L", "T", "P"] when "I'm a little tea pot" is passed
Tilen Pogačnik
@TilenPogacnik
Feb 28 2016 13:48
'''
var myPlants = [
{
type: "flowers",
list: [
"rose",
"tulip",
"dandelion"
]
},
{
type: "trees",
lis