These are chat archives for FreeCodeCamp/Help

9th
May 2016
Jonathan McCullough
@HOTLINEJON
May 09 2016 00:00
How do you make an image width smaller? If its in the style box and tagged to the img , why wont it change the picture size?
Ashref
@Asher2016
May 09 2016 00:19
@HOTLINEJON the currently way in responsive web that nest the img in a div and give the div a width:auto , max-width: .... , and the img has max-width:100%; display: block -> to make the img responsive
Jonathan McCullough
@HOTLINEJON
May 09 2016 00:23
Thank you @Asher2016 , but i havent gotten to creating a div yet so I'm still in the early stages of the first course
CamperBot
@camperbot
May 09 2016 00:23
hotlinejon sends brownie points to @asher2016 :sparkles: :thumbsup: :sparkles:
:cookie: 20 | @asher2016 |http://www.freecodecamp.com/asher2016
moody_mudskipper
@moodymudskipper
May 09 2016 00:24
@tylergross your pictures don't keep proportions when risizing, so your simon game circle is squeezed one way or another depending on how i resize my navigator
@123xylem
body {
  background-color: #630;

}
Chris Cullen
@123xylem
May 09 2016 00:31
@moodymudskipper thanks
CamperBot
@camperbot
May 09 2016 00:31
123xylem sends brownie points to @moodymudskipper :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @moodymudskipper |http://www.freecodecamp.com/moodymudskipper
xxthaodan
@xxthaodan
May 09 2016 00:31

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

<p> View more<a href='http://www.freecatphotoapp.com'>cat photos </a></p>
<img class="smaller-image thick-green-border" 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>

can any help me please :(
it's "Nest an Anchor element within a Praragraph" challeng
*challenge
Jeff Gibson
@gibbymt
May 09 2016 00:33
let me take a look
where are you stuck?
Sascha Bratton
@saschabratton
May 09 2016 00:34
@xxthaodan Doesn't look like you have any anchor elements in either of your paragraph elements...
Jeff Gibson
@gibbymt
May 09 2016 00:34
<p>
View more <a href="http://www.freecatphotoapp.com">cat photos</a>
</p>
Lucati
@Lucati
May 09 2016 00:35
u missing a space before the <a>
Tyler
@tylergross
May 09 2016 00:38
@moodymudskipper thanks i'm not sure how to fix that because I want to maintain the look of the site without having to maintain image proportions
CamperBot
@camperbot
May 09 2016 00:38
tylergross sends brownie points to @moodymudskipper :sparkles: :thumbsup: :sparkles:
:cookie: 345 | @moodymudskipper |http://www.freecodecamp.com/moodymudskipper
moody_mudskipper
@moodymudskipper
May 09 2016 00:42
I'm not sure if it's a good idea to compromise on image proportions, I think usually it works smoothly if you check other examples. Though to be fair, if there wasn't a circle in there i wouldn't have noticed
FDWAmos66
@FDWAmos66
May 09 2016 00:43
I'm stuck. I am on step 17 and completed the task, but run test will not work? Any suggestion
Andres Bravo
@OmniBravo
May 09 2016 00:44
whats the name of the challenge?
Coy Sanders
@coymeetsworld
May 09 2016 00:44
hi @FDWAmos66, the 17 you see is your brownie points, can you give the name of the challenge and also post your code?
FDWAmos66
@FDWAmos66
May 09 2016 00:44
change the font size of the element
@coy sanders oops! my bad. live and learn
Coy Sanders
@coymeetsworld
May 09 2016 00:45
its ok, common misconception here :)
Andres Bravo
@OmniBravo
May 09 2016 00:45
can you post what youve done?
Coy Sanders
@coymeetsworld
May 09 2016 00:46
yeah we'll need to see the code to see what the problem is @FDWAmos66, you can just copy it and paste it into chat
FDWAmos66
@FDWAmos66
May 09 2016 00:47
I added the .h1 { font-size: 16px; } between the style tags.
Coy Sanders
@coymeetsworld
May 09 2016 00:47
that was just the example
you actually want to style the p element w/ a different size
FDWAmos66
@FDWAmos66
May 09 2016 00:48
yes
Coy Sanders
@coymeetsworld
May 09 2016 00:48
also don't use a dot when you're styling HTML elements
like if you wanted to style an h1 tag, you just use h1, not .h1
a dot indicates a class, like the red-text class
Selhar
@Selhar
May 09 2016 00:49
Does anyone know the symbol for roman overline? V with a _ above it, for example.
FDWAmos66
@FDWAmos66
May 09 2016 00:49
that was it thanks Coy
Coy Sanders
@coymeetsworld
May 09 2016 00:49
no problem
never heard of that @GregoryGoncalves, where do you see that at?
Selhar
@Selhar
May 09 2016 00:51
Never seen it in a console, i'm trying to make the roman number converter exercise.
But i'd need that to represent over 3999.
Coy Sanders
@coymeetsworld
May 09 2016 00:51
i don't remember that being part of the challenge
actually you don't have to check for anything over 3999
Selhar
@Selhar
May 09 2016 00:53
I know, but i'd like to make a library from that code, if i ever need that again.
Samin Islam
@Samin12
May 09 2016 00:54
does anyone know how to make your document not copy and pasteable
Marina Rose
@marinarose92
May 09 2016 00:54
There seems to be a bug with the challenge "create a bulleted unordered list" and possibly others. I am unable to click on the bottom line of code or select it in any way, even by selecting the second-to-last line and using the arrow keys. The only way I can edit the last line is to select the second-to-last line of code and then backspace (anywhere) and it brings me to the bottom line. Lmk if I need to explain it better, it's sort of a weird issue. Fyi, I'm using Chrome on Windows 7.
Coy Sanders
@coymeetsworld
May 09 2016 00:55
you could look at the unicode representation of those numbers @GregoryGoncalves if you wish, but what are the odds you need a roman numeral library? :)
I've had problems doing that too @marinarose92
Selhar
@Selhar
May 09 2016 00:55
well, that's a good point. Thanks @coymeetsworld
CamperBot
@camperbot
May 09 2016 00:55
gregorygoncalves sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:cookie: 769 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
May 09 2016 00:55
not just on that challenge but others
Marina Rose
@marinarose92
May 09 2016 00:56
Ok, glad to know it's not me. Is that something worth opening an issue about or is it already widely known?
Coy Sanders
@coymeetsworld
May 09 2016 00:56
no problem @GregoryGoncalves, but yeah thats what I would do
Terri Turnbo
@Caliluv777
May 09 2016 00:56

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

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

<p>Things cats love:</p>

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

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

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

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

<lable><input type="radio" name="indoor-outdoor">
Indoor</lable>

<lable><input type="radio" name="indoor-outdoor">
Outdoor</lable>

OBELE DAVID
@MrObele
May 09 2016 00:57
@marinarose92 , i usually face same problem too, and it kind of delays my coding sometimes
Coy Sanders
@coymeetsworld
May 09 2016 00:57
not sure if widely known or not, you could go through the issues logged in github and check https://github.com/FreeCodeCamp/FreeCodeCamp/issues @marinarose92
Terri Turnbo
@Caliluv777
May 09 2016 00:57
I am on create a set of radio buttons totally stuck
Coy Sanders
@coymeetsworld
May 09 2016 00:57
it is an issue I would say so if you opened one up (assuming one isn't already open) I think it would be fine. But there are workarounds so idk how quickly it would be resolved.
@Caliluv777 you got a typo for label
Marina Rose
@marinarose92
May 09 2016 00:58
Okay, thanks. I'm new here so that helps a lot.
Coy Sanders
@coymeetsworld
May 09 2016 00:58
no problem, and welcome!
Terri Turnbo
@Caliluv777
May 09 2016 00:58
omg thanks my mind is gone
Max Villafranca
@Max-Villafranca
May 09 2016 00:58
< hellllo coder problem fixers...
Marina Rose
@marinarose92
May 09 2016 00:58
thanks!
Eric
@greenhist
May 09 2016 00:59
                 --<div class="row">
<div class="col-xs-6">
  <button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
<div class="col-xs-6">
  <button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
<div class="col-xs-6">
  <button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div>
</div>
Coy Sanders
@coymeetsworld
May 09 2016 01:00
columns should add up to 12 per row, ideally @greenhist
OBELE DAVID
@MrObele
May 09 2016 01:00
@greenhist whats the error
Eric
@greenhist
May 09 2016 01:02
not nesting allall radio buttons
inside div class row
Coy Sanders
@coymeetsworld
May 09 2016 01:02
probably because of the column size
bootstrap expects the sum total of all columns in a row is 12, you have 18
could cause issues
Eric
@greenhist
May 09 2016 01:03
that's the colum size the tutorial says to make them
Coy Sanders
@coymeetsworld
May 09 2016 01:03
what challenge is it?
Eric
@greenhist
May 09 2016 01:03
i'll try to reduse to 4 butit didnt work last time
Coy Sanders
@coymeetsworld
May 09 2016 01:04
well if it says 6 leave it at 6 lol, something else may be wrong im not sure
OBELE DAVID
@MrObele
May 09 2016 01:04
@greenhist , if you have three buttons it will be better to use <div class="col-xs-4">
Coy Sanders
@coymeetsworld
May 09 2016 01:04
but he said instructions said to make them 6,
what challenge are you working on specifically @greenhist? we need a bit more information
OBELE DAVID
@MrObele
May 09 2016 01:05
@greenhist , it looks like you didn't close your row div
Eric
@greenhist
May 09 2016 01:05
responsively style radio buttons
Coy Sanders
@coymeetsworld
May 09 2016 01:05
he may have cut it off
hmm i can't view that challenge or my solution
can you @davefreelancer?
Eric
@greenhist
May 09 2016 01:07
I do have one more div close
thats the only park im getting a check on
OBELE DAVID
@MrObele
May 09 2016 01:08
@greenhist , this is how i did it imary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div>
</div>
<p>Things cats <span class="text-danger">love:</span></p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>l
@greenhist i couldn't get it neatly just look at the various three divs for col-xs-4, use same
Daniel
@profoundhub
May 09 2016 01:10
@richiedSIS good for you :)
OBELE DAVID
@MrObele
May 09 2016 01:11
@coymeetsworld , it displayed once, but now i can't view it again
Coy Sanders
@coymeetsworld
May 09 2016 01:11
hmm maybe the website is having some issues
oh well just need to give it a moment
Melissa Leon
@ymelissaleon
May 09 2016 01:12
I have problems
can anybody help me?
OBELE DAVID
@MrObele
May 09 2016 01:12
@ymelissaleon, whats the problem
Melissa Leon
@ymelissaleon
May 09 2016 01:13
it says "The finished input element should have valid syntax" but i wrote : <input type="text" placeholder= "cat photo URL">
what am i doing wrong?
Eric
@greenhist
May 09 2016 01:13
thanks all let me give it another try
Melissa Leon
@ymelissaleon
May 09 2016 01:14
@davefreelancer @ymelissaleon
it says "The finished input element should have valid syntax" but i wrote : <input type="text" placeholder= "cat photo URL">
what am i doing wrong?
Coy Sanders
@coymeetsworld
May 09 2016 01:14
what's the challenge name @ymelissaleon ?
Melissa Leon
@ymelissaleon
May 09 2016 01:14
@coymeetsworld "Add Placeholder Text to a Text Field"
Coy Sanders
@coymeetsworld
May 09 2016 01:15
lol well I can't view that challenge either
OBELE DAVID
@MrObele
May 09 2016 01:16
@ymelissaleon, i think thats correct just try to refresh your page
Coy Sanders
@coymeetsworld
May 09 2016 01:16
yeah sometimes you need to refresh the pages
Melissa Leon
@ymelissaleon
May 09 2016 01:17
now says that something's wrong
Coy Sanders
@coymeetsworld
May 09 2016 01:18
what does it say?
OBELE DAVID
@MrObele
May 09 2016 01:18
i think its a general problem for now, i'm also getting that message some times
Coy Sanders
@coymeetsworld
May 09 2016 01:19
oh ok the red bar on the top, yeah Im getting that too
ok guess I'm not only one
maybe they're getting heavy loads right now
OBELE DAVID
@MrObele
May 09 2016 01:20
it should be a server issue
Coy Sanders
@coymeetsworld
May 09 2016 01:21
yeah
Melissa Leon
@ymelissaleon
May 09 2016 01:22
well, thank you guys!
OBELE DAVID
@MrObele
May 09 2016 01:22
@coymeetsworld , which level are you?
mine is really down now i can't even access my challenges right now
Juan
@juanees
May 09 2016 01:26
hello
minchin681
@minchin681
May 09 2016 01:27
Is something wrong with the website?
Coy Sanders
@coymeetsworld
May 09 2016 01:27
i got all front end done except tic-tac-toe and simon
including optional algorithms
yeah were having problems @minchin681
Karan Bhandari
@karanbhandari
May 09 2016 01:28
Anyone really good in React.js! Please mention me! Kinda Urgent!!!1
OBELE DAVID
@MrObele
May 09 2016 01:29
@coymeetsworld, ok am still on it . i just completed my portfolio challenge
Coy Sanders
@coymeetsworld
May 09 2016 01:29
nice, yeah took me about 5 months but i need to go back to my projects and clean them up, their designs are awful lol
Andre Jensen
@andrejensen302
May 09 2016 01:30
Is it me or is the FCC website crashing?
Coy Sanders
@coymeetsworld
May 09 2016 01:30
yeah its down right now @andrejensen302
im sure they're looking at it now
Andre Jensen
@andrejensen302
May 09 2016 01:30
@coymeetsworld , thanks for the confirmation. I'm glad it's not just me.
CamperBot
@camperbot
May 09 2016 01:30
andrejensen302 sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
api offline
Coy Sanders
@coymeetsworld
May 09 2016 01:31
no brownies :cry:
OBELE DAVID
@MrObele
May 09 2016 01:31
@coymeetsworld ok, i started a week ago, ok happy coding. i think its resolved now.
Coy Sanders
@coymeetsworld
May 09 2016 01:32
id give it a bit just in case
wouldn't work on anything on the browser
Selhar
@Selhar
May 09 2016 01:32

So, in the roman converter i have this piece of code

  for(var i=0; i < brokenNumber.length; i++){ //Decimal could also be used here, but .length is easier to understand
    processedValues.push(convertDecimals(brokenNumber[i], brokenNumber.length - i));
  }

In the function convertDecimals, instead of the function being called 4 times, each times with a part of the value, it's calling the sum of it.
The length, if it's five, it should call the function 5 times with the values 5 and then 4 up to 1. Instead it calls once with 54321. I checked in this loop and it's sending the correct values. Is this some particularity from javascript?

Coy Sanders
@coymeetsworld
May 09 2016 01:32
might lose it, write it somewhere else like codepen or local editor
Selhar
@Selhar
May 09 2016 01:33
yeah i just copied it
Coy Sanders
@coymeetsworld
May 09 2016 01:33
is brokenNumber a string or a number?
Selhar
@Selhar
May 09 2016 01:33
it's an array of strings
12 turns into ["1","2"] etc
Coy Sanders
@coymeetsworld
May 09 2016 01:34
what does convertDecimals look like?
Selhar
@Selhar
May 09 2016 01:34
just a sec
function convertDecimals(value, decimal){

    return decimal;
  var firstInput = "";
  var secondInput = "";
  var thirdInput = "";
  var processedValue = "";
    //Depending on the decimal, this variable will hold up to 3 variable values, if it's a 3rdplace decimal, it will hold 'C', 'D' and 'M' for example
  switch(decimal){
    case 1:
      firstInput = romanDictionary[1];
      secondInput = romanDictionary[5];
      thirdInput = romanDictionary[10];
      break;
    case 2:
      firstInput = romanDictionary[10];
      secondInput = romanDictionary[50];
      thirdInput = romanDictionary[100];
      break;
    case 3:
      firstInput = romanDictionary[100];
      secondInput = romanDictionary[500];
      thirdInput = romanDictionary[1000];
      break;
    case 4:
      firstinput = romanDictionary[1000];
      break;
  }

  //Processes the value 
  switch(value){
    case value < 4:
      processedValue = romanDictionary[1] * value;
      break;
    case value === 4:
      processedValue = firstInput + secondInput;
      break;
    case value === 5:
      processedValue = secondInput;
      break;
    case value > 5 && value < 10:
      processedValue = secondInput + (firstInput * value);
      break;
    case value === 9:
      processedValue = firstInput + thirdInput;
      break;
  }

  return processedValue;
}
The values are arriving there already wrong.
So i didn't check the output yet.
They reach the function as "12345" instead of calling 5 times with each piece of the arrya
array*
Coy Sanders
@coymeetsworld
May 09 2016 01:36
whats romanDictionary?
actually better just post entire code at once
not sure why for loop only going through one time
Selhar
@Selhar
May 09 2016 01:37
alright
https://www.freecodecamp.com/challenges/roman-numeral-converter#?solution=var%20romanDictionary%20%3D%20{%0A%20%201%20%3A%20%27I%27%2C%0A%20%205%20%3A%20%27V%27%2C%0A%20%2010%20%3A%20%27X%27%2C%0A%20%2050%20%3A%20%27L%27%2C%0A%20%20100%20%3A%20%27C%27%2C%0A%20%20500%20%3A%20%27D%27%2C%0A%20%201000%20%3A%20%27M%27%0A}%3B%0A%0Afunction%20convertDecimals%28value%2C%20decimal%29{%0A%0A%20%20%20%20return%20decimal%3B%0A%20%20var%20firstInput%20%3D%20%22%22%3B%0A%20%20var%20secondInput%20%3D%20%22%22%3B%0A%20%20var%20thirdInput%20%3D%20%22%22%3B%0A%20%20var%20processedValue%20%3D%20%22%22%3B%0A%20%20%20%20%2F%2FDepending%20on%20the%20decimal%2C%20this%20variable%20will%20hold%20up%20to%203%20variable%20values%2C%20if%20it%27s%20a%203rdplace%20decimal%2C%20it%20will%20hold%20%27C%27%2C%20%27D%27%20and%20%27M%27%20for%20example%0A%20%20switch%28decimal%29{%0A%20%20%20%20case%201%3A%0A%20%20%20%20%20%20firstInput%20%3D%20romanDictionary[1]%3B%0A%20%20%20%20%20%20secondInput%20%3D%20romanDictionary[5]%3B%0A%20%20%20%20%20%20thirdInput%20%3D%20romanDictionary[10]%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20case%202%3A%0A%20%20%20%20%20%20firstInput%20%3D%20romanDictionary[10]%3B%0A%20%20%20%20%20%20secondInput%20%3D%20romanDictionary[50]%3B%0A%20%20%20%20%20%20thirdInput%20%3D%20romanDictionary[100]%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20case%203%3A%0A%20%20%20%20%20%20firstInput%20%3D%20romanDictionary[100]%3B%0A%20%20%20%20%20%20secondInput%20%3D%20romanDictionary[500]%3B%0A%20%20%20%20%20%20thirdInput%20%3D%20romanDictionary[1000]%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20case%204%3A%0A%20%20%20%20%20%20firstinput%20%3D%20romanDictionary[1000]%3B%0A%20%20%20%20%20%20break%3B%0A%20%20}%0A%20%20%0A%20%20%2F%2FProcesses%20the%20value%20%0A%20%20switch%28value%29{%0A%20%20%20%20case%20value%20%3C%204%3A%0A%20%20%20%20%20%20processedValue%20%3D%20romanDictionary[1]%20*%20value%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20case%20value%20%3D%3D%3D%204%3A%0A%20%20%20%20%20%20processedValue%20%3D%20firstInput%20%2B%20secondInput%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20case%20value%20%3D%3D%3D%205%3A%0A%20%20%20%20%20%20processedValue%20%3D%20secondInput%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20case%20value%20%3E%205%20%26%26%20value%20%3C%2010%3A%0A%20%20%20%20%20%20processedValue%20%3D%20secondInput%20%2B%20%28firstInput%20*%20value%29%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20case%20value%20%3D%3D%3D%209%3A%0A%20%20%20%20%20%20processedValue%20%3D%20firstInput%20%2B%20thirdInput%3B%0A%20%20%20%20%20%20break%3B%0A%20%20}%0A%20%20%0A%20%20return%20processedValue%3B%0A}%0A%0A%2F%2FChecks%20if%20the%20value%20is%20equivalent%20to%20anything%20in%20the%20romanDictionary%20object%0Afunction%20literalTranslation%28value%29{%0A%20%20switch%20%28value%29{%0A%20%20%20%20case%201%3A%0A%20%20%20%20%20%20return%20romanDictionary[1]%3B%0A%20%20%20%20case%205%3A%0A%20%20%20%20%20%20return%20romanDictionary[5]%3B%0A%20%20%20%20case%2010%3A%0A%20%20%20%20%20%20return%20romanDictionary[10]%3B%0A%20%20%20%20case%2050%3A%0A%20%20%20%20%20%20return%20romanDictionary[50]%3B%0A%20%20%20%20case%20100%3A%0A%20%20%20%20%20%20return%20romanDictionary[100]%3B%0A%20%20%20%20case%20500%3A%0A%20%20%20%20%20%20return%20romanDictionary[500]%3B%0A%20%20%20%20case%201000%3A%0A%20%20%20%20%20%20return%20romanDictionary[1000]%3B%0A%20%20%20%20default%3A%0A%20%20%20%20%20%20return%20null%3B%0A%20%20}%0A}%0A%0A%2F%2FFurther%20breaks%20the%20number%20down%20by%20each%20decimal%20and%20sends%20it%20to%20convertDecimals%28%29%0Afunction%20convertNumbers%28brokenValue%29{%0A%20%20var%20brokenNumber%20%3D%20brokenValue.array%3B%0A%20%20var%20decimal%20%3D%20brokenValue.decimalValue%3B%0A%20%20processedValues%20%3D%20[]%3B%0A%20%20for%28var%20i%3D0%3B%20i%20%3C%20brokenNumber.length%3B%20i%2B%2B%29{%20%2F%2FDecimal%20could%20also%20be%20used%20here%2C%20but%20.length%20is%20easier%20to%20understand%0A%20%20%20%20processedValues.push%28convertDecimals%28brokenNumber[i]%2C%20brokenNumber.length%20-%20i%29%29%3B%0A%20%20}%0A%20%20%0A%20%20return%20proces
is it online?
Coy Sanders
@coymeetsworld
May 09 2016 01:38
nope, can you just post the code here like you did before?
Selhar
@Selhar
May 09 2016 01:38
sure.
var romanDictionary = {
  1 : 'I',
  5 : 'V',
  10 : 'X',
  50 : 'L',
  100 : 'C',
  500 : 'D',
  1000 : 'M'
};

function convertDecimals(value, decimal){

    return decimal; //just a test
  var firstInput = "";
  var secondInput = "";
  var thirdInput = "";
  var processedValue = "";
    //Depending on the decimal, this variable will hold up to 3 variable values, if it's a 3rdplace decimal, it will hold 'C', 'D' and 'M' for example
  switch(decimal){
    case 1:
      firstInput = romanDictionary[1];
      secondInput = romanDictionary[5];
      thirdInput = romanDictionary[10];
      break;
    case 2:
      firstInput = romanDictionary[10];
      secondInput = romanDictionary[50];
      thirdInput = romanDictionary[100];
      break;
    case 3:
      firstInput = romanDictionary[100];
      secondInput = romanDictionary[500];
      thirdInput = romanDictionary[1000];
      break;
    case 4:
      firstinput = romanDictionary[1000];
      break;
  }

  //Processes the value 
  switch(value){
    case value < 4:
      processedValue = romanDictionary[1] * value;
      break;
    case value === 4:
      processedValue = firstInput + secondInput;
      break;
    case value === 5:
      processedValue = secondInput;
      break;
    case value > 5 && value < 10:
      processedValue = secondInput + (firstInput * value);
      break;
    case value === 9:
      processedValue = firstInput + thirdInput;
      break;
  }

  return processedValue;
}

//Checks if the value is equivalent to anything in the romanDictionary object
function literalTranslation(value){
  switch (value){
    case 1:
      return romanDictionary[1];
    case 5:
      return romanDictionary[5];
    case 10:
      return romanDictionary[10];
    case 50:
      return romanDictionary[50];
    case 100:
      return romanDictionary[100];
    case 500:
      return romanDictionary[500];
    case 1000:
      return romanDictionary[1000];
    default:
      return null;
  }
}

//Further breaks the number down by each decimal and sends it to convertDecimals()
function convertNumbers(brokenValue){
  var brokenNumber = brokenValue.array;
  var decimal = brokenValue.decimalValue;
  processedValues = [];
  for(var i=0; i < brokenNumber.length; i++){ //Decimal could also be used here, but .length is easier to understand
    processedValues.push(convertDecimals(brokenNumber[i], brokenNumber.length - i));
  }

  return proces
the return in the area commented with "just a test" returns 4321. The input should be 4 in the first loop.
Coy Sanders
@coymeetsworld
May 09 2016 01:40
brokenValue.array
don't think thats right
should print out brokenNumber to make sure you're getting what you want
Felix Rodriguez
@felixrodriguez12
May 09 2016 01:40
For the tribute page example, does the code use a background-color: lightgrey or is that a well? I literally can't tell.
Selhar
@Selhar
May 09 2016 01:42
you mean in the convertNumbers function? the first assignment
Coy Sanders
@coymeetsworld
May 09 2016 01:43
yes
Selhar
@Selhar
May 09 2016 01:44
it's working, i checked that one, that assignment turns brokenNumber into an array, if the input is "100" then brokenNumber = ["1","0","0"], i checked the first for cycle too, it's sending "1", still in the 100 input example.
it just reaches the other function as "100" for some reason
Coy Sanders
@coymeetsworld
May 09 2016 01:45
doesn't work for me
are you sure thats what it is?
Selhar
@Selhar
May 09 2016 01:46
well, that's weird, let me check again.
Coy Sanders
@coymeetsworld
May 09 2016 01:46
var brokenValue = 54321;
var brokenNumber = brokenValue.array;
console.log("brokenNumber: " + brokenNumber);
var decimal = brokenValue.decimalValue;
console.log("decimal: " + decimal);
both give me undefined values
Selhar
@Selhar
May 09 2016 01:46
oh, there's another function for breaking it
Coy Sanders
@coymeetsworld
May 09 2016 01:46
unless thats some weird ES6 functionality i don't think .array or .decimalValue are valid
Selhar
@Selhar
May 09 2016 01:46
you have to call the first one, convertToRoman
it will create an object with the broken values, and then the other function will access it
Coy Sanders
@coymeetsworld
May 09 2016 01:47
lol well where is that?
Selhar
@Selhar
May 09 2016 01:47
just at the bottom
well, that's weird, sorry, i don't think it went in my ctrl + c
sorry, just a second
here, easier that way.
Coy Sanders
@coymeetsworld
May 09 2016 01:48
you have ALOT of conversion here man
pretty confusing, think you can make it much simpler
Selhar
@Selhar
May 09 2016 01:49
it makes it easier for me to think
usually i break it down a lot at first
then i refactor it
otherwise i get really confused
Eric
@greenhist
May 09 2016 01:49
Nest all of your radio buttons inside one div with the class row.
Nest each of your radio buttons inside its own div with the class col-xs-6.
Kyle Diablo
@KDiablo
May 09 2016 01:50
Heyo! I'm having trouble with having my buttons laid out with the bootstrap grid system, any feedback? Thanks a ton!
http://codepen.io/KDiablo/pen/XdOMNb
Coy Sanders
@coymeetsworld
May 09 2016 01:50
ok @greenhist i see it now, you don't change the class for the 3 buttons you created above
you leave those at col-xs-4
those are not radio buttons either, they are just buttons
xxthaodan
@xxthaodan
May 09 2016 01:51
@gibbymt @saschabratton @Lucati thank you guys a lot! i figured it out. Seems like the website crushed again and again and I have to reset it to make it done
CamperBot
@camperbot
May 09 2016 01:51
xxthaodan sends brownie points to @gibbymt and @saschabratton and @lucati :sparkles: :thumbsup: :sparkles:
api offline
api offline
api offline
norkuy
@norkuy
May 09 2016 01:59
trying to make the first letter of each word capitalized. toLowerCase is not working and my code isn't passing
 var word;
  var newArray = [];
function titleCase(str) {
  var arr = str.split(" ");
  for (var i = 0; i < arr.length; i++) {
   word = arr[i].toLowerCase().charAt(0).toUpperCase() + arr[i].slice(1);
   newArray.push(word);       
  }

return newArray.join(" "); 

}

titleCase("I'm a little tea pot");
fadyboy
@fadyboy
May 09 2016 02:06
Anyone getting an error message using freecodecamp, I keep getting a message "oops something went wrong, please try again later"
Justice K. Dube
@kazd
May 09 2016 02:06
on the challege called size your images; this is my code below but it is still not passing me, any help?

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

<style>

.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}
.smaller-image {
width: 100px;
}

</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>

Gprice1148
@Gprice1148
May 09 2016 02:12
I believe you have to add the smaller-image class to the <img>
Similar to how you've down the red text class for h2
Coy Sanders
@coymeetsworld
May 09 2016 02:20
@norkuy try moving the variables inside the function
FCC doesn't like global variables, unless they put them in there specifically in the code
your code passes on first challenge but since newArray isn't reset you're adding on top of it
Felix Rodriguez
@felixrodriguez12
May 09 2016 02:22
How does one post previews of what a webpage looks like here?
Coy Sanders
@coymeetsworld
May 09 2016 02:23
can you clarify @felixrodriguez12 ?
if you post a link here gitter will show a preview of the page, like a codepen link
Parker Harris Emerson
@emersonp
May 09 2016 02:24
Evening gang!
Query: Working on Friendly Date Ranges.
Oop, nevermind - rubberducked it.
Felix Rodriguez
@felixrodriguez12
May 09 2016 02:26
@coymeetsworld Does this link work? https://codepen.io/felixrodriguez/pen/ONdJNW?editors=1000 I'm trying to fix my unordered list. It's supposed to be like the tribute page example's unordered list.
Coy Sanders
@coymeetsworld
May 09 2016 02:26
yup
James Becker
@james-becker
May 09 2016 02:26
If anyone is interested in pairing for Random Quote Machine project please PM me
Felix Rodriguez
@felixrodriguez12
May 09 2016 02:28
Dr. Norman Borlaug's webpage has an unordered list that looks centered, but it also looks like the list items are flushed to the left too. How does one do that?
Justice K. Dube
@kazd
May 09 2016 02:38
thanx it worked
Dylan
@dhcodes
May 09 2016 02:48
@felixrodriguez12 maybe it's a margin
I did ul {
margin-left: 25%;
margin-right: 25%;
padding-left: 0;
}
and it worked pretty well
Krishna
@krisskb
May 09 2016 03:06
Hello All, I am stuck at implementing LinkedIn, Github icons in the buttons. I thought I can find in Glyphicons from w3school, but could not find there. Can someone help me on this. Many thanks in advance.
Sam
@Samjin
May 09 2016 03:06
Hi, how do I turn off the chatroom notifications from FB?
It has been quite annoying, i'd like to only have notifications when I am present to the room. Otherwise, I don't want to show it
Coy Sanders
@coymeetsworld
May 09 2016 03:08
@Samjin go to the top right corner to settings
under notifications select mute
have to do this for each room you're in
Coy Sanders
@coymeetsworld
May 09 2016 03:09
@krisskb have you tried looking at fontawesome icons?
or yeah as @cannelflow showed you can also use icons from bootstrap
cannelflow
@cannelflow
May 09 2016 03:09
Brandon Wong
@codekendo
May 09 2016 03:11
can anyone help with the Sum All Odd Fibonacci Numbers?
Sam
@Samjin
May 09 2016 03:12
blob
@coymeetsworld I don't see mute button ? Also I'd like to mute only FreeCodeCmap notifications, not others.
Coy Sanders
@coymeetsworld
May 09 2016 03:13
oh this is for FB, hmm not sure, does gitter notifications go inside facebook?
Sam
@Samjin
May 09 2016 03:14
Oh! NVM it looks alot like FB's so I thought it was from FB.
Got it ! thanks
Brandon Wong
@codekendo
May 09 2016 03:19
alright figured it out
Sam
@Samjin
May 09 2016 03:19
I just started to do challenges from <h1>Hello World</h1> is there a way to skip to the level that I feel fit?
cannelflow
@cannelflow
May 09 2016 03:20
@Samjin got to https://www.freecodecamp.com/map Challenges required for certifications are marked with a *
Sam
@Samjin
May 09 2016 03:21
I see thanks
Already feel good about this community
ishtarwars
@ishtarwars
May 09 2016 03:30
This message was deleted
Krishna
@krisskb
May 09 2016 03:35
Thank you @cannelflow
CamperBot
@camperbot
May 09 2016 03:35
:star2: 1135 | @cannelflow |http://www.freecodecamp.com/cannelflow
krisskb sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
richiedSIS
@richiedSIS
May 09 2016 03:40
I just finished by Portfolio Page. What do you guys think? http://codepen.io/richied/pen/bpzayy
Thomas Hodges
@thodges314
May 09 2016 03:41
Hello. Maybe someone can give me aide? I've sorted out how to get json from a wikipedia search but it refuses to parse:
http://codepen.io/thodges314/pen/PNVOmb
@richiedSIS i like it but there doesn't seem to be anything in the slots for showcased work. Are those placeholders?
Portia "Zeus" Walton
@zeusscepter
May 09 2016 03:43
@alkapwn3d Many thanks for your help
CamperBot
@camperbot
May 09 2016 03:43
:cookie: 22 | @alkapwn3d |http://www.freecodecamp.com/alkapwn3d
zeusscepter sends brownie points to @alkapwn3d :sparkles: :thumbsup: :sparkles:
richiedSIS
@richiedSIS
May 09 2016 03:47
@thodges314 Yeah for now they're just placeholders
23editorcs
@23editorcs
May 09 2016 03:49
Hi all, in my project, i separated page to 2 column by col-md-6 and add images. I used .image-responsive but it didn't responsive at all: https://codepen.io/23editorcs/full/oxmjRL/
Mark Powell
@machr
May 09 2016 03:49
has anyone else had trouble with the javascript “Stand in Line” ?
rphares
@rphares
May 09 2016 03:49
@machr , loads of people do--
id suggest reading the MDN about push and shift,
and then pasting code if you are stuck in the help JS room, https://gitter.im/FreeCodeCamp/HelpJavaScript :blush:
(im not good at explaining it... but its a frequently asked Q! dont give up, you'll get it~)
Mark Powell
@machr
May 09 2016 03:51
@rphares yeah i’m on that now. getting an “undefined” error, so it should be fairly simple. I just haven’t been doing FCC for a few weeks now hehe. I’ll look in HelpJavascript. Thanks :)
CamperBot
@camperbot
May 09 2016 03:51
machr sends brownie points to @rphares :sparkles: :thumbsup: :sparkles:
:star2: 4400 | @rphares |http://www.freecodecamp.com/rphares
rphares
@rphares
May 09 2016 03:52
Anytime~
jorgon1022
@jorgon1022
May 09 2016 03:57
Hey guys, can any of you help me out with a challenge?
I dont need the answer just guidance in the right direcito
direction
Renata Putri
@renataputri
May 09 2016 04:03
help rooms
CamperBot
@camperbot
May 09 2016 04:03

:point_right: help rooms [wiki]

FreeCodeCamp Chat Rooms

Help Rooms

Chat Room Description Chat Room
HTML/CSS/Bootstrap FreeCodeCamp/Help
JavaScript/Algorithms FreeCodeCamp/HelpJavaScript
Front End FreeCodeCamp/HelpFrontEnd
Data Visualization FreeCodeCamp/HelpDataViz
Back End FreeCodeCamp/HelpBackEnd

Choose the right room for your questions!

See also: :earth_asia: Language Specific | :satellite: Technology | :crystal_ball: Miscellaneous

back to top

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

Dylan
@carlsagonator
May 09 2016 04:06
i need some help with the CSS class declarations can anyone help me get in the right direction?
Saad Mehmood
@saadmehmood233
May 09 2016 04:10
<style>
.class_name {
     your: style;
}
</style>
@carlsagonator
Dylan
@carlsagonator
May 09 2016 04:10
thanks Saad all try that and see if it works!

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

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

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

what do i need to fix in this to make the h2 element to change to red?
Will
@williamsiu
May 09 2016 04:15
Hey @carlsagonator , I would remove "h2" from .red-text
<style>
red-text{color: red;}
Dylan
@carlsagonator
May 09 2016 04:17
thanks so much will that worked :)
Will
@williamsiu
May 09 2016 04:17
Glad to hear it, I just did that step a few minutes ago :)
Dylan
@carlsagonator
May 09 2016 04:18
haha nice
Hugo Ortiz
@hugoisaac
May 09 2016 04:19
Hello. @carlsagonator, I think h2.red-text should work, but you have a space between "h2" and ".red-text"?
element.className != element .className
notice the space
Dylan
@carlsagonator
May 09 2016 04:21
thanks for your feed back Hugo i didn't even notice i did that haha
N3ogenesiS
@N3ogenesiS
May 09 2016 04:24
the main function of class is globalization of using. u still can use it just
.someclass{
Hugo Ortiz
@hugoisaac
May 09 2016 04:25
np @carlsagonator :).
Umair Raza
@mrumair94
May 09 2016 04:32

need help on this one bounce boutton, <script>
$(document).ready(function() {

$("button").addclass("animatedbounce");

});
</script>
https://www.freecodecamp.com/challenges/target-html-elements-with-selectors-using-jquery#?solution=%0Afccss%0A%20%20%24(document).ready(function()%20%7B%0A%20%20%20%20%0A%20%20%20%20%24(%22button%22).addclass(%22animatedbounce%22)%3B%0A%0A%20%20%7D)%3B%0Afcces%0A%0A%3C!--%20Only%20change%20code%20above%20this%20line.%20--%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Ch3%20class%3D%22text-primary%20text-center%22%3EjQuery%20Playground%3C%2Fh3%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23left-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22left-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target1%22%3E%23target1%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target2%22%3E%23target2%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target3%22%3E%23target3%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23right-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22right-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target4%22%3E%23target4%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target5%22%3E%23target5%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target6%22%3E%23target6%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A

Acharya Anil
@acharyaks90
May 09 2016 04:33
Copy it Correctly
Umair Raza
@mrumair94
May 09 2016 04:33
sorry
Alex Triece
@atrieceeph289
May 09 2016 04:34
hey guys, this is my portfolio page and I am trying to eliminate that white line under my navbar. Any thoughts on that>
nasral00
@nasral00
May 09 2016 04:34
I need help getting my dropdown menu on my navbar to work, does anyone think they can help?
Alex Triece
@atrieceeph289
May 09 2016 04:34
?
Umair Raza
@mrumair94
May 09 2016 04:36
script is not working,
any help?
DJ
@qualitymanifest
May 09 2016 04:39
@mrumair94 it's addClass not addclass and you need a space in between animated and bounce
Mahade Walid
@walidmahade
May 09 2016 04:40
<script>
  $(document).ready(function() {
$("button").addClass("animated bounce");
  });
</script>
@mrumair94
Umair Raza
@mrumair94
May 09 2016 04:43
thanks @qualitymanifest @walidmahade but still not working
CamperBot
@camperbot
May 09 2016 04:43
mrumair94 sends brownie points to @qualitymanifest and @walidmahade :sparkles: :thumbsup: :sparkles:
:cookie: 171 | @walidmahade |http://www.freecodecamp.com/walidmahade
:star2: 1156 | @qualitymanifest |http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
May 09 2016 04:43
@mrumair94 try refreshing the page and running it again. if that doesn't work, paste your current code
Mahade Walid
@walidmahade
May 09 2016 04:43
reset you code, and try again
@mrumair94
Umair Raza
@mrumair94
May 09 2016 04:44
addclass, addClass problem solved thanksss @qualitymanifest @walidmahade
Mahade Walid
@walidmahade
May 09 2016 04:44
wel come @mrumair94
Umair Raza
@mrumair94
May 09 2016 04:45
appreciate you effort !! guyzz thanks again
Mahade Walid
@walidmahade
May 09 2016 04:45
:smile:
Lana
@slanab
May 09 2016 04:46
HI everyone! I'm having a problem with "Make Dead Links using the Hash Symbol", i substituted the link with <p>Click here for <a href="#">cat photos</a>.</p> But this is not accepted as a correct answer. Can anyone help me with this please?
Will
@williamsiu
May 09 2016 04:48
Hey @slanab , I believe it's because you have a period "." after </a>
if you remove that, I believe it should work.
Mal
@NewYork123
May 09 2016 04:49
Hi No.43.how do put in my form element of green tried several times? Thanks
Lana
@slanab
May 09 2016 04:50
<p>Click here for <a href="#">cat photos</a></p> Still doesn't pass
DJ
@qualitymanifest
May 09 2016 04:50
@slanab can you paste the URL to your challenge (full URL, it'll be long), or paste your code
Lana
@slanab
May 09 2016 04:51

Full code:

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

<img class="smaller-image thick-green-border" 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>

DJ
@qualitymanifest
May 09 2016 04:53
@slanab that code passes for me. try refreshing the page and running it again.
Lana
@slanab
May 09 2016 04:55
@qualitymanifest Thank you! It finally worked :)
CamperBot
@camperbot
May 09 2016 04:55
slanab sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star2: 1157 | @qualitymanifest |http://www.freecodecamp.com/qualitymanifest
prithviraj m pillai
@prithviMP
May 09 2016 04:59
hello
i need your help guys
my code is perfectly fine

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

<a href="http://www.freecatphotoapp.com">cat photos</a>

<img class="smaller-image thick-green-border" 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>
<p>View more <a href="http://www.freecatphotoapp.com"></a></p>

have problem in the nesting part
with p and the anchor tag
Lana
@slanab
May 09 2016 05:01
Which challenge is it?
Coy Sanders
@coymeetsworld
May 09 2016 05:01
you need to put something between the anchor tags
@prithviMP
Emanuel Rodriguez
@mannymoose
May 09 2016 05:01
how do you have an h1 inherit body elements ?
Coy Sanders
@coymeetsworld
May 09 2016 05:02
whole sentence should read View more cat photos
prithviraj m pillai
@prithviMP
May 09 2016 05:03
done that
even though it isnt working
sachin
@hisachin
May 09 2016 05:03
i don't have any idea how to add three class in jquery
Lana
@slanab
May 09 2016 05:04
You have </a> closing tag, but I can't see where it is open, maybe that's the problem?
sachin
@hisachin
May 09 2016 05:04

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

Add the animated class to all elements with type button.

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

Add the btn-primary class to the button with id #target1. i want to do this

Coy Sanders
@coymeetsworld
May 09 2016 05:05
a tags are fine
prithviraj m pillai
@prithviMP
May 09 2016 05:05
hey
sry was a fool
got it
did a silly mistake
Coy Sanders
@coymeetsworld
May 09 2016 05:05
putting this at the top? <a href="http://www.freecatphotoapp.com">cat photos</a>
prithviraj m pillai
@prithviMP
May 09 2016 05:05
created a new p element and anchor tag
skilescm
@skilescm
May 09 2016 05:06
@hisachin are you needing help adding btn-primary class?
prithviraj m pillai
@prithviMP
May 09 2016 05:06
ya i put this code at the top and its working
ty guys
Coy Sanders
@coymeetsworld
May 09 2016 05:06
hmm ok, no problem
prithviraj m pillai
@prithviMP
May 09 2016 05:06
and wats this brownie pont
?
sachin
@hisachin
May 09 2016 05:06
@skilescm yes
prithviraj m pillai
@prithviMP
May 09 2016 05:06
point*
skilescm
@skilescm
May 09 2016 05:06
@hisachin are you doing the jQuery tutorial right now?
sachin
@hisachin
May 09 2016 05:07
@skilescm yes right now m doing jQuery tutorials
skilescm
@skilescm
May 09 2016 05:08
The biggest thing to pay attention to is how you are referencing each item. types,classes, and ID's are found using different vales.
sachin
@hisachin
May 09 2016 05:08
@skilescm could you please help me
skilescm
@skilescm
May 09 2016 05:08
I will give you one
you should be able to figure the rest out using my example
sachin
@hisachin
May 09 2016 05:09
can u give me one example how can i do this
skilescm
@skilescm
May 09 2016 05:09
$('#target1').addClass('btn-primary');
sachin
@hisachin
May 09 2016 05:10
i know this
$("button").addclass("animated");
$(".btn").addClasss("shake");
$("#target1").addClass("btn-primary");
I wrote this code
but it dose't pass all the test cases
skilescm
@skilescm
May 09 2016 05:10
I'm not sure what the question is then
Did you put them inside the document ready?
sachin
@hisachin
May 09 2016 05:11
Use the $("button") selector.
Use the $(".btn") selector.
Use the $("#target1") selector.
Only add one class with each of your three selectors.
Your #target1 element should have the classes animated‚ shake and btn-primary.
this is the actual question
skilescm
@skilescm
May 09 2016 05:11

$(document).ready(function() {

});

are they inside of this?
$(document).ready(function() {
});
sachin
@hisachin
May 09 2016 05:12
yes they are inside of document ready
N3ogenesiS
@N3ogenesiS
May 09 2016 05:13
$("button").addClass("animated");
$(".btn").addClass("animated shake");
$("#target").addClass("btn btn-primary);
try that @hisachin. hope it works :).
Yash Agarwal
@yashyy
May 09 2016 05:13
hi guys
i'm new on this forum
Lightgaming
@Lightgaming
May 09 2016 05:14
Hey @yashyy
sachin
@hisachin
May 09 2016 05:14
okk
Chris
@chrisdanielle929
May 09 2016 05:14
hey @yashyy me too!
Modiu B Ijaoye
@MBTIjaoye
May 09 2016 05:14
Hi @yashyy
Yash Agarwal
@yashyy
May 09 2016 05:14
thanks for the correspondence guys!
yash13902
@yash13902
May 09 2016 05:14

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

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

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

<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

skilescm
@skilescm
May 09 2016 05:15
@N3ogenesiS that would add the animated class to both "button" and ".btn"
Yash Agarwal
@yashyy
May 09 2016 05:15
i'm working on the "change the font size of an element part"
<style>
.red-text {
color: red;
}
p {
{font-size: 16px;}
}
</style>
could you guys tell me what im doing wrong
skilescm
@skilescm
May 09 2016 05:16
@hisachin if you have all of that inside of the document ready, I would doublecheck your html to see if everything is labeled correctly
Yash Agarwal
@yashyy
May 09 2016 05:16
it shows a cross against this-"Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%."
skilescm
@skilescm
May 09 2016 05:17
@yashyy you have an extra "}" in your font-size
Emanuel Rodriguez
@mannymoose
May 09 2016 05:17
how do i gave a class pink-text ?
skilescm
@skilescm
May 09 2016 05:17
p {
font-size:16px;
}
Emanuel Rodriguez
@mannymoose
May 09 2016 05:17
whats it meani ?
skilescm
@skilescm
May 09 2016 05:17
@mannymoose <p class='pink-text'>
Yash Agarwal
@yashyy
May 09 2016 05:18
got it. thank you!
Emanuel Rodriguez
@mannymoose
May 09 2016 05:19
how do i give an h1 element that pink text /
?
skilescm
@skilescm
May 09 2016 05:19
@mannymoose css or in line style?
Emanuel Rodriguez
@mannymoose
May 09 2016 05:20
css
skilescm
@skilescm
May 09 2016 05:20
h1 {
color:pink;
}
Lightgaming
@Lightgaming
May 09 2016 05:21
@skilescm But what is it wen i
skilescm
@skilescm
May 09 2016 05:21
@Lightgaming ??
Saad Mehmood
@saadmehmood233
May 09 2016 05:21
.pink-text {
   color: pink;
}
add this class to your h1 tab @mannymoose
*tag
skilescm
@skilescm
May 09 2016 05:22
@saadmehmood233 adding that to the tag won't style it.
sachin
@hisachin
May 09 2016 05:23
<script>
$(document).ready(function() {
$("button").addclass("animated");
$(".btn").addClass("shake");
$("#target1").addClass( "btn-primary animated shake");

});
</script>
i wrote this code in my jQuery tutorial
but it didn't pass this test case: Only add one class with each of your three selectors.
Your #target1 element should have the classes animated‚ shake and btn-primary.
Lightgaming
@Lightgaming
May 09 2016 05:24
@skilescm sry i wanted to delete this Text
skilescm
@skilescm
May 09 2016 05:24
@hisachin your #target1 should only have btn-primary
sachin
@hisachin
May 09 2016 05:25
@skilescm ya i do that also
but it didn't pass that test case
skilescm
@skilescm
May 09 2016 05:25
upload all of your code
including the html
sachin
@hisachin
May 09 2016 05:25
<script>
$(document).ready(function() {
$("button").addclass("animated");
$(".btn").addClass("shake");
$("#target1").addClass( "btn-primary");

});
</script>
Emanuel Rodriguez
@mannymoose
May 09 2016 05:26
how do i add it to my h1
Modiu B Ijaoye
@MBTIjaoye
May 09 2016 05:26
I am having problem with completing this question: Problem : Add a div element with the class "well" inside each of your div element with the class "col-xs-6" ------
skilescm
@skilescm
May 09 2016 05:26
@MBTIjaoye copy your code here please
@mannymoose copy your H1 to the chat
@hisachin what does your html look like?
Emanuel Rodriguez
@mannymoose
May 09 2016 05:28

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

<h1>Hello World!</h1>
</h1>

skilescm
@skilescm
May 09 2016 05:28
does the question want you to use css or in line style @mannymoose ?
Emanuel Rodriguez
@mannymoose
May 09 2016 05:28
css
skilescm
@skilescm
May 09 2016 05:28
h1 {
}
sachin
@hisachin
May 09 2016 05:29
@skilescm <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-primary target animated shake" 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>
skilescm
@skilescm
May 09 2016 05:29
make sure you insert it befor the </style> tage
*tag
@hisachin your #target1 has the btn-primary, animated, and shake in its html
set it back to "btn btn-default" and re-run your jQuery
*"btn btn-default target"
@mannymoose did you get it?
Emanuel Rodriguez
@mannymoose
May 09 2016 05:32
it dont wanna work :[
its the lesson priotize one style over another
skilescm
@skilescm
May 09 2016 05:33
@mannymoose what style are you trying to apply?
Emanuel Rodriguez
@mannymoose
May 09 2016 05:33

Sometimes your HTML elements will receive multiple styles that conflict with one another.

For example, your h1 element can't be both green and pink at the same time.

Let's see what happens when we create a class that makes text pink, then apply it to an element. Will our class override the body element's color: green; CSS property?

Create a CSS class called pink-text that gives an element the color pink.

Give your h1 element the class of pink-text.

skilescm
@skilescm
May 09 2016 05:33
remember that css reads top to bottom. For it to apply pink over the green, the pink style has to come after the green.
sachin
@hisachin
May 09 2016 05:34
@skilescm i did that
skilescm
@skilescm
May 09 2016 05:34
also, did you add the class to the h1?
sachin
@hisachin
May 09 2016 05:34
but test case didn't pass
skilescm
@skilescm
May 09 2016 05:35
@hisachin I would suggest restarting that question and starting fresh
Emanuel Rodriguez
@mannymoose
May 09 2016 05:35

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

<h1>Hello World!</h1>

that the restored text
sachin
@hisachin
May 09 2016 05:35
@skilescm okk
skilescm
@skilescm
May 09 2016 05:35
@mannymoose you also have one too many </h1>
DJ
@qualitymanifest
May 09 2016 05:36

@hisachin if you actually went in and modified your HTML, you shouldn't have done that. the only problem with your original code:

$("button").addclass("animated");
$(".btn").addClass("shake");
$("#target1").addClass( "btn-primary");

is that you had addclass instead of addClass

skilescm
@skilescm
May 09 2016 05:37
@qualitymanifest good eye! I did't even pay attention to the camelcase.
Emanuel Rodriguez
@mannymoose
May 09 2016 05:37
what do mean i have tomany ?
skilescm
@skilescm
May 09 2016 05:38
you're good now. The first time you copied your code you had two </h1> tags
julissamarin
@julissamarin
May 09 2016 05:39
hello, quick question how do we use Access MultiDimensional Arrays With Indexes with bracket notations when var myData = myArray[0][0]; is given
Modiu B Ijaoye
@MBTIjaoye
May 09 2016 05:40

I am having problem with completing this question: Problem : Add a div element with the class "well" inside each of your div element with the class "col-xs-6" ------<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">

</div>
</div>

julissamarin
@julissamarin
May 09 2016 05:40
oh nevermind, i got it!
edison sim
@Edisonsim
May 09 2016 05:41
How do i make a blackground for my text? if i have a photo as my background?
skilescm
@skilescm
May 09 2016 05:41
@MBTIjaoye you just need to create another <div> and place it before the </div> for the "col-xs-6" element
@EdisonSim background for the <body>?
chitrasree
@chitrasree
May 09 2016 05:44
hi every one
skilescm
@skilescm
May 09 2016 05:44
hello @chitrasree !
chitrasree
@chitrasree
May 09 2016 05:44
i need to continue my 81 excerise in html
how can i continue next excersises
??
skilescm
@skilescm
May 09 2016 05:45
click on map
edison sim
@Edisonsim
May 09 2016 05:45
i give it a try
thanks
skilescm
@skilescm
May 09 2016 05:45
@EdisonSim I was asking if you want to apply the image to your <body> tag
chitrasree
@chitrasree
May 09 2016 05:46
already done that excerises
skilescm
@skilescm
May 09 2016 05:46
@chitrasree you have already done all the exercises?
chitrasree
@chitrasree
May 09 2016 05:47
i fineshed rgb color changing
no
skilescm
@skilescm
May 09 2016 05:48
if you click on "map" it should show all of the exercise and have a check mark next to ones you have completed
Modiu B Ijaoye
@MBTIjaoye
May 09 2016 05:48
@skilescm Thanks for the help
CamperBot
@camperbot
May 09 2016 05:48
mbtijaoye sends brownie points to @skilescm :sparkles: :thumbsup: :sparkles:
:cookie: 133 | @skilescm |http://www.freecodecamp.com/skilescm
skilescm
@skilescm
May 09 2016 05:48
@MBTIjaoye no problem!
chitrasree
@chitrasree
May 09 2016 05:49
thanks for guide
Umair Raza
@mrumair94
May 09 2016 05:52

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

});
</script>
could u tell me where i am wrong?

skilescm
@skilescm
May 09 2016 05:52
@mrumair94 only add btn-primary to #target1
Umair Raza
@mrumair94
May 09 2016 05:53
got it thanks @skilescm
CamperBot
@camperbot
May 09 2016 05:53
mrumair94 sends brownie points to @skilescm :sparkles: :thumbsup: :sparkles:
:cookie: 134 | @skilescm |http://www.freecodecamp.com/skilescm
skilescm
@skilescm
May 09 2016 05:53
@mrumair94 no problem
Emanuel Rodriguez
@mannymoose
May 09 2016 05:55
ive done 2 out of three check points but still claims my h1 should have the class pink-text
skilescm
@skilescm
May 09 2016 05:56
upload your current code
@mannymoose
Emanuel Rodriguez
@mannymoose
May 09 2016 05:56

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

<h1>Hello World!</h1>

skilescm
@skilescm
May 09 2016 05:57
<h1 class='pink-text'>
and delete the "h1" from your css
@mannymoose
did it work?
Emanuel Rodriguez
@mannymoose
May 09 2016 06:02
yay!!! it finely passed :shipit:
thank you :]
skilescm
@skilescm
May 09 2016 06:02
no problem!
Peter Svedman
@petersvedman
May 09 2016 06:06
Good morning, campers! Anyone have a suggestion for a good e-book or app about Javascript, preferrably with a good section on data structures and objects, that I can read/use on the bus? Need some extra brainfood to grok it.
skilescm
@skilescm
May 09 2016 06:07
@petersvedman check out solo learn app
they have one for javascript, css, html5
Peter Svedman
@petersvedman
May 09 2016 06:09
Thanks, @skilescm , have that one but its kinda shallow.
CamperBot
@camperbot
May 09 2016 06:09
petersvedman sends brownie points to @skilescm :sparkles: :thumbsup: :sparkles:
:cookie: 135 | @skilescm |http://www.freecodecamp.com/skilescm
skilescm
@skilescm
May 09 2016 06:11
Yeah, I also have "learn javascript in 24 hours". A lot more in depth. Not sure if it has made its way to an e-book yet though.
Peter Svedman
@petersvedman
May 09 2016 06:13
Ill check that one out.
thanks
Marce Villarreal
@marcewhocode
May 09 2016 06:20
Hi, anyone up to help me cuz im not really sure what is wronge with the form action attribute...
<form action="submit-cat-photo">

<input type="text" placeholder="cat photo URL"> </form>
wrong* not wronge sorry
skilescm
@skilescm
May 09 2016 06:22
action is usually pointed to a URL
richiedSIS
@richiedSIS
May 09 2016 06:22
@marcewhocode I think for that it's supposed to be <form action="/submit-cat-photo">
try it with the /
Marce Villarreal
@marcewhocode
May 09 2016 06:23
there you go, thanks @richiedSIS
CamperBot
@camperbot
May 09 2016 06:23
marcewhocode sends brownie points to @richiedsis :sparkles: :thumbsup: :sparkles:
:cookie: 181 | @richiedsis |http://www.freecodecamp.com/richiedsis
Marce Villarreal
@marcewhocode
May 09 2016 06:23
Thanks @skilescm
CamperBot
@camperbot
May 09 2016 06:23
marcewhocode sends brownie points to @skilescm :sparkles: :thumbsup: :sparkles:
:cookie: 138 | @skilescm |http://www.freecodecamp.com/skilescm
felix östholm
@fellelele
May 09 2016 06:50
i need help with Nest all of your radio buttons inside one div with the class row.
Nest each of your radio buttons inside its own div with the class col-xs-6.
Make sure each of your div elements has a closing tag.
Jay-Ar Jamon
@skrpt
May 09 2016 06:52
Hello?
rphares
@rphares
May 09 2016 06:53
@fellelele which lesson are you on?
Saad Mehmood
@saadmehmood233
May 09 2016 06:53
hi @skrpt
Nic
@NicH4real
May 09 2016 07:03
Screen Shot 2016-05-08 at 11.52.40 PM.png
Please help
rphares
@rphares
May 09 2016 07:04
@NicH4real , you dont need the separate <h2> at the beginning
you only need one tag, for example using p:
<p class = "something> The text here </p>
This message was deleted
Nic
@NicH4real
May 09 2016 07:05
i love you you're my hero
rphares
@rphares
May 09 2016 07:05
ah, got it? Congrats and happy coding! :)
felix östholm
@fellelele
May 09 2016 07:41
<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">

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

</div>
</div>
</div>
Add a div element with the class well inside each of your div elements with the class "col-xs-6"
Jeff Gaoey
@Gaoey
May 09 2016 07:44
hey guys I have a ploblem with local weather app.
they recommend to use weatherAPI but I found that can access only http (https for pricing) and geolocation.getCurrentPosition method they need to use https for accessing.
so I decided to leave using geolocation , I want to get current longitude and latitude with other api. any suggest?
Danny Rubio
@drbe4t
May 09 2016 07:45
Hey guys so i'm stuck on the the jQuery track on the parenting section . I have $("#target5").clone().appendTo("#left-well");
$("#left-well").parent().css("background-color","red"); put when i try to ctrl+ enter it. it randomly generates another repeat of the clone and append function of the #target 5. anyhelp?
<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well");
    $("#target5").clone().appendTo("#left-well");
    $("#left-well").parent().css("background-color","red");

  });
</script>
this is my current script code
rphares
@rphares
May 09 2016 07:55
This message was deleted
This message was deleted
that last one-- @drbe4t
check the instructions again-- what is supposed to be targeted in the last one? not #left-well....
@drbe4t
Vikas Gupta
@vikasgupta23
May 09 2016 08:00
how to give your button element with the id target1 the text #target1.?
Islam Ibakaev
@dagman
May 09 2016 08:01
@vikasgupta23 $("#target1").text('#target1')
Danny Rubio
@drbe4t
May 09 2016 08:03
@rphares thanks I miss understood how the parent function worked
CamperBot
@camperbot
May 09 2016 08:03
drbe4t sends brownie points to @rphares :sparkles: :thumbsup: :sparkles:
:star2: 4404 | @rphares |http://www.freecodecamp.com/rphares
rphares
@rphares
May 09 2016 08:04
Glad you got it! Congrats and happy coin~
Danny Rubio
@drbe4t
May 09 2016 08:05
Thanks!
Maria J
@oheymaria
May 09 2016 08:26
Skjermbilde 2016-05-09 kl. 10.13.54.png
Can´t get the "Nest your text input element within a form element."
rphares
@rphares
May 09 2016 08:28
really close, @oheymaria , but you need to put the whole <input type="text" placeholder="cat photo URL"> line inside the form element
that is, <form><input></form> , more or less...
Mahade Walid
@walidmahade
May 09 2016 08:29

function myLocalScope() {
  'use strict';

  myVar = 9;
  console.log(myVar);
}
myLocalScope();

// Run and check the console
// myVar is not defined outside of myLocalScope
console.log(myVar);

// Now remove the console log line to pass the test
which console.log() should I remove?
rphares
@rphares
May 09 2016 08:29
hiya, @walidmahade -- two things, actually,
the first thing tripping you up is that you need the var keyword when you declare myVar
Mahade Walid
@walidmahade
May 09 2016 08:30
both of them?
rphares
@rphares
May 09 2016 08:30
ie, inside your function is should say var myVar = 9 in your case,
not when you console.log it, only when you declare it... the first time you declare something, you need var at the beignning
Maria J
@oheymaria
May 09 2016 08:31
@rphares Thank you!
CamperBot
@camperbot
May 09 2016 08:31
oheymaria sends brownie points to @rphares :sparkles: :thumbsup: :sparkles:
:star2: 4406 | @rphares |http://www.freecodecamp.com/rphares
Mahade Walid
@walidmahade
May 09 2016 08:31
thanks @rphares
CamperBot
@camperbot
May 09 2016 08:31
walidmahade sends brownie points to @rphares :sparkles: :thumbsup: :sparkles:
:star2: 4407 | @rphares |http://www.freecodecamp.com/rphares
Mahade Walid
@walidmahade
May 09 2016 08:31
I get it now
rphares
@rphares
May 09 2016 08:31
Got it? Awesome! Congrats and happy coding @oheymaria and @walidmahade ! :blush:
Mahade Walid
@walidmahade
May 09 2016 08:31
:smile:
felix östholm
@fellelele
May 09 2016 08:35
i need help with Target Elements by Class Using jQuery
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 08:36
please somebody say thank you to me i want some points
Kiryl Kastko
@kirylkastko
May 09 2016 08:36
@fellelele what is the question?
rphares
@rphares
May 09 2016 08:36
@fellelele , sure! can you paste your code, please? :blush:
felix östholm
@fellelele
May 09 2016 08:36
Use the jQuery addClass() function to give the classes animated and shake to all your elements with the class well.

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

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

rphares
@rphares
May 09 2016 08:37
okay, so-- it will always start with <script> $(document).ready(function() {
so that top line is in the wrong spot, to begin with,
you could put him after your lines $(document).ready(function() { $("button").addClass("animated bounce");
then, you have another problem still:
felix östholm
@fellelele
May 09 2016 08:39
i dont understand man
rphares
@rphares
May 09 2016 08:39
in what you have in that top line, $(".text-primary").addClass("animated shake"); you are changing `".text-primary"
okay,
felix östholm
@fellelele
May 09 2016 08:39
say what i should write down
rphares
@rphares
May 09 2016 08:39
your jQuery stuff should always start with $(document).ready(function() {
look at your code again-- you have that, but that is your second line right now,
it needs to be first.
you have added stuff before it,
felix östholm
@fellelele
May 09 2016 08:41

<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
});
</script>

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

rphares
@rphares
May 09 2016 08:41
better!
felix östholm
@fellelele
May 09 2016 08:41
say what i should do now
rphares
@rphares
May 09 2016 08:41
now, you still need $(".SOMETHING").addClass("animated shake")
felix östholm
@fellelele
May 09 2016 08:42
okey
rphares
@rphares
May 09 2016 08:42
it goes after the second line, $("button").addClass("animated bounce");
felix östholm
@fellelele
May 09 2016 08:42
i added it
rphares
@rphares
May 09 2016 08:42
except,
you dont want .SOMETHING
felix östholm
@fellelele
May 09 2016 08:42
okey what i want there
rphares
@rphares
May 09 2016 08:43
what were you supposed to add that class to? check the instructions?
you should be failing one test right now, as it is-- Use the jQuery addClass() function to give the classes animated and shake to all your elements with the class well.
felix östholm
@fellelele
May 09 2016 08:44
thanks
rphares
@rphares
May 09 2016 08:44
got it? Awesome!
Congrats and happy coding, @fellelele ~
felix östholm
@fellelele
May 09 2016 08:45
thanks
Dominic Lobban
@alkapwn3d
May 09 2016 08:59
how do you oget it to put your text in a grey box like that?
rphares
@rphares
May 09 2016 09:00
you type one ` before and after
@alkapwn3d
explain format
CamperBot
@camperbot
May 09 2016 09:00

:point_right: code formatting [wiki]

Multi line Code

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

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

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

Single line Code

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

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

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

rphares
@rphares
May 09 2016 09:01
^^ the black box part is super important-- a lot of times, people ignore code Qs if the code isn't formatted, @alkapwn3d .
Dominic Lobban
@alkapwn3d
May 09 2016 09:01
test
cool
rphares
@rphares
May 09 2016 09:01
you got it! :)
Aus
@austinley
May 09 2016 09:04
hey guys - i'm getting a bit stuck on "Change Text Inside an Element Using jQuery"
rphares
@rphares
May 09 2016 09:05
Hi, @austinley ! Could you paste your formatted code, please? (to learn how to format, please read :point_up: May 9, 2016 2:00 AM ) :blush:
Aus
@austinley
May 09 2016 09:05
There is one particular part I can't trigger within the challenge - "Emphasize the text in your target4 button by adding html tags"
Maria J
@oheymaria
May 09 2016 09:06
Skjermbilde 2016-05-09 kl. 11.05.13.png
Dominic Lobban
@alkapwn3d
May 09 2016 09:06
you probablyl need to add a class to your tag
Maria J
@oheymaria
May 09 2016 09:07
It says on the bottom "Do not give your form any class or style attributes"
simon clotworthy
@nzkeyboard
May 09 2016 09:07
is gitter beeping ?
rphares
@rphares
May 09 2016 09:07
@oheymaria , check your style section--
simon clotworthy
@nzkeyboard
May 09 2016 09:07
its driving me insane
Aus
@austinley
May 09 2016 09:08
This message was deleted
rphares
@rphares
May 09 2016 09:08
you gave cat-photo-element a green background, @oheymaria ... what is the actual ID it should be?
Aus
@austinley
May 09 2016 09:08
<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("target4").html("<em>#target4</em>");
  });
</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>
rphares
@rphares
May 09 2016 09:08
missing a # in front of target4? @austinley
Aus
@austinley
May 09 2016 09:09
yikes - so simple, thanks @rphares
CamperBot
@camperbot
May 09 2016 09:09
austinley sends brownie points to @rphares :sparkles: :thumbsup: :sparkles:
Dominic Lobban
@alkapwn3d
May 09 2016 09:09
@oheymaria youre missing id="cat-photo-element in your form tag
CamperBot
@camperbot
May 09 2016 09:09
:star2: 4409 | @rphares |http://www.freecodecamp.com/rphares
rphares
@rphares
May 09 2016 09:09
anytime! :blush:
Dominic Lobban
@alkapwn3d
May 09 2016 09:10
@oheymaria yours says cat-photo-form
rphares
@rphares
May 09 2016 09:10
mm, actually, element was the example, i think, @alkapwn3d ... she should have cat-photo-form in her style section, if i recall (going by the test)
simon clotworthy
@nzkeyboard
May 09 2016 09:10
please god someone tell me how to disable GITTER beeps
Dominic Lobban
@alkapwn3d
May 09 2016 09:10
lol
simon clotworthy
@nzkeyboard
May 09 2016 09:10
why did it randomly start now
WHY
Maria J
@oheymaria
May 09 2016 09:11
@rphares @alkapwn3d yes! I figured it out. I wrote cat-photo-element when it was supposed to be cat-photo-form
Dominic Lobban
@alkapwn3d
May 09 2016 09:11
top right side theres a slider button
set it so it only beeps when you get mentioned
rphares
@rphares
May 09 2016 09:11
Yay! Congrats and happy coding~ @oheymaria
hmm, mine has never beeped, @nzkeyboard . you can change the notifications, or just mute?
(others say it makes sounds... never has for me, I've always been disappointed, heh)
simon clotworthy
@nzkeyboard
May 09 2016 09:12
mine randomly started beeping about 5 minutes ago out of the blue... thanks @alkapwn3d
CamperBot
@camperbot
May 09 2016 09:12
nzkeyboard sends brownie points to @alkapwn3d :sparkles: :thumbsup: :sparkles:
:cookie: 23 | @alkapwn3d |http://www.freecodecamp.com/alkapwn3d
simon clotworthy
@nzkeyboard
May 09 2016 09:12
sooo weird lol
Dominic Lobban
@alkapwn3d
May 09 2016 09:13
computers are very emotional creatures
simon clotworthy
@nzkeyboard
May 09 2016 09:13
lol
Realstud
@StudFa
May 09 2016 09:53
Hwy guys how can you uncomments commments?
how
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 09:54
Guys you can Indent multiple lines at ones by selecting them and pressing #ctrl/cmd+]#

ctrl/cmd=]

@StudFa In which language?
Realstud
@StudFa
May 09 2016 09:55
english
im new and i need some help
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 09:56
in coding or some where else
Realstud
@StudFa
May 09 2016 09:56
in code
Are you new to?
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 09:57
you can delete this <!--and this-->
not really i'm 1 night old.
Realstud
@StudFa
May 09 2016 09:57
oke
your study It to?
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 09:58
yups
Realstud
@StudFa
May 09 2016 09:58
me to
i love it
Can you change language here?
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 10:00
English to something else
Realstud
@StudFa
May 09 2016 10:00
something eles
else
like spanish
rphares
@rphares
May 09 2016 10:00
there are language specific rooms,
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 10:01
No I don't think so but there should be some groups with spanish people
rphares
@rphares
May 09 2016 10:01
there is a spanish room
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 10:01
you just search for them or you can also create one
Realstud
@StudFa
May 09 2016 10:01
if a talk whit yours i can fix my english
whirret
@whirret
May 09 2016 10:02
hello! so i just started with the html challenges, and i noticed they have us change font colors by adding a css class. i was wondering tho, can't you just change a font color using html ex. < font-color=blue >? it feels kind of redundant to make a class and then attach that class again if all you're doing is changing the font color. was this just for example purposes for when things get more complex, or is it actually better to use css in this situation?
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 10:03
@StudFa yeah it's my English was also not good but did't stopped to talk with others
StasiekK
@StasiekK
May 09 2016 10:03
@whirret what if you would like to change a font color for 2000 elements on site?
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 10:03
my English is still not good but i can make them understand]
StasiekK
@StasiekK
May 09 2016 10:04
well you could change 2000 the color or change just once inside a class
Realstud
@StudFa
May 09 2016 10:04
that's really nice
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 10:05
@StudFa you can also improve your enlish by watching enslish movies or Americal televison series with subtitles
Realstud
@StudFa
May 09 2016 10:05
yes nice tips thanks friend
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 10:06
@StudFa Anytime sir
Darth Skywalker
@adityaparab
May 09 2016 10:07
@whirret : Those are deprecated ways from the late 90s. Although it does seem simple and less redundant in short term, those things turn out to be a huge pain in the ass while working on real world projects. No scalability, lot of repeatation and no reuse. :)
jamesallen1705
@jamesallen1705
May 09 2016 10:09
Can anyone help me with the tribute page. I am just trying to set up the basic structure of my page. I am not sure if this is the right approach, but I have decided to use wells for the four elements of the page (navigation bar, about section, portfolio section and contact section. My first well (intended for the navigation bar) seems to have swallowed the other three and I'm not sure where i have gone wrong. Link here: https://codepen.io/JamesAllen1705/pen/GZzZVp?editors=1100
Darth Skywalker
@adityaparab
May 09 2016 10:12
@jamesallen1705 : You've screwed up the structure. If I understand what you want correctly, you want a navigation bar of full length, correct?
jamesallen1705
@jamesallen1705
May 09 2016 10:13
Yep :-)
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 10:13
You just forgot to close you div
Darth Skywalker
@adityaparab
May 09 2016 10:13

@jamesallen1705 : It always helps to read the docs of the framework you're using. :)

Here, take a look at the right way of using the nav bar

http://getbootstrap.com/components/#navbar

jamesallen1705
@jamesallen1705
May 09 2016 10:14
Thanks, I spotted my div issue, typed "dv" instead of "div".... I had a feeling the structure was all wrong for what I am trying to achieve.
Thanks @adityaparab
CamperBot
@camperbot
May 09 2016 10:16
jamesallen1705 sends brownie points to @adityaparab :sparkles: :thumbsup: :sparkles:
:cookie: 238 | @adityaparab |http://www.freecodecamp.com/adityaparab
Wise
@WiseNN
May 09 2016 10:27
Has anyone here used the yahpp API YQL from yahoo to get the weather?? (or anything for that matter)
Matej Palo
@dynematik
May 09 2016 10:31
Hey guys, is there any code that'll hide the div and replace it with another when I scroll past 200px?
Islam Ibakaev
@dagman
May 09 2016 10:33
is there a way to provide to parent component an object that i get consoled when click on agree button? Is it good to set state and methods in child component or all state should be accumulated in parent component? http://codepen.io/dagman/pen/wGNwjM
whirret
@whirret
May 09 2016 10:38
@adityaparab i see! thank you!
CamperBot
@camperbot
May 09 2016 10:38
whirret sends brownie points to @adityaparab :sparkles: :thumbsup: :sparkles:
:cookie: 239 | @adityaparab |http://www.freecodecamp.com/adityaparab
whirret
@whirret
May 09 2016 10:39
@StasiekK right! it just kind of clicked in my head haha. so you would only change the css at the top and then everything would change automatically
Arpan
@sahooarpan
May 09 2016 10:40
HOW to Give the submit button in your form the classes btn btn-primary.
Add a <i class="fa fa-paper-plane"></i> within your submit button element.
Give the text input in your form the class form-control.
??
Kiryl Kastko
@kirylkastko
May 09 2016 10:43
@sahooarpan show your code please.
Arpan
@sahooarpan
May 09 2016 10:44

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

<style>
h2 {
font-family: Lobster, Monospace;
}

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

</style>

<div class="container-fluid">
<div class="row">
<div class="col-xs-8">
<h2 class="text-primary text-center">CatPhotoApp</h2>
</div>
<div class="col-xs-4">
<a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>
</div>
</div>
<img src="https://bit.ly/fcc-running-cats" class="img-responsive">
<div class="row">
<div class="col-xs-4">
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div>
</div>
<p>Things cats <span class="text-danger">love:</span></p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<div class="row">
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
</div>
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
</div>
</div>
<div class="row">
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Loving</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Lazy</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Crazy</label>
</div>
</div>
<input type="text" placeholder="cat photo URL" required>
<button class="btn btn-primary"><i class="fa-paper-plane"></i>Submit</button>
</form>
</div>

Kiryl Kastko
@kirylkastko
May 09 2016 10:48
@sahooarpan check classes on your i element inside submit button.
Arpan
@sahooarpan
May 09 2016 10:49
ya i done fa fa-paper-plane bt still not runnng
Kiryl Kastko
@kirylkastko
May 09 2016 10:51
<input type="text" class="form-control" placeholder="cat photo URL" required>
<button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i>Submit</button>
Xhipu
@Xhipu
May 09 2016 10:59
@kirillkostko try <i class= fa fa-paper-plane"> this should normaly work
@kirillkostko oh sry u did that alrdy ^^
Arpan
@sahooarpan
May 09 2016 11:01
thanx @kirillkostko
CamperBot
@camperbot
May 09 2016 11:01
sahooarpan sends brownie points to @kirillkostko :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for kirillkostko
Jack Woo
@wushige
May 09 2016 11:19

function factorialize(num) {
if (num <= 0) return 1;
for (var i = 1; i <= num; i++) {
num *= i;
}
return num;
}

factorialize(5)

Browser crashes, can not enter the next step, how can i do?
challenges: factorialize-a-number
Markus Kiili
@Masd925
May 09 2016 11:22
@wushige Make a result variable that you change inside the loop.
Kiryl Kastko
@kirylkastko
May 09 2016 11:23
use a separated variable in your function instead of num @wushige
Daniel O'Mahony
@OMahonyD
May 09 2016 11:23
@wushige Your if statement is correct. It's the for loop that is causing the problem. The function is asking for a factorial which suggests recursion
Jack Woo
@wushige
May 09 2016 11:24
my browser crashed, can not edit this page any more
Daniel O'Mahony
@OMahonyD
May 09 2016 11:24
@wushige Here's my pseudocode. It might help:
//if num is 1 there are no other positive integers
//less than or equal to 1 so just return 1
//else num is greater than 1
//set num equal to (num multiplied by the function factorialize
//taking (num minus 1) as the variable
//This will recursively repeat until the condition
//in the if statement is true;
That happened to me. I opened it in a different browser.
elminsterrr
@elminsterrr
May 09 2016 11:26
hello,
Is it a bug?
jstruncateString("A-tisket a-tasket A green and yellow basket", "A-tisket a-tasket A green and yellow basket".length) should return "A-tisket a-tasket A green and yellow basket".
I don't understand this entry. All other cases my code passes, but this I do not understand.
It is from https://www.freecodecamp.com/challenges/truncate-a-string
Can anyone help please?
Darth Skywalker
@adityaparab
May 09 2016 11:28
@elminsterrr : It's correct! Not a bug
elminsterrr
@elminsterrr
May 09 2016 11:28
My code:
function truncateString(str, num) {
var ciach =""; 
var pach ="";
  if(num <= 3){
    ciach = str.slice(0,num);
    pach = ciach + "...";
    console.log(pach);
  } else {
      ciach = str.slice(0,num-3);
      pach = ciach + "...";
      console.log(pach);
    }
  return pach;
}

truncateString("A-tisket a-tasket A green and yellow basket", 11);
@adityaparab What should I change in my code to pass this?
Darth Skywalker
@adityaparab
May 09 2016 11:30
The description says, if the length is greater than 2nd argument, then you need to append ... to the string. So in case of "same string".length, then the length of string is not greater than 2nd argument, so your function should return the same string unmodified.
Jack Woo
@wushige
May 09 2016 11:31
@OMahonyD It worked when i tried in another browser
Shahariar Touhid
@shahariar50
May 09 2016 11:31
hay buddy... I have find a problem...n
elminsterrr
@elminsterrr
May 09 2016 11:31
@adityaparab ok, I will try that
Daniel O'Mahony
@OMahonyD
May 09 2016 11:32
@wushige Glad it worked!
Chris Cullen
@123xylem
May 09 2016 11:32
WHy is my List not displaying vertically?
http://codepen.io/pen/
Wise
@WiseNN
May 09 2016 11:39
Quick question…when requesting JSON from an API…how do you know if it is a string or a string that translates into an image…like a weather icon or a background picture
Darth Skywalker
@adityaparab
May 09 2016 11:41

@elminsterrr :smile:

Here is how I was able to do it

function truncateString(str, num) {

  if(num >= str.length){
    return str;
  }

  str = str.split('');

  if(str.length<=3){
    return str.slice(0,1).join('')+'...';
  }

  var index = num < 3 ? num : num-3;

  return str.slice(0,index).join('')+'...';

}
Chris Cullen
@123xylem
May 09 2016 11:42
Do you know why my List isnt displaying horizontally?
http://codepen.io/123xylem/pen/WwPKrj?editors=1111
Darth Skywalker
@adityaparab
May 09 2016 11:44
@WiseNN : It can be determined by the content type of the request.

@123xylem : Your li elements need to be set to display:inline-block;

add this to CSS

li {
  display:inline-block;
}
elminsterrr
@elminsterrr
May 09 2016 11:45
@adityaparab my code is also wroking, thank your for your help :smile:
CamperBot
@camperbot
May 09 2016 11:45
elminsterrr sends brownie points to @adityaparab :sparkles: :thumbsup: :sparkles:
:cookie: 240 | @adityaparab |http://www.freecodecamp.com/adityaparab
elminsterrr
@elminsterrr
May 09 2016 11:46
My code:
function truncateString(str, num) {

var ciach =""; 
var pach ="";
  if (str.length > num) {
    if(num <= 3){
      ciach = str.slice(0,num);
      pach = ciach + "...";
      console.log(pach);
    } else {
        ciach = str.slice(0,num-3);
        pach = ciach + "...";
        console.log(pach);
      }
    return pach;
    } else {
        return str;
    }
}

truncateString("A-tisket a-tasket A green and yellow basket", 11);
Chris Cullen
@123xylem
May 09 2016 11:46
@adityaparab O each one individually... Damn
Darth Skywalker
@adityaparab
May 09 2016 11:47
@123xylem : What do you mean >Each one individually?
Chris Cullen
@123xylem
May 09 2016 11:47
O wait some1 just said It was because of no bootstrap
I meant each li> needs inline class rather than just the UL
Darth Skywalker
@adityaparab
May 09 2016 11:47
nope!. The li elements are by default set to block display. YOu need to set to them to inline.

@123xylem : Nope, you don't need to add class on each one.

You can use the context selectors.

li{
    display:inline-block;
}

will apply this property to ALL li elements in your document.

Chris Cullen
@123xylem
May 09 2016 11:49
Ahhhhhhh @adityaparab thanks... interesting
CamperBot
@camperbot
May 09 2016 11:49
123xylem sends brownie points to @adityaparab :sparkles: :thumbsup: :sparkles:
:cookie: 241 | @adityaparab |http://www.freecodecamp.com/adityaparab
Xhipu
@Xhipu
May 09 2016 11:49
The value of remainder should be 2
You should use the % operator
(which numbers do i have to use ?
Darth Skywalker
@adityaparab
May 09 2016 11:52

@Xhipu :smile:
Pick your poison

5%3 = 2
42%8=2
7%5=2

basically any combination of x and y where if you divide x by y (x/y) the remainder is 2

Xhipu
@Xhipu
May 09 2016 11:52
okay thank you :D
Edwin Boon
@edwinboon1988
May 09 2016 12:00

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

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

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

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

<p>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>

woops hit enter way to early sorry for that
anyway can't pass the challange since my seccond P element is not valid for the Kitty ipsum text. Anyone can tell me what I'm doing wrong?
Darth Skywalker
@adityaparab
May 09 2016 12:02
@edwinboon1988 : I had the same problem. See instructions again. There is another text that you should replace in your 2nd p tag
Edwin Boon
@edwinboon1988
May 09 2016 12:03
@adityaparab will look it up thanks for reply :D
Abdul
@abdul786483
May 09 2016 12:03
Im getting struck in the code
CamperBot
@camperbot
May 09 2016 12:03
edwinboon1988 sends brownie points to @adityaparab :sparkles: :thumbsup: :sparkles:
:cookie: 243 | @adityaparab |http://www.freecodecamp.com/adityaparab
Abdul
@abdul786483
May 09 2016 12:03
Inherit Styles from the Body Element
In that chapter Im getting problem
Maria J
@oheymaria
May 09 2016 12:13
Skjermbilde 2016-05-09 kl. 14.12.15.png
I can get the "Target the element with the id target3 and use the jQuery addClass() function to give it the class fadeOut."
Xhipu
@Xhipu
May 09 2016 12:14
@oheymaria u need to use (animated fadeOut);
Maria J
@oheymaria
May 09 2016 12:14
It does not work
Xhipu
@Xhipu
May 09 2016 12:14
and write addClass with a uppercase C
Maria J
@oheymaria
May 09 2016 12:15
Oh got it with the uppercase C
upendrahanda
@upendrahanda
May 09 2016 12:15
@oheymaria the only problem i see is lower case c
Maria J
@oheymaria
May 09 2016 12:15
thanks @Xhipu
CamperBot
@camperbot
May 09 2016 12:15
oheymaria sends brownie points to @xhipu :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for xhipu
Xhipu
@Xhipu
May 09 2016 12:15
no problem ;)
upendrahanda
@upendrahanda
May 09 2016 12:17
has anyone used database with js?
Darth Skywalker
@adityaparab
May 09 2016 12:17
@upendrahanda : Yes. What's up with that?
@upendrahanda : You're gonna need to write your own server in NodeJS if you want to access db using javascript
upendrahanda
@upendrahanda
May 09 2016 12:18
I have used ASP.NET where it would be compiled files, but here I donno how to do it
Wise
@WiseNN
May 09 2016 12:19
@adityaparab Sorry…didnt see the response…what do you mean? JSON returns the data type of JSON…Im saying how do you tell the difference between he information in the JSON arrays, and the image names
they are both written as strings
Darth Skywalker
@adityaparab
May 09 2016 12:20
@upendrahanda : What are you trying to do?
upendrahanda
@upendrahanda
May 09 2016 12:21
Aditya, I am trying to insert and select chat messages using javascript.
Darth Skywalker
@adityaparab
May 09 2016 12:21
@upendrahanda - insert and select into what and from where? :)
upendrahanda
@upendrahanda
May 09 2016 12:21
While I can do it using ASP and use js to show users quick chat messages
from and to a mysql server
Darth Skywalker
@adityaparab
May 09 2016 12:22
@WiseNN :smile:
There are muliple ways. Best way is to have a structire to the json where you put the image name with appropriate key. like imgname : 'img.png'
upendrahanda
@upendrahanda
May 09 2016 12:23
I just wanted to know that as js is an interpreted language, if there is a provision to pass db password, it should be exposed to public which is not safe. So, I think we need some language support with it like python or asp always
Darth Skywalker
@adityaparab
May 09 2016 12:23
@upendrahanda :smile:
Okay:Node JS! :)
You do the same thing you do in ASP, only thing is, in this case you'll write your code in JS
correct. You write servers in Node JS
Wise
@WiseNN
May 09 2016 12:24
@adityaparab My apologies…I am specifically talking about api’s…like how do I know a value is corresponding to an image name. I switched my weather api to yahoo, and I am trying to get the flickr weather picture thing going on like how they have it
@adityaparab the icons as well...
Patrick Mitton
@pkmitton
May 09 2016 12:24
Good morning, everyone. Can anyone help me figure this out?

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

// Only change code below this line
function updateRecords(id, prop, value) {
  for (id in collection) {
    if (value !== "") {
      if (prop !== "tracks") {
        collection.id[prop] = value;
      } else {
        collection[id].push(prop, value);
      }
    } else {
      break;
    }
  }

  return collection;
}

// Alter values below to test your code
updateRecords(5439, "artist", "ABBA");
Xhipu
@Xhipu
May 09 2016 12:25

// Setup
var myStr = "Jello World";

// Only change code below this line

myStr[0] = "H"; // Fix Me

i cant find the mistake

upendrahanda
@upendrahanda
May 09 2016 12:26
@WiseNN I think you should have the knowledge of which node of that JSON objkect is holding the value of image
Patrick Mitton
@pkmitton
May 09 2016 12:26
I'm trying to write the function to update the album collection, but I keep getting this error message: "cannot set property 'artist' of undefined"
Why isn't it defined?
Darth Skywalker
@adityaparab
May 09 2016 12:27
@WiseNN : You gotta know the key with which the image names are being returned. There is no inherent way to do that in any technology. You can always study the API response and know what key is being used for image names.
@Xhipu : var myStr = "Hello World";
Wise
@WiseNN
May 09 2016 12:27
@upendrahanda Why should I ? they arent holding urls, and they arent holding values with an image extension…why do you say that?
Markus Kiili
@Masd925
May 09 2016 12:27
@pkmitton You don't need any loop on Record collection. Just a couple of if's.
Xhipu
@Xhipu
May 09 2016 12:27
thanks @adityaparab
CamperBot
@camperbot
May 09 2016 12:27
xhipu sends brownie points to @adityaparab :sparkles: :thumbsup: :sparkles:
:cookie: 245 | @adityaparab |http://www.freecodecamp.com/adityaparab
upendrahanda
@upendrahanda
May 09 2016 12:28
well @WiseNN because you cannot say which key is holding what value until you know about the json response you are getting. May it be its first key is holding temp in celsiuis, second the image and third the humidity and vice versa
Patrick Mitton
@pkmitton
May 09 2016 12:29
@Masd925 What does that mean? I don't need the for/if?
upendrahanda
@upendrahanda
May 09 2016 12:30
and yes, if they are not holding values with img extension, then you can manually add it.. you gotta know which key is replaying what data type to you
*replying
Markus Kiili
@Masd925
May 09 2016 12:30
@pkmitton You only need three tests for value and prop. Then do different things on collection.
Wise
@WiseNN
May 09 2016 12:31
@adityaparab @upendrahanda That sounds good in theory, but looking at the JSON is another story. Take this for example...
Screen Shot 2016-05-09 at 8.30.02 AM.png not sure how it would be obvious that the code: is an image
Darth Skywalker
@adityaparab
May 09 2016 12:31

@upendrahanda : Regarding OOP -
Hehe! That is a good question. I know I've pondered over it for a long time. Hiding data sounds a bit strange especially when you SEE the code right in front of your eyes. lol

So when they say you hide data, what they mean in you hide data (meaning values held by variables and the variable) from the code outside of the context of that code.

So noone but authorized code can modify or manipulate values. So essentially, you're hiding code from external environment.

Blauelf
@Blauelf
May 09 2016 12:31
@Masd925 Requires only two tests, as the third case is all that are not covered by the other two :P
Patrick Mitton
@pkmitton
May 09 2016 12:32
Alright, thanks @Masd925 I'll try rewriting it.
CamperBot
@camperbot
May 09 2016 12:32
pkmitton sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 1446 | @masd925 |http://www.freecodecamp.com/masd925
upendrahanda
@upendrahanda
May 09 2016 12:32
which one is image url @WiseNN
Darth Skywalker
@adityaparab
May 09 2016 12:32
@WiseNN : is the link key an image name?
upendrahanda
@upendrahanda
May 09 2016 12:33
thats what my doubt is aditya
Wise
@WiseNN
May 09 2016 12:33
@adityaparab no, thats the link to yahoo’s weather app
upendrahanda
@upendrahanda
May 09 2016 12:33
i think this one will help you better @WiseNN , you have a direct key to weather image
Darth Skywalker
@adityaparab
May 09 2016 12:33
@WiseNN : Then what is the image name in this response?
Darth Skywalker
@adityaparab
May 09 2016 12:34
@WiseNN : In theyahoo API there is a field called image
"image": {
     "title": "Yahoo! Weather",
     "width": "142",
     "height": "18",
     "link": "http://weather.yahoo.com",
     "url": "http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"
    }
Wise
@WiseNN
May 09 2016 12:35
@adityaparab one key is ‘code’ , the only reason I found this out was because I was on github diving in forums looking for a link for someing comepletely unrelated…another guy asked the same question…someone then responded and told him you had to manually add the pic ext
@adityaparab that field is only promotional. It displays yahoo’s logo and such
upendrahanda
@upendrahanda
May 09 2016 12:35
and this is the image it shows for cloudy weather http://l.yimg.com/a/i/us/we/52/26.gif , in key DESC
Darth Skywalker
@adityaparab
May 09 2016 12:37
@WiseNN : Yeah. Thats what I thought. There is no way to determine if the string is image name.
You need to either have an extension like .png .jpg etc then you can run a RegEx and know what is image name and what is not.. Simple strings? No way.
Wise
@WiseNN
May 09 2016 12:37
@upendrahanda did you pull that from one of the codes?
upendrahanda
@upendrahanda
May 09 2016 12:37
I pulled it from JSON response from the link I shared with you
Xhipu
@Xhipu
May 09 2016 12:37
does s1 have a sample for the mad libs ? i dont check their explanation >.<
upendrahanda
@upendrahanda
May 09 2016 12:38
@WiseNN look carefully in the last key, even this has the cloud image
in description key
Wise
@WiseNN
May 09 2016 12:40
@upendrahanda It does, but I am trying to find the images that correspond to the actual weather forecast. I know they have them in there (or atleast would like to think they do)…it just doesnt make sense that there wouldnt be more images to coorespond with weather patterns in a weather api
Chris Cullen
@123xylem
May 09 2016 12:41
The heading was centered before I got it vertically aligned... ANy idea why its skewing to the right now? http://codepen.io/123xylem/pen/WwPKrj?editors=1100
upendrahanda
@upendrahanda
May 09 2016 12:42
I have never used yahoo api but I think the image changes with weather.. like for now it is for cloudy weather.. how about try and query weather of some other place, say a desert?
Patrick Mitton
@pkmitton
May 09 2016 12:44
Okay, @Blauelf I updated my code to this:
function updateRecords(id, prop, value) {
  if (value !== "", prop !== "tracks") {
      collection[id.prop] = value;
    }
  if (value !== "", prop === "tracks") {
      collection[id].push(prop, value);
  }

  return collection;
}
Wise
@WiseNN
May 09 2016 12:45
@upendrahanda yeah, It does change when you put in a different location. Maybe the CDATA is supposed to be embeded in the page. I dont even know how to use CDATA :/
Daniel O'Mahony
@OMahonyD
May 09 2016 12:45
@123xylem if you change <h class=... to <h1 class=... and similar with closing tag it centres
Blauelf
@Blauelf
May 09 2016 12:45
@pkmitton Use && instead of , (the comma operator works different to what you think, it evaluates both sides, and itself has the value of the right side)
upendrahanda
@upendrahanda
May 09 2016 12:45
I ran a query for an Indian desert and it shows same image.
Patrick Mitton
@pkmitton
May 09 2016 12:45
@Blauelf Oh, shoot. I do remember that.
Chris Cullen
@123xylem
May 09 2016 12:46
@OMahonyD Ah ok.. I used to use h123... but some1 said theres no p1234 etc anymore so I thought it applied to h aswell
upendrahanda
@upendrahanda
May 09 2016 12:46
@WiseNN no i dont think you are mistaking.. there is no other link for weather type in json response
why dont you use some other api which is not so crowded and gives simple output?
Wise
@WiseNN
May 09 2016 12:46
@upendrahanda I did one for south dakota and it gave me http://l.yimg.com/a/i/us/we/52/27.gif
Daniel O'Mahony
@OMahonyD
May 09 2016 12:47
@You'll probably need to do some work with bootstrap to centre for all screen sizes. Good luck! Looks great!
@123xylem
Chris Cullen
@123xylem
May 09 2016 12:47
@OMahonyD now its right aligned though :) but does look a lil better so thanks
CamperBot
@camperbot
May 09 2016 12:47
123xylem sends brownie points to @omahonyd :sparkles: :thumbsup: :sparkles:
:cookie: 368 | @omahonyd |http://www.freecodecamp.com/omahonyd
upendrahanda
@upendrahanda
May 09 2016 12:47
I think weather is mostly cloudy everywhere lol
Daniel O'Mahony
@OMahonyD
May 09 2016 12:48
@123xylem Check out bootstrap for help with centering in a grid system. It really is a great tool
Patrick Mitton
@pkmitton
May 09 2016 12:48
@Blauelf Alright, so now it runs something, but it's adding "Abba" to the correct id, but as "undefined" and not "artist"
Wise
@WiseNN
May 09 2016 12:48
@upendrahanda I would have, but honestly….I had to learn SQL to use this…so im staying lol…Ill just link to another image bank that links to yahoo’s api.
Patrick Mitton
@pkmitton
May 09 2016 12:48
I thought the reference to prop would set it to "artist", but it doesn't
Wise
@WiseNN
May 09 2016 12:48
@upendrahanda right lol
upendrahanda
@upendrahanda
May 09 2016 12:49
that sounds good.. use your custom icons I say. @WiseNN
Wise
@WiseNN
May 09 2016 12:49
@upendrahanda will do…thanks
upendrahanda
@upendrahanda
May 09 2016 12:49
there must be an id or something to refer to each type of weather. Check documentation
Blauelf
@Blauelf
May 09 2016 12:49
@pkmitton collection[id] is not an array, but has a "tracks" property that is one. Also, id has no property "prop".
Wise
@WiseNN
May 09 2016 12:49
@upendrahanda you know….thats exactly what i thought
Ill try that
slavenoptimus
@slavenOptimus
May 09 2016 12:50
hello everyone! I am doing the PORTFOLIO task, but I can't seem to find out how to scroll the navigation with the screen. Can someone point me in the right direction? Thanks
upendrahanda
@upendrahanda
May 09 2016 12:50
im almost sure there would be. Because you cant just check whole string to find out what weather it is.
Patrick Mitton
@pkmitton
May 09 2016 12:51
@Blauelf the array issue--I'm dumb...for the property, I was hoping it would refer to the variable presented to the function that is identified as prop...it won't do that? or it will, but I'm doing it wrong?
Wise
@WiseNN
May 09 2016 12:52
@upendrahanda exactly …do you think I would have to put a <link> in for it to work?Even though I thought of it…I wasn’t sure of how it would work
upendrahanda
@upendrahanda
May 09 2016 12:52
well i think because it is an image, you will have to use <img src=value_from_json>
Wise
@WiseNN
May 09 2016 12:53
Ok, I’ll try that and report back
upendrahanda
@upendrahanda
May 09 2016 12:53
oh im sorry, i thought you were using img from json
for custom icons, make a folder having icons for each id, with their names as id
and then, all you gotta do is check the id in json and add it to <img src=folder_of_icons/json_id.gif>
you will have to use concatenation
Wise
@WiseNN
May 09 2016 12:54
Yes Im trying to use images from JSON
via response
upendrahanda
@upendrahanda
May 09 2016 12:55
in both cases, procedure is same except the src value
Blauelf
@Blauelf
May 09 2016 12:56
@pkmitton Use prop the same way as id, simply in square brackets. id contains the name of a property of collection, and prop contains the name of a property of collection[id].
Wise
@WiseNN
May 09 2016 12:57
do you think the "Mostly Cloudy” , “sunny” would be values as well? probably not…they dont have image .ext’s
ill try them anyway (after I email them about this confusion)
upendrahanda
@upendrahanda
May 09 2016 12:57
Definitely not. They are just string outputs
they show what type of weather it is.. what you need is image names
Wise
@WiseNN
May 09 2016 12:58
see thats what I said…but it would blow your mind to know that the code field (that is also a string output) contains images…you have to append the .ext after the receiving the response
slavenoptimus
@slavenOptimus
May 09 2016 12:58
hello everyone! I am doing the PORTFOLIO task, but I can't seem to find out how to scroll the navigation with the screen. Can someone point me in the right direction? Thanks
Darth Skywalker
@adityaparab
May 09 2016 13:00

@WiseNN

@upendrahanda yeah, It does change when you put in a different location. Maybe the CDATA is supposed to be embeded in the page. I dont even know how to use CDATA :/

You put that entire thing inside a tag called <iframe></iframe> and it will render and embed the entire page for you

Wise
@WiseNN
May 09 2016 13:01
@adityaparab really? I will try that right now...
Ashref
@Asher2016
May 09 2016 13:03
@slavenOptimus the idea to put the navigation on the top and give it a position:fixed
@slavenOptimus actually not just on the top but anywhere you want it
appyfizz12
@appyfizz12
May 09 2016 13:04
guys do you revise code
Wise
@WiseNN
May 09 2016 13:06
@adityaparab So…maybe I am doing this wrong…can you post an example with a the same type of data
upendrahanda
@upendrahanda
May 09 2016 13:06
CDATA inside iframe? Never heard of it. I think its XML
Ashref
@Asher2016
May 09 2016 13:07
@appyfizz12 yes we could help
Wise
@WiseNN
May 09 2016 13:07
But it is supposed to be embedded in something…right?
upendrahanda
@upendrahanda
May 09 2016 13:08
@WiseNN it is supposed to be parsed first if it is not html
and CDATA is xml
Patrick Mitton
@pkmitton
May 09 2016 13:08
Thanks @Blauelf
CamperBot
@camperbot
May 09 2016 13:08
pkmitton sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star2: 1778 | @blauelf |http://www.freecodecamp.com/blauelf
Wise
@WiseNN
May 09 2016 13:09
@upendrahanda Ok…so how do I access the content?
@upendrahanda Oh, you said if its not html
upendrahanda
@upendrahanda
May 09 2016 13:10
I can give an example in a language I know like php, you know php? @WiseNN
Wise
@WiseNN
May 09 2016 13:11
no, I know JAVA
If you dont know JAVA….I can recognize a little bit of PHP
Harun
@harooooo1
May 09 2016 13:11
you know java?
Wise
@WiseNN
May 09 2016 13:11
yes
in school for it
3rd year
Harun
@harooooo1
May 09 2016 13:11
i am just starting a course atm
Emina
@emina98
May 09 2016 13:12
good luck
Wise
@WiseNN
May 09 2016 13:12
niiice
Harun
@harooooo1
May 09 2016 13:12
thanks
Wise
@WiseNN
May 09 2016 13:12
yes, good luck
It is not that bad though
Harun
@harooooo1
May 09 2016 13:12
@WiseNN where are u from btw?
upendrahanda
@upendrahanda
May 09 2016 13:13
basically it converts the xml string into xml object
Wise
@WiseNN
May 09 2016 13:14
@upendrahanda I see…I will have to take this snippet and review the syntax. Its been a while since ive looked @ PHP…thanks
Harun
@harooooo1
May 09 2016 13:14
where are u guys from?
upendrahanda
@upendrahanda
May 09 2016 13:14
that will be good.. xml and json are great to play with
Wise
@WiseNN
May 09 2016 13:14
@harooooo1 I am in Atlanta
Harun
@harooooo1
May 09 2016 13:15
Nice, people from all over the world, i am from Bosnia and Herzegovina btw
Wise
@WiseNN
May 09 2016 13:15
From South Florida
Wise
@WiseNN
May 09 2016 13:16
Thank you…I will go and review that now
Xhipu
@Xhipu
May 09 2016 13:17
im from germany ;)
Ashref
@Asher2016
May 09 2016 13:18
I'm from Tunisia , I think no ones know my country :/
slavenoptimus
@slavenOptimus
May 09 2016 13:18
@Asher2016 thanks
CamperBot
@camperbot
May 09 2016 13:18
slavenoptimus sends brownie points to @asher2016 :sparkles: :thumbsup: :sparkles:
:cookie: 21 | @asher2016 |http://www.freecodecamp.com/asher2016
Ashref
@Asher2016
May 09 2016 13:18
@slavenOptimus welcome friend
Xhipu
@Xhipu
May 09 2016 13:37
i know Tunisia, it´s not so far away from me
Ashref
@Asher2016
May 09 2016 13:46
ah good , actually lot of germans people go to Tunisia for holiday
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 13:47
I think I completed my HTML because jQuery has been started
Xhipu
@Xhipu
May 09 2016 13:47
@Asher2016 Yes between us is just Italy :D and u have nice warm weather :D
rolanjose7
@rolanjose7
May 09 2016 13:47
Guys, with jQuery how can i make a button to scroll the page to a certain div?
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 13:47
should i continue or learn Java script first
Ashref
@Asher2016
May 09 2016 13:48
@Xhipu have you been in Tunisia ?
Xhipu
@Xhipu
May 09 2016 13:48
@prabhjotbjw Complete the JQuery it is easy with html, later u can go on with Java
@Asher2016 no i only was in sweden. Most i go only to Gamescom :D but in a bout a year i want to fly in another land and tunisia would be a good choice i think
Ashref
@Asher2016
May 09 2016 13:50
@Xhipu good , I think would be nice choice ;)
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 13:51
ok but I couldn't learn jQuery from here because i'm not good reader I don't like read much I'm Video tutorial kind of person what should I do where can I start learning jQuery I just want to watch some basic detailed tutorials
Xhipu
@Xhipu
May 09 2016 13:52
@prabhjotbjw u dont need to read all, it simply explained u can do the most from the example in java u will have to read even more
@Asher2016 thanks
CamperBot
@camperbot
May 09 2016 13:52
xhipu sends brownie points to @asher2016 :sparkles: :thumbsup: :sparkles:
:cookie: 22 | @asher2016 |http://www.freecodecamp.com/asher2016
Ashref
@Asher2016
May 09 2016 13:53
@Xhipu are you here for learning or you're already a dev ?
Xhipu
@Xhipu
May 09 2016 13:55
@Asher2016 learning :D
Ashref
@Asher2016
May 09 2016 13:56
@Xhipu cool , the same here :D , I'm still with html5/CSS3 :worried:
Pranav Doshi
@pranavdoshi
May 09 2016 14:02
wassup guys
Adebimpe Adebowale
@adeadebimpe
May 09 2016 14:04
hi everyone, please i need help with a question, the problem says "Each of your Bootstrap buttons should be nested within its own div element with the class col-xs-4." and here is my code: " <div class="row">
<div class="col-xs-4">
<button type="submit">Submit</button>
</div>
</div>".. Please help me fix the error
Brian McCabe
@brianmccabe87
May 09 2016 14:06
Hoping you can help, my test won't pass for "Your <style> should have a pink-text CSS class with its color set to pink.
"
here is my code...

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

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

What am I doing wrong?
Ashref
@Asher2016
May 09 2016 14:06
@Adebimpe I think button should has a class
chalak2
@chalak2
May 09 2016 14:07
@OMahonyD hello can you tell me what is ID?
Ashref
@Asher2016
May 09 2016 14:07
@brianmccabe87 try to remove color from body style
Brian McCabe
@brianmccabe87
May 09 2016 14:08
doesn't pass unfortunately
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 14:08
@chalak2 ID is way for css to identify something and make changes to that purticular element
@brianmccabe87 how many buttons you have
Ashref
@Asher2016
May 09 2016 14:09
@brianmccabe87 your .pink-text {
color:pink
} miss a ";"
yash13902
@yash13902
May 09 2016 14:09
<form action="/submit-cat-photo" input type="text" placeholder="cat photo URL"></form>
what am i doing wrong over here??
Brian McCabe
@brianmccabe87
May 09 2016 14:10
@Asher2016 thank you! was blind to that!
CamperBot
@camperbot
May 09 2016 14:10
brianmccabe87 sends brownie points to @asher2016 :sparkles: :thumbsup: :sparkles:
:cookie: 23 | @asher2016 |http://www.freecodecamp.com/asher2016
yash13902
@yash13902
May 09 2016 14:10
i have to Nest your text input element within a form element.
AlexandruPB
@AlexandruPB
May 09 2016 14:10
can someone please explain this to me: Only add one class with each of your three selectors.
yash13902
@yash13902
May 09 2016 14:10
tell me
someone
AlexandruPB
@AlexandruPB
May 09 2016 14:10
is from the jquerry challange
i don't understand what it wants
negyvenketto
@negyvenketto
May 09 2016 14:11
@yash13902 don't delete your input's < and >
yash13902
@yash13902
May 09 2016 14:11
pardon @negyvenketto
AlexandruPB
@AlexandruPB
May 09 2016 14:11
my code: <script>
$(document).ready(function() {
$("button").addClass("animated");
$(".btn").addClass("shake");
$("#target1").addClass("animated shake btn-primary");
});
</script>
Rodolfo Espinoza
@rodo008
May 09 2016 14:11

@yash13902 @yash13902

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

you missin < and > symbols within form and input tags
Ashref
@Asher2016
May 09 2016 14:11
@yash13902 <form action="/submit-cat-photo" <input type="text" placeholder="cat photo URL"></form> try this
yash13902
@yash13902
May 09 2016 14:11
k
negyvenketto
@negyvenketto
May 09 2016 14:11
@AlexandruPB you are adding 3 classes here: $("#target1").addClass("animated shake btn-primary");
AlexandruPB
@AlexandruPB
May 09 2016 14:12
i did, i have to delete the other 2?
negyvenketto
@negyvenketto
May 09 2016 14:13
@AlexandruPB yes, choose one from animated and shake and btn-primary
yash13902
@yash13902
May 09 2016 14:13
not happening
negyvenketto
@negyvenketto
May 09 2016 14:13
@AlexandruPB i think it needs to be the btn-primary, as you already added the other two
grgp89
@grgp89
May 09 2016 14:13
Hello! Is someone here who can help me with a matlab code problem?
yash13902
@yash13902
May 09 2016 14:14
@Asher2016 @rodo008 not happening
negyvenketto
@negyvenketto
May 09 2016 14:15
@yash13902 pls copy your challenge's url here, i'll take a look at it
yash13902
@yash13902
May 09 2016 14:15
it happened
AsadTuruu
@AsadTuruu
May 09 2016 14:15
Your p element should have the text "View more " (with a space after it).
negyvenketto
@negyvenketto
May 09 2016 14:15
@yash13902 :sparkles:
AsadTuruu
@AsadTuruu
May 09 2016 14:15
what's is it
yash13902
@yash13902
May 09 2016 14:15
i put a space after that which wasn't necessary
AsadTuruu
@AsadTuruu
May 09 2016 14:15
i don't undestant
negyvenketto
@negyvenketto
May 09 2016 14:15
@AsadTuruu <p>View more </p>
yash13902
@yash13902
May 09 2016 14:16
i did not have to put a space after < and input
AlexandruPB
@AlexandruPB
May 09 2016 14:16
@negyvenketto Yeah, i needed t add this $("#target1").addClass("btn-primary") too
yash13902
@yash13902
May 09 2016 14:16
it was like < input
which was wrong
it should be <input
negyvenketto
@negyvenketto
May 09 2016 14:16
@AlexandruPB :thumbsup:
AlexandruPB
@AlexandruPB
May 09 2016 14:17
@negyvenketto Thank you
CamperBot
@camperbot
May 09 2016 14:17
alexandrupb sends brownie points to @negyvenketto :sparkles: :thumbsup: :sparkles:
:cookie: 409 | @negyvenketto |http://www.freecodecamp.com/negyvenketto
negyvenketto
@negyvenketto
May 09 2016 14:17
@AlexandruPB you are welcome :)
AsadTuruu
@AsadTuruu
May 09 2016 14:17
that not fix
@negyvenketto don't work
Har Prabh Jot Singh
@prabhjotbjw
May 09 2016 14:18
@yash13902 congrats you figured it out
negyvenketto
@negyvenketto
May 09 2016 14:19
@AsadTuruu what challenge is that?
AsadTuruu
@AsadTuruu
May 09 2016 14:19
Your p element should have the text "View more " (with a space after it).
<p> View more <a href="http://www.freecatphotoapp.com"> cat photos</a>
</p>
negyvenketto
@negyvenketto
May 09 2016 14:20
@AsadTuruu try deleting the space between <p> and view more
AsadTuruu
@AsadTuruu
May 09 2016 14:21
kkk don't work
negyvenketto
@negyvenketto
May 09 2016 14:22
what's the name of the challenge?
AsadTuruu
@AsadTuruu
May 09 2016 14:22
Nest an Anchor Element within a Paragraph
Manish Giri
@Manish-Giri
May 09 2016 14:23
@AsadTuruu put space only where asked
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
AsadTuruu
@AsadTuruu
May 09 2016 14:24
ok tnks
Arielle09
@Arielle09
May 09 2016 14:30
It's asking me to create a form element and nest the text input element within a form element. Can someone point out what I'm doing wrong? <form action="/submit-cat-photo" input type="text" placeholder="cat photo URL"></form>
Daniel O'Mahony
@OMahonyD
May 09 2016 14:32
@chalak2 A unique identifier. Differs from class which is an identifier for a lot of elements whereas id is generally only used on one element. Like if you want to style a specific heading or textarea etc...
Satwat Nawabzada
@SatKN
May 09 2016 14:33
hey people, whats a class attribute?
negyvenketto
@negyvenketto
May 09 2016 14:33
@Arielle09 you need to keep the < and > of the input. don't put input inside the opening form tag. put it between the opening and closing form tag
Daniel O'Mahony
@OMahonyD
May 09 2016 14:34
@SatKN It's used to point to a class in a stylesheet mostly. It can also be used in jQuery to manipulate elements. An identifier for lots of elements
Arielle09
@Arielle09
May 09 2016 14:35
@negyvenketto Thanks for the help
CamperBot
@camperbot
May 09 2016 14:35
arielle09 sends brownie points to @negyvenketto :sparkles: :thumbsup: :sparkles:
:cookie: 410 | @negyvenketto |http://www.freecodecamp.com/negyvenketto
negyvenketto
@negyvenketto
May 09 2016 14:35
@Arielle09 you are welcome :)
cannelflow
@cannelflow
May 09 2016 14:36
@SatKN While the name of an element specifies its type, the class attribute lets you assign to it one or more subtypes. These subtypes may then be used in CSS code for styling purposes, or by JavaScript code (via the Document Object Model, or DOM) to make changes, or add behavior, to elements belonging to a particular subtype. http://www.sitepoint.com/web-foundations/class-html-attribute/
Daniel O'Mahony
@OMahonyD
May 09 2016 14:36
@SatKN It's also that ^^^^
:)
grgp89
@grgp89
May 09 2016 14:37
Hello! Is anyone here who can help me in matlab?
Satwat Nawabzada
@SatKN
May 09 2016 14:37
@OMahonyD @cannelflow Thank You !! :)
CamperBot
@camperbot
May 09 2016 14:37
satkn sends brownie points to @omahonyd and @cannelflow :sparkles: :thumbsup: :sparkles:
:cookie: 370 | @omahonyd |http://www.freecodecamp.com/omahonyd
:star2: 1139 | @cannelflow |http://www.freecodecamp.com/cannelflow
Satwat Nawabzada
@SatKN
May 09 2016 14:38
any way of remembering all the steps, as for now instruction as being given at every step. But what if you want to do it by yourself??
Jordan Mizrachi
@jmizrachi
May 09 2016 14:38
hey Im on Add Borders Around your element.
<img class="smaller-image" class="thick-green-border"
style=border-width:10px; border-style:solid; border-color:green; src="https://bit.ly/fcc-
Satwat Nawabzada
@SatKN
May 09 2016 14:38
are *
Jordan Mizrachi
@jmizrachi
May 09 2016 14:38
I can't figure out whats wrong
cannelflow
@cannelflow
May 09 2016 14:39
@SatKN you will get plenty of exercise on you journey here at FCC
HELP CHAT
CamperBot
@camperbot
May 09 2016 14:40

:point_right: official free code camp chat rooms [wiki]

The following are our official chat rooms.

Please note that all chat rooms listed here are publicly accessible and indexed by search engines, so only share email addresses or other sensitive information in private messages.

Chat Room Description
FreeCodeCamp our main chat room - hang out and chat about life and learning to code
Help get help with our HTML, CSS and jQuery challenges from your fellow campers
HelpJavaScript get help with our JavaScript and algorithm challenges from your fellow campers
HelpFrontEnd get help with our front end projects from your fellow campers
HelpDataViz get help with our data visualization projects from your fellow campers
HelpBackEnd get help with our back end projects from your fellow campers
Git get help with using Git, from your fellow campers
Linux get help with using Linux, from your fellow campers
SQL get help on relational databases and SQL, from your fellow campers
Python get help doing our back end projects in Python, from your fellow campers
Java get help doing our back end projects in Java, from your fellow campers
Ruby get help doing our back end projects in Ruby, from your fellow campers
PHP get help doing our back end projects in PHP, from your fellow campers
Go get help doing our back end projects in Go, from your fellow campers

:pencil: read more about official free code camp chat rooms on the FCC Wiki

Satwat Nawabzada
@SatKN
May 09 2016 14:42
@cannelflow should i start making notes on steps ??
cannelflow
@cannelflow
May 09 2016 14:43
@SatKN its depends on your style of reading but there is no harm in making
Manish Giri
@Manish-Giri
May 09 2016 14:44
@jmizrachi there are multiple problems in that code
  1. multiple class names are separated in HTML by space, not multiple class keywords
  2. the style rules should be in the class called smaller-image, not in the img element itself
cannelflow
@cannelflow
May 09 2016 14:44
@jmizrachi <img class=" a b"/> a& b are two different class here
hello @Manish-Giri
Satwat Nawabzada
@SatKN
May 09 2016 14:44
@cannelflow Thank You, Any book you recommend for html and css?
CamperBot
@camperbot
May 09 2016 14:44
satkn sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:warning: satkn already gave cannelflow points
Manish Giri
@Manish-Giri
May 09 2016 14:45
@cannelflow hello
cannelflow
@cannelflow
May 09 2016 14:46
@SatKN i mostly learnt html css from w3school
@SatKN also https://www.youtube.com/channel/UCyIe-61Y8C4_o-zZCtO4ETQ is the good channel to follow
Satwat Nawabzada
@SatKN
May 09 2016 14:47
@cannelflow Right, thanks :)
CamperBot
@camperbot
May 09 2016 14:47
:warning: satkn already gave cannelflow points
satkn sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
Jordan Mizrachi
@jmizrachi
May 09 2016 14:48
@Manish-Giri <img class="smaller-image thick-green-border" style=border-width:10px; border-style:solid; border-color:green; src="https://bit.ly/fcc-relaxing-cat">
Did I fix it?
It worked!!!
@Manish-Giri Thanks!!!!!!
CamperBot
@camperbot
May 09 2016 14:49
jmizrachi sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 1021 | @manish-giri |http://www.freecodecamp.com/manish-giri
cannelflow
@cannelflow
May 09 2016 14:49
Joe Sasson
@joesasson
May 09 2016 14:50
hi guys i need a little help with my quote generator http://codepen.io/dibson/pen/ZWVRZo. I am trying to use the forismatic API to generate quotes but apparently it seems that codepen does not allow API calls because of the cross origin request. Here is the error from the console XMLHttpRequest cannot load https://crossorigin.me/http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json53552. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access. The response had HTTP status code 520.
is there a problem with crossorigin.me
Cassie
@winterca
May 09 2016 14:53

<input type="text" placeholder="cat photo URL">

Hi everyone! I have an error message that says "The finished input element should have valid syntax." Is there anything wrong with this syntax? I also tried adding /> to the end... but that didn't work either.

Manish Giri
@Manish-Giri
May 09 2016 14:54
@jmizrachi good to know it worked, but the style=... should be in the <style>...</style> section, in the class
.thick-green-border {
border-width:10px;
border-style:solid; 
border-color:green; 
}
Satwat Nawabzada
@SatKN
May 09 2016 14:54
@cannelflow looks interesting
Manish Giri
@Manish-Giri
May 09 2016 14:54
@winterca there's nothing wrong with the code you have, but is it all on the same line?
Cassie
@winterca
May 09 2016 14:55
No, the placeholder attribute is on its own line.
Manish Giri
@Manish-Giri
May 09 2016 14:56
@winterca everything should be on one line
Cassie
@winterca
May 09 2016 14:57
@Manish-Giri Oh, okay! Why, though?
grgp89
@grgp89
May 09 2016 14:57
Is someone here who know matlab and can help me?
Manish Giri
@Manish-Giri
May 09 2016 14:59
@winterca because placeholder is an attribute for the input element. I'm not sure if putting it on a different line would throw an error outside of FCC also, but that certainly seems to be the case in the FCC editor.
@winterca I think if the placeholder attribute is put on a separate line, the FCC editor doesn't recognize it as part of input element anymore
Cassie
@winterca
May 09 2016 15:00
@Manish-Giri Thank you for your help!
CamperBot
@camperbot
May 09 2016 15:00
:star2: 1022 | @manish-giri |http://www.freecodecamp.com/manish-giri
winterca sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
Manish Giri
@Manish-Giri
May 09 2016 15:00
@winterca welcome!
ddr dushy
@ddrdushy
May 09 2016 15:05
hi @/all when i try to fetch data from wiki it will return this error Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch=java. (Reason: CORS header 'Access-Control-Allow-Origin' missing). .. what is Cross-Orgin Request? how to fetch the data from wiki?
Vikash190
@Vikash190
May 09 2016 15:07

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

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

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

This is my code but it is saying h2 element is not red
Patrick Mitton
@pkmitton
May 09 2016 15:13
Alright, here's a question...is there a better way to write this function? It works exactly like it