These are chat archives for FreeCodeCamp/Help

8th
Mar 2016
a c
@chagoy
Mar 08 2016 00:00
in the h2 tag <h2>some text</h2> you apply class to the opening tag. it will be like <h2 class="your-class">
Martjin
@Martjin
Mar 08 2016 00:01
thank you
@chagoy thanks for the help
CamperBot
@camperbot
Mar 08 2016 00:02
martjin sends brownie points to @chagoy :sparkles: :thumbsup: :sparkles:
:star: 133 | @chagoy | http://www.freecodecamp.com/chagoy
DeMarcus Sparks
@dsparks2193
Mar 08 2016 00:09

error:
The .parent() method should be called on the #target1 element
Your left-well element should have a red background.

<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("#target1").css("background-color", "red");
});
</script>

Chris Davis
@chrisdav6
Mar 08 2016 00:12
i don't believe you pass an argument to parent
Oscar
@Oscar3000
Mar 08 2016 00:13
how does one add the facebook or linkedIn icon to a name or word with bootstrap
Chris Davis
@chrisdav6
Mar 08 2016 00:13
or a target
Leila
@leilamelgratti
Mar 08 2016 00:13
Can someone help me understand how I can view my tribute page propertly on my mobile? I need to fix the code, but I'm not sure what is wrong with it. Much appreciated! http://codepen.io/leilamelgratti/full/zqrJWj/
Jorge
@Cr4ck3rs
Mar 08 2016 00:16
Hi @leilamelgratti I'm not sure but I think after your initial div with row class, everything should be nested in a div with a xs-col-12 class
Chris Davis
@chrisdav6
Mar 08 2016 00:17
ooh dang, nevermind. I was wrong about parent() https://api.jquery.com/parent/
DeMarcus Sparks
@dsparks2193
Mar 08 2016 00:19

correction error were:

The .parent() method should be called on the #target1 element.
Your left-well element should have a red background.

<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("#target1").css("background-color", "red");
});
</script>

Mike Hickman
@pdxmike
Mar 08 2016 00:23

Did any of you hit a snag while doing the weather app where the actual geolocation portion wouldn’t even start? I’ve tested to make sure my .js file is being seen correctly, and started super basic html and js files just to test getting the location, but nothing runs. No prompt, no error, no location icon. I’ve been googling but haven’t found anything solid yet

I know I suck at javascript, but every example I see with the same type of code instantly runs when I go to the page. I think I borked it o.O

var loc = document.getElementById("location");

function getLocation(){
  if (navigator.geolocation){
    navigator.geolocation.getCurrentPosition(showPosition, showError);
  } else {
    loc.innerHTML = "Geolocation is not supported by this browser";
  }
}

function showPosition(position){
  loc.innerHTML = "Latitude: " + position.coords.latitude +
  "<br>Longitude: " + position.coords.longitude;
}

function showError(error){
  switch(error.code){
    case error.PERMISSION_DENIED:
      loc.innerHTML = "User denied the request for Geolocation.";
      break;
    case error.POSITION_UNAVAILABLE:
      loc.innerHTML = "Location information is not available.";
      break;
    case error.TIMEOUT:
      loc.innerHTML = "The request to get user location timed out.";
      break;
    case error.UNKNOWN_ERROR:
      loc.innerHTML = "An unknown error occured.";
      break;
  }
}
Tyler Moeller
@TylerMoeller
Mar 08 2016 00:24
@leilamelgratti You're hard-coding a width of 1000px for the page, along with some margins and padding that are throwing things off center:
.main {
  background-color: #ECEBEE;
  padding: 30px 20px 20px 70px;
  margin-top: 20px;
  margin-bottom: -10px;
  margin-left: 70px;
  width: 1000px;
}
Mike Hickman
@pdxmike
Mar 08 2016 00:25
Not too sure what I’m missing here. I’ve tried to set chrome flags to allow gps from file, I’ve tried it on Codepen just in case it was a local hurdle, but still the location service doesn’t seem to even start. Am I just overlooking something?
Tyler Moeller
@TylerMoeller
Mar 08 2016 00:27
@pdxmike It's hard to tell without more code. I don't see a call to any of those functions.
DeMarcus Sparks
@dsparks2193
Mar 08 2016 00:28

correction error were:
The .parent() method should be called on the #target1 element.
Your left-well element should have a red background.

<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("#target1").css("background-color", "red");
});
</script>

@chrisdav6

Mike Hickman
@pdxmike
Mar 08 2016 00:33
@TylerMoeller Thank you. Definitely needed a second set of eyes. Completely just forgot to call the fricken’ getLocation(); :bulb: :punch: :tired_face:
CamperBot
@camperbot
Mar 08 2016 00:33
pdxmike sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star: 421 | @tylermoeller | http://www.freecodecamp.com/tylermoeller
Mike Hickman
@pdxmike
Mar 08 2016 00:33
There’s 15 minutes of my life I’ll never get back :laughing: :laughing: :laughing:
Tyler Moeller
@TylerMoeller
Mar 08 2016 00:40
lol :) maybe time for a break. That's why I'm here in chat.
Ed Sztukowski
@Burgustu
Mar 08 2016 00:56
Have a question about "Make Object Properties Private"
,,,
sotol007
@sotol007
Mar 08 2016 00:57
Hey! Where do you think is a mistake in here? $(".well:nth-child(2)").addClass("animated bounce"); Thx
Ed Sztukowski
@Burgustu
Mar 08 2016 00:57
var Car = function() {
  // this is a private variable
  var speed = 10;

  // these are public methods
  this.accelerate = function(change) {
    speed += change;
  };

  this.decelerate = function() {
    speed -= 5;
  };

  this.getSpeed = function() {
    return speed;
  };
};

var Bike = function() {
  var gear = 0;

  this.setGear = function(adjust) {
    gear += adjust;
  };

  this.getGear = function() {
    return gear;
  };
  // Only change code below this line.

};

var myCar = new Car();

var myBike = new Bike();

myBike.setGear(1);
myBike.getGear();
This is returning the correct values to pass, but the test isn’t passing
sotol007
@sotol007
Mar 08 2016 01:01
Never mind should,ve used .target instead of .well
Ed Sztukowski
@Burgustu
Mar 08 2016 01:01
nevermind, makes sense that we’re not adding the gears on top of each other!
should just be an = instead of +=
Leah H
@leah-h
Mar 08 2016 01:03
This message was deleted
Darryl Leong
@darryleong95
Mar 08 2016 01:18
hey guys! can i get a little help here? :/
<div class="col-sm-2 facebook"><button class="btn btn-primary btn-block"><i class="fa fa-facebook-official"><a href="https://www.facebook.com/darryl.v.leong" target='_blank'> Facebook </a></i></button></div>
im not sure how to change the actual font of the work facebook
word*
i mean color*
Franco Zapata
@Francozt01
Mar 08 2016 01:22
btn-primary is giving a color
@darryleong95 if u want to change the color target in ur css .btn-primary { color: blue !important; }
alanpapaz301
@alanpapaz301
Mar 08 2016 01:29
Hey guys, starting out and stuck already D: any tips for adding a class to an img element?
Darwin RC
@darwinrc
Mar 08 2016 01:35
@alanpapaz301 just add the property: <img class="yourclass" />
Shadaccia Reynolds
@kpopstar
Mar 08 2016 01:38
can anyone help me with this?
Darryl Leong
@darryleong95
Mar 08 2016 01:40
@Francozt01 thanks!!
CamperBot
@camperbot
Mar 08 2016 01:40
darryleong95 sends brownie points to @francozt01 :sparkles: :thumbsup: :sparkles:
:star: 565 | @francozt01 | http://www.freecodecamp.com/francozt01
Alex N.
@N0bl3
Mar 08 2016 01:41
@kpopstar with what?
Arsh Rai
@ArshRai
Mar 08 2016 01:42
Hey guys how do I comment out a specific font <!-- lobster --> Why is this not working?
anyone? :(
HoangTu34
@NgocTang
Mar 08 2016 01:46
someone help!

function convert(celsius) {
// Only change code below this line

// Only change code above this line
if ( typeof fahrenheit !== 'undefined' ) {
return fahrenheit;
} else {
return 'fahrenheit not defined';
}
}

// Change the inputs below to test your code
convert(30);

Alex N.
@N0bl3
Mar 08 2016 01:51
@ArshRai Doesnt Lobster take a L instead of a l? Im not sure to understand the problem correctly
max77p
@max77p
Mar 08 2016 01:52
can someone help me with this?
Alex N.
@N0bl3
Mar 08 2016 01:52
@NgocTang you should check if fahrebheit is a number istead of checking if it is undefined
What's the problem youre facing?
Arsh Rai
@ArshRai
Mar 08 2016 01:52
@N0bl3 yes the Loster has L but it doesn not comment out
max77p
@max77p
Mar 08 2016 01:52
when i use .getJSON and the url and key, it works everytime i click the name a new quote appears
but under the .open method it just repeats the same quote
do i need to reset the thing after each click?
Arsh Rai
@ArshRai
Mar 08 2016 01:53
Is this right? <!--Lobster,-->
h2 {
font-family: <!--Lobster,--> Monospace;
}
Alex N.
@N0bl3
Mar 08 2016 01:53
@ArshRai what do you mean by this? you cannot remove the <!-- --!> ?
Arsh Rai
@ArshRai
Mar 08 2016 01:54
@N0bl3 I need to comment out so that the lobster font is not available and it degrades to monospace.
Alex N.
@N0bl3
Mar 08 2016 01:54
@ArshRai it is definitively not right. What are you trying to do exactly?
HoangTu34
@NgocTang
Mar 08 2016 01:54
@N0bl3 it is fahrenheit not defined
@N0bl3 can you help me cross it.
Alex N.
@N0bl3
Mar 08 2016 01:57
@NgocTang You never defined fahrenheit but you defined a celsius variable instead ^^
Arsh Rai
@ArshRai
Mar 08 2016 01:58
@N0bl3 Can you plz help. I need to comment out so that the lobster font is not available and it degrades to monospace when lobster is unavailable.
HoangTu34
@NgocTang
Mar 08 2016 01:58
@N0bl3 thank alot..clear.
CamperBot
@camperbot
Mar 08 2016 01:58
ngoctang sends brownie points to @n0bl3 :sparkles: :thumbsup: :sparkles:
:star: 217 | @n0bl3 | http://www.freecodecamp.com/n0bl3
Alexander Køpke
@alexanderkopke
Mar 08 2016 01:59
@ArshRai just add the monospace after the Lobster font.. like this: font-family: Lobster, monospace;
Arsh Rai
@ArshRai
Mar 08 2016 02:00
@alexanderkopke I have done that, but as part of the exercise, I need to comment out the Lobster font. I did this h2 {
font-family: <!--Lobster,--> Monospace;
}
but it's not working
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:01
@ArshRai oh ok what is the name of the challenge?
Arsh Rai
@ArshRai
Mar 08 2016 02:02
@alexanderkopke "Specify How Fonts Should Degrade"
Darwin RC
@darwinrc
Mar 08 2016 02:03
@ArshRai css comments are // /* not <!--
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:03
@ArshRai ah it is the google font link you have to comment out
<!--<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">-->
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster  , Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }
</style>
Arsh Rai
@ArshRai
Mar 08 2016 02:04
Ahh Bingo @alexanderkopke Thank you, I will try that
CamperBot
@camperbot
Mar 08 2016 02:04
arshrai sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 495 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Arsh Rai
@ArshRai
Mar 08 2016 02:04
@thank you @darwinrc :)
CamperBot
@camperbot
Mar 08 2016 02:04
arshrai sends brownie points to @thank and @darwinrc :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for thank
:star: 389 | @darwinrc | http://www.freecodecamp.com/darwinrc
Arsh Rai
@ArshRai
Mar 08 2016 02:07
@alexanderkopke I did that, but challenge still not clear.
@alexanderkopke I did a reset it worked. :)
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:10
@ArshRai great :)
Thomas Parikka
@tparikka
Mar 08 2016 02:10
Can anyone help me with what this means in the context of "Change the Font Size of an Element"? "Do not add a class attribute to the second p element, without removing it from the first one."
Alex N.
@N0bl3
Mar 08 2016 02:11
@tparikka that you should remove the class from the first p
Thomas Parikka
@tparikka
Mar 08 2016 02:11
I did, though.
Arsh Rai
@ArshRai
Mar 08 2016 02:12
@tparikka remove the class from your <p> element and keep it on the <style>
Michael Doo
@tuzonghua
Mar 08 2016 02:12
For the basic frontend projects, do they have to match pixel for pixel or just be functionally the same? The personal portfolio example has this gray color scheme going on that I'd like to avoid
Thomas Parikka
@tparikka
Mar 08 2016 02:13

This is what I have '<style>
.red-text {
color: red;
}
p {
font-size: 16px;
}
</style>

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

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

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

Ok formatting didn't work the way I thought it would
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:13
@tparikka your code should work.. clear the cache with ctrl+r
</p>' <---- without ' tho ;)
Arsh Rai
@ArshRai
Mar 08 2016 02:15
:)
Thomas Parikka
@tparikka
Mar 08 2016 02:15
@ArshRai - I did a force refresh with CTRL+F5 but no dice
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:15
<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>
this is my code.. and it works
Brian
@sludge256
Mar 08 2016 02:17
@tparikka Put the red-text class back into the first p element
Thomas Parikka
@tparikka
Mar 08 2016 02:17
@alexanderkopke Ok, I added the class back in, and it worked
Arsh Rai
@ArshRai
Mar 08 2016 02:17
@tparikka you dont have <p class="red-text"> like @alexanderkopke code
Thomas Parikka
@tparikka
Mar 08 2016 02:17
@ArshRai @alexanderkopke Is it just me or is this test description incongruent? "Do not add a class attribute to the second p element, without removing it from the first one." this lead me to believe that I needed to remove the class attribute from the first <p> element
Corron Warren
@corronwarren
Mar 08 2016 02:18
Hey ALL!
Arsh Rai
@ArshRai
Mar 08 2016 02:18
@tparikka and you need that only for one <p>
Corron Warren
@corronwarren
Mar 08 2016 02:18
I need a little help
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:18
hiya welcome @corronwarren
Corron Warren
@corronwarren
Mar 08 2016 02:18
$(document).ready(function() {
$(".btn").addClass("shake");
$("button").addClass("animated");
$("#target1").addClass("animated shake btn-primary");
bitgrower
@bitgrower
Mar 08 2016 02:18
dat's what we're here for, @corronwarren -- how can we help you ? and welcome
Corron Warren
@corronwarren
Mar 08 2016 02:18
thats my code
Thomas Parikka
@tparikka
Mar 08 2016 02:19
Either way thank you very much for the help @ArshRai @alexanderkopke et all :)
CamperBot
@camperbot
Mar 08 2016 02:19
tparikka sends brownie points to @arshrai and @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 496 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
bitgrower
@bitgrower
Mar 08 2016 02:19
which challenge is it, @corronwarren -- and what sorts of problems are you having ... ?
CamperBot
@camperbot
Mar 08 2016 02:19
:star: 23 | @arshrai | http://www.freecodecamp.com/arshrai
Corron Warren
@corronwarren
Mar 08 2016 02:19
but i still have a red X next to only add one class
im confused
Arsh Rai
@ArshRai
Mar 08 2016 02:19
@tparikka gald to help
bitgrower
@bitgrower
Mar 08 2016 02:19
@corronwarren -- which one ? you might be missing some little piece of punctuation
Corron Warren
@corronwarren
Mar 08 2016 02:19
Target the same element with multiple jQuery Selectors
bitgrower
@bitgrower
Mar 08 2016 02:20
if that's ALL your code, you need a closing curly bracket at the bottom ...
Corron Warren
@corronwarren
Mar 08 2016 02:20
<script>
$(document).ready(function() {
$(".btn").addClass("shake");
$("button").addClass("animated");
$("#target1").addClass("animated shake btn-primary");

});
</script>
Thats my whole Script section
bitgrower
@bitgrower
Mar 08 2016 02:21
k ... which line has the red x on it ?
issamanis1
@issamanis1
Mar 08 2016 02:21
Can anyone please help me with creating a class called smaller-image?? I am stuck! Thanks
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:21
@corronwarren Only add one class with each of your three selectors.
@issamanis1 post your code and let us see.. Don't be shy :)
Manish Giri
@Manish-Giri
Mar 08 2016 02:22
@corronwarren each line should have just one class, and this one should have just btn-primary
$("#target1").addClass("animated shake btn-primary”);
bitgrower
@bitgrower
Mar 08 2016 02:22
good one @alexanderkopke -- I was a bit side-tracked by the name of the challenge ...
Corron Warren
@corronwarren
Mar 08 2016 02:23
@Manish-Giri GOT IT!
Thanks guys!
SO HELPFUL!
issamanis1
@issamanis1
Mar 08 2016 02:25
@alexanderkopke I just joined this, wasn't shy. I got it! How do i post my code?
Nick Coleman
@nickcoleman
Mar 08 2016 02:28

I’m working on the Wikipedia Viewer. Can anyone point me to page that provides a detailed break down of the API parameters.

The links provided in the exercise user stories aren’t really helpful and I haven’t been able to find a decent source via Google search or going through the Wiki docs. Although I have found URL examples that work … I want to understand it.

max77p
@max77p
Mar 08 2016 02:29
the quote just keeps repeating..what am i doing wrong?
if i use .getjson it works fine, but with .open something is weird
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:30
@nickcoleman have you seen this page: https://www.mediawiki.org/wiki/API:Main_page ?
chenchaso
@chenchaso
Mar 08 2016 02:34
HI guys. sort of stuck too. trying to give all elements on my page the color of green i thought my code was right
Nick Coleman
@nickcoleman
Mar 08 2016 02:34

@alexanderkopke Yep … checked that. For example, this call works: https://en.wikipedia.org/w/api.php?format=jsonfm&action=query&generator=search&gsrnamespace=0&prop=extracts&exintro&exlimit=max&callback=JSON_CALLBACK&gsrsearch=dogs

But, I want to find the definition of each of the parameters

chenchaso
@chenchaso
Mar 08 2016 02:34
green-text{color: green;}
David Young
@dayvidwhy
Mar 08 2016 02:35
@issamanis1 explain format
explain format
CamperBot
@camperbot
Mar 08 2016 02:35

: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

Alexander Køpke
@alexanderkopke
Mar 08 2016 02:35
@nickcoleman https://www.mediawiki.org/wiki/Special:ApiSandbox ok I used the sandbox and when you choose something you can click on it and a small description will show what it does
@nickcoleman to the left it says main and when you choose something then to the left those options are added when you click on them the description is shown
@nickcoleman for example when you choose action= query then click the action=query to the left, and then the properties available to query are shown
Nick Coleman
@nickcoleman
Mar 08 2016 02:38
@alexanderkopke But, it doesn’t allow some of the parameter choices that are needed … for example &gsrnamespace. What does the gsr on the front of namespace mean
Holly
@hollywarner
Mar 08 2016 02:41
Im stuck right now with the change the font size of an element.

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

<p2{font-size:16px;}</p2>
<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>
<p2>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff. Purr jump eat the grass rip the couch sleep in the sink fluffy fur catnip scratched.</p2>

cannelflow
@cannelflow
Mar 08 2016 02:42
@hollywarner you need to give ont-size in style tag
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:43
@nickcoleman it means: Search for page titles or content matching this value. You can use the search string to invoke special search features, depending on what the wiki's search backend implements.
cannelflow
@cannelflow
Mar 08 2016 02:43
<style>
  .red-text {
    color: red;    
  }
========
give your font size for p here
</style>
@hollywarner
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:43
@nickcoleman wait.. no I misread
Holly
@hollywarner
Mar 08 2016 02:44
@cannelflow i did i thought?
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:44
@nickcoleman thought you wrote something .. one moment
Holly
@hollywarner
Mar 08 2016 02:44
<style>
.red-text {
color: red; p font-size:16px;}
</style>
is that not correct?
cannelflow
@cannelflow
Mar 08 2016 02:44
@hollywarner you are missinf{ after p
Alexander Køpke
@alexanderkopke
Mar 08 2016 02:44
@nickcoleman gsrnamespace means: Search only within these namespaces.
Holly
@hollywarner
Mar 08 2016 02:45
lol thank you @cannelflow
CamperBot
@camperbot
Mar 08 2016 02:45
hollywarner sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 866 | @cannelflow | http://www.freecodecamp.com/cannelflow
cannelflow
@cannelflow
Mar 08 2016 02:45
@hollywarner :+1:
issamanis1
@issamanis1
Mar 08 2016 02:45
@deedubwhy Can we not add pictures? Just had to make a class <img class ="smaller=image" and also had to connect it through style .smaller-image {
Continuation: { width: 100px; }
David Young
@dayvidwhy
Mar 08 2016 02:45
which challenge is this
Nick Coleman
@nickcoleman
Mar 08 2016 02:49
@alexanderkopke What I’m really after is a data dictionary of the parameters that I can read through … vs the Sandbox where you kind of have to know what your looking for when you’re building the query
Darren Teo
@sonyteo
Mar 08 2016 02:49
Hey guys! I'm new in freeCodeCamp.
I got an issue about anchoring text.
issamanis1
@issamanis1
Mar 08 2016 02:51
@deedubwhy 17!
@sonyteo Which challenge?
Darren Teo
@sonyteo
Mar 08 2016 02:52
Sorry, i just did it. It was a bug that the page doesn't load.
David Young
@dayvidwhy
Mar 08 2016 02:54
@issamanis1 did you chane class=“smaller-image"
you put an equals in htere
Eriksen
@eriksenlezama
Mar 08 2016 02:58
@hollywarner
Try this:
p {
font-size: 16px;
}
Nick Coleman
@nickcoleman
Mar 08 2016 02:59
@alexanderkopke … forgot to say thanks for the tip on clicking on the parameter in “Main” … the sandbox makes a lot more sense with doing that. At worst I can drill down in each of the areas to get the definitions.
CamperBot
@camperbot
Mar 08 2016 02:59
nickcoleman sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 497 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
issamanis1
@issamanis1
Mar 08 2016 03:02
@deedubwhy Yes, i have done this! Thank you. Need help with Anchor text? How do I have my a element to have anchor text of "cat photos"?
CamperBot
@camperbot
Mar 08 2016 03:02
issamanis1 sends brownie points to @deedubwhy :sparkles: :thumbsup: :sparkles:
:star: 68 | @deedubwhy | http://www.freecodecamp.com/deedubwhy
David Young
@dayvidwhy
Mar 08 2016 03:02
put the text in between the <a>text here</a>
issamanis1
@issamanis1
Mar 08 2016 03:02
@sonyteo Could you help me with anchor text?
Darren Teo
@sonyteo
Mar 08 2016 03:03
Yes. How may i help you?
issamanis1
@issamanis1
Mar 08 2016 03:03
@deedubwhy I already have my link in between there so how do i put tis?
*this?
David Young
@dayvidwhy
Mar 08 2016 03:03
should what you have
issamanis1
@issamanis1
Mar 08 2016 03:03
@sonyteo First task? Your a element should have the anchor text of "cat photos".?
Darren Teo
@sonyteo
Mar 08 2016 03:04
It sound kinda like this. <a href="link"> text </a>
issamanis1
@issamanis1
Mar 08 2016 03:06
I did but doesnt work!
Darren Teo
@sonyteo
Mar 08 2016 03:07
@issamanis1 Try reloading the page? Cause i got that issue also.
@issamanis1 Or it might be that you didn't put the P tag?
issamanis1
@issamanis1
Mar 08 2016 03:10
@sonyteo Done! Thanks!
CamperBot
@camperbot
Mar 08 2016 03:10
issamanis1 sends brownie points to @sonyteo :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for sonyteo
Darren Teo
@sonyteo
Mar 08 2016 03:10
Thanks!
M Phillips
@melluvia
Mar 08 2016 03:17
I'm trying to make a row of bootstrap buttons, any clue why it's aligning them as a column?
<div class= "container-fluid portfolio-block row">
    <div class="col-md-4">
      <button class="btn btn-block"></button>
      </div>
   <div class="col-md-4">
     <button class="btn btn-block"></button>
    </div>
    <div class="col-md-4">
      <button class="btn btn-block"></button>
    </div>
    <div class="col-md-4">
      <button class="btn btn-block"></button>
    </div>
</div>
B. Garber
@TheBGar
Mar 08 2016 03:22
@melluvia four columns of 4 is more than 12
@melluvia try switching the col width to 3's
issamanis1
@issamanis1
Mar 08 2016 03:23
Need help with no.23 please?
Jmull2311
@Jmull2311
Mar 08 2016 03:24

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

<h2>CatPhotoApp</h2>

really annoying
ikow this is easy one but can anyone helpout here
David Young
@dayvidwhy
Mar 08 2016 03:24
@issamanis1 its way easier if you post chunks of code
@Jmull2311 what do you want to happen?
Jmull2311
@Jmull2311
Mar 08 2016 03:24
how do i that? print screen doesnt work
B. Garber
@TheBGar
Mar 08 2016 03:24
@Jmull2311 no need to use the element AND the class in the style section, just reference one
@Jmull2311 try using the markdown format as well :point_down:
explain format
CamperBot
@camperbot
Mar 08 2016 03:25

: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

Jmull2311
@Jmull2311
Mar 08 2016 03:25
Your h2 element should be red.
Your h2 element should have the class red-text.
Your stylesheet should declare a red-text class and have its color set to red.
Do not use inline style declarations like style="color: red" in your h2 element.
B. Garber
@TheBGar
Mar 08 2016 03:25
@Jmull2311 so seems like you don't need the h2 element in your <style> section....just the .red-text class. Make sense?
Eriksen
@eriksenlezama
Mar 08 2016 03:26

@Jmull2311 try

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

<h2>CatPhotoApp</h2>

Jmull2311
@Jmull2311
Mar 08 2016 03:27
erik, i tried that and it does turn the desired text red. but i still have the following task to complete:
Your h2 element should have the class red-text.
Your stylesheet should declare a red-text class and have its color set to red.
V Bhargav Chowdary
@bhargav4
Mar 08 2016 03:27

will ng repeat work inside jquery?

issamanis1
@issamanis1
Mar 08 2016 03:27
@deedubwhy Here you go! <p>Click here for <a href ="http://www.freecatphotoapp.com">cat photos</a>.</p>
David Young
@dayvidwhy
Mar 08 2016 03:28
@Jmull2311 so give your h2 element that class. it shows an example of how to add a class
Jmull2311
@Jmull2311
Mar 08 2016 03:28
when i type the code you provided, it still give me grief about the other 2 reqs
oh thank god haha. thanks
B. Garber
@TheBGar
Mar 08 2016 03:28
@Jmull2311 did that make sense what I suggested?
David Young
@dayvidwhy
Mar 08 2016 03:28
@issamanis1 did that work?
issamanis1
@issamanis1
Mar 08 2016 03:31
nope! That's my original code, I need to make it a dead link by replacing a elements href attribute with a #! I replaced href with # but still not working!
B. Garber
@TheBGar
Mar 08 2016 03:31
@issamanis1 I think I may know what's up...can you post your code in here using the following format?
explain format
CamperBot
@camperbot
Mar 08 2016 03:31

: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

B. Garber
@TheBGar
Mar 08 2016 03:31
@issamanis1 :point_up:
Darren Teo
@sonyteo
Mar 08 2016 03:32
@issamanis1 <a href="#"></a>
issamanis1
@issamanis1
Mar 08 2016 03:33
@TheBGar @sonyteo Got it! :)
B. Garber
@TheBGar
Mar 08 2016 03:34
@issamanis1 hopefully you didn't just use @sonyteo answer lol...
Jmull2311
@Jmull2311
Mar 08 2016 03:34

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

<h2>CatPhotoApp</h2>
```

nope
crap
David Young
@dayvidwhy
Mar 08 2016 03:34
have you put a new line
shift-enter after the ```
issamanis1
@issamanis1
Mar 08 2016 03:34
lol no, i figured it!
David Young
@dayvidwhy
Mar 08 2016 03:34
i am code D:
B. Garber
@TheBGar
Mar 08 2016 03:35
@issamanis1 :sparkles: :clap: :sparkles: Nice! Way to go.
@Jmull2311 did that make sense what I said?
Jmull2311
@Jmull2311
Mar 08 2016 03:36
kinda, im falling asleep. gonna pick it back up tomorrow after work. I already figured this one out before I linked with Github, not sure why im so dense on it now that i have to re do it.
M Phillips
@melluvia
Mar 08 2016 03:37
thanks @TheBGar for the tip, I made the changes but it's still vertically aligned
CamperBot
@camperbot
Mar 08 2016 03:37
melluvia sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles:
:star: 342 | @thebgar | http://www.freecodecamp.com/thebgar
Jmull2311
@Jmull2311
Mar 08 2016 03:37
thanks for your help
Darren Teo
@sonyteo
Mar 08 2016 03:38
This message was deleted
B. Garber
@TheBGar
Mar 08 2016 03:38
@melluvia hm... interesting. Can you post the entire code? I'd be happy to take a look
M Phillips
@melluvia
Mar 08 2016 03:38
yes will do
V Bhargav Chowdary
@bhargav4
Mar 08 2016 03:39
@melluvia add class col-xs-3
Jmull2311
@Jmull2311
Mar 08 2016 03:39

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

<h2>CatPhotoApp</h2>

thebgar, is that what you meant?
@TheBGar
B. Garber
@TheBGar
Mar 08 2016 03:40
@NgocTang you'll need to assign a value to fahrenheit that reflects the conversions that need to be made to a celsius value
V Bhargav Chowdary
@bhargav4
Mar 08 2016 03:40

Any idea how to display wiki api results using jquery?

B. Garber
@TheBGar
Mar 08 2016 03:41
@Jmull2311 while you certainly can use elements, classes, and ids in <style>, in this example, it's only asking you to use the class value, which you'll need to assign in your html as well
@Jmull2311 does that make sensE?
Tom Johnson
@tomjohnsonfewd
Mar 08 2016 03:42

I'm being told to comment out lobster so that it reverts to monospace - can someone tell me what I'm doing wrong here?

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

B. Garber
@TheBGar
Mar 08 2016 03:42
@melluvia silly question, but I'll ask anyway....is your viewport wide enough to accommodate 4 columns wide? When using bootstrap cols, if the viewport is narrow, the elements will stack
@tomjohnsonfewd try including the comma?
@tomjohnsonfewd actually, you need to use a css comment, rather than an html comment syntax
Tom Johnson
@tomjohnsonfewd
Mar 08 2016 03:43
I tried that initially, but i still get the error
B. Garber
@TheBGar
Mar 08 2016 03:44
@tomjohnsonfewd tried which?
Tom Johnson
@tomjohnsonfewd
Mar 08 2016 03:44
including the ,
Melanie
@MelanieLeAnn
Mar 08 2016 03:44

Help, please. So, I'm supposed to do the following: Give your button element with the id target1 the text #target1.

I did this, which is wrong:
<h4>#target1</h4>
<button class="btn btn-default target" id="target1"></button>

CamperBot
@camperbot
Mar 08 2016 03:44
no wiki entry for: please so im supposed to do the following give your button element with the id target1 the text target1 i did this which is wrong h4target1h4 button classbtn btn-default target idtarget1button
B. Garber
@TheBGar
Mar 08 2016 03:44
@tomjohnsonfewd did you use the correct syntax for comments in css?
issamanis1
@issamanis1
Mar 08 2016 03:44
How do i next the existing img element within an a element? Heres my code below:
<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
Tom Johnson
@tomjohnsonfewd
Mar 08 2016 03:44
how do i use a css comment? I am a complete newbie sorry
Manish Giri
@Manish-Giri
Mar 08 2016 03:45
@issamanis1
<a href=“#”><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat”></a>
@MelanieLeAnn I think you need this
<button class="btn btn-default target" id="target1”>#target1</button>
Melanie
@MelanieLeAnn
Mar 08 2016 03:45
wow, so many questions tonight :) Wish I could answer some!
Mudit Bhutani
@muditbhutani
Mar 08 2016 03:46
@muditbhutani
blob
does this take too much time always ?
this green bars keep coming and i dont get the option of commit to master
issamanis1
@issamanis1
Mar 08 2016 03:46
@Manish-Giri
Right on point!
Tom Johnson
@tomjohnsonfewd
Mar 08 2016 03:47
I see what i did @TheBGar thanks!
CamperBot
@camperbot
Mar 08 2016 03:47
tomjohnsonfewd sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles:
:star: 343 | @thebgar | http://www.freecodecamp.com/thebgar
Jmull2311
@Jmull2311
Mar 08 2016 03:48
@TheBGar yup, i found the code online. i now understand what you meant by setting the html class value as well as the css
B. Garber
@TheBGar
Mar 08 2016 03:48
@tomjohnsonfewd nice!
@tomjohnsonfewd was is the wrong comment syntax?
@Jmull2311 :thumbsup: I think you were trying to double the <style> code by using both h2 and .text-red, yeah?
Melanie
@MelanieLeAnn
Mar 08 2016 03:49
Thank you @Manish-Giri! That worked perfectly.
CamperBot
@camperbot
Mar 08 2016 03:49
melanieleann sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 729 | @manish-giri | http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Mar 08 2016 03:50
@MelanieLeAnn anytime!
Brian Barrow
@briancbarrow
Mar 08 2016 03:51
anybody able to help me with a sass question?
B. Garber
@TheBGar
Mar 08 2016 03:54
@melluvia what screen are you viewing from?
Tao
@rica213
Mar 08 2016 03:54
blob
This message was deleted
Martjin
@Martjin
Mar 08 2016 03:55
i need help with nesting
B. Garber
@TheBGar
Mar 08 2016 03:55
@rica213 looking to post code here?
explain format
CamperBot
@camperbot
Mar 08 2016 03:55

: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

Tao
@rica213
Mar 08 2016 03:56
Hi everybody, anyone here can help me with npm?
It says that module body.json is not found when I run the command how-to-npm verify
@TheBGar Sorry, it's my first time using this chat room so I had no idea that I could send the image just by copy/paste, I have some issue with npm and it shows in the screenshoot. Seems like that a module is not found when I run the commande how-to-npm verify
B. Garber
@TheBGar
Mar 08 2016 04:01
@rica213 no worries!
ChristobalHuet
@ChristobalHuet
Mar 08 2016 04:01
Hello, I'm not shure to understand what to do when they ask me to "make your p element visible on your page by uncommenting it"
Martjin
@Martjin
Mar 08 2016 04:02
@ChristobalHuet remove the <--- and ---/>
Jacob Jimenez
@r00t1000
Mar 08 2016 04:03
Could I get some help?
Manish Giri
@Manish-Giri
Mar 08 2016 04:04
@r00t1000 where you stuck
ChristobalHuet
@ChristobalHuet
Mar 08 2016 04:07
@Martjin thank you for the help, it does not work, but i will try it again tomorrow !
CamperBot
@camperbot
Mar 08 2016 04:07
christobalhuet sends brownie points to @martjin :sparkles: :thumbsup: :sparkles:
:star: 28 | @martjin | http://www.freecodecamp.com/martjin
Pawan
@pawan92
Mar 08 2016 04:08
@ChristobalHuet remove <!---<p>hshdl</p>---->
remove the comment tag
Kally Chung
@chunggnuhc
Mar 08 2016 04:10
Hi
Hi everyone
Jake
@Munsterberg
Mar 08 2016 04:10
Hello
Kally Chung
@chunggnuhc
Mar 08 2016 04:10
I need a help with bootstrap grid
Shivendra Pratap Singh
@shivendra-it
Mar 08 2016 04:10
hi
Kally Chung
@chunggnuhc
Mar 08 2016 04:11
I have to try to "copy" this page: http://codepen.io/FreeCodeCamp/full/wMQrXV
In the second part, i can't figure how to put one column grid in the center
I mean, in the second part (the time line), i can't figure how to put one column grid in the center
Jake
@Munsterberg
Mar 08 2016 04:13
Like center it on the page?
Kally Chung
@chunggnuhc
Mar 08 2016 04:13
yes
Jake
@Munsterberg
Mar 08 2016 04:13
In the pen they are using column offsets, have you tried that yet?
Kally Chung
@chunggnuhc
Mar 08 2016 04:14
no, i was studying how to set margin to the grid
thanks
Jake
@Munsterberg
Mar 08 2016 04:14
Here is the div in the pen
<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2”>
echeon
@echeon
Mar 08 2016 04:15
@chunggnuhc http://getbootstrap.com/css/#grid-offsetting this webpage has some info on the offset. I believe it’s not actually centered.
Ben Barnett
@fluxrate
Mar 08 2016 04:15
Having trouble centering a list of unordered elements. When I use "text-center" they are indeed centering, but the bullet points count in the text string and so are no longer aligned vertically
Martjin
@Martjin
Mar 08 2016 04:20
i need help with nesting
Tao
@rica213
Mar 08 2016 04:24
@rica213 I found the solution about the problem I had with npm, I had to log in again and it works perfectly :)
Jacob Jimenez
@r00t1000
Mar 08 2016 04:27
wiki Falsy Bouncer
CamperBot
@camperbot
Mar 08 2016 04:27

:point_right: algorithm falsy bouncer [wiki]

Problem Explanation:

Remove all falsy values from an array.

:pencil: read more about algorithm falsy bouncer on the FCC Wiki

Ben Barnett
@fluxrate
Mar 08 2016 04:28
does anyone know how to center a list>
Kinshuk Sen
@kinshuksen
Mar 08 2016 04:31
@fluxrate try this ul { display:table; margin:0 auto;} within Styles
jetchirag
@jetchirag
Mar 08 2016 04:31
width: #px;
margin: auto;
@fluxrate
width: #px;
margin: auto;
Ben Barnett
@fluxrate
Mar 08 2016 04:35
Perfect! One last thing... Is there a way to get the text to move over to be next to the bullets? https://gyazo.com/71f4308c7b2cda1281f7d3161006657b
Kinshuk Sen
@kinshuksen
Mar 08 2016 04:37
text-align : left
@fluxrate are you able to try this?
jetchirag
@jetchirag
Mar 08 2016 04:38
you should use the following
This message was deleted
Ben Barnett
@fluxrate
Mar 08 2016 04:38
what does that do @thechiragaggarwal
jetchirag
@jetchirag
Mar 08 2016 04:39
This message was deleted
Ben Barnett
@fluxrate
Mar 08 2016 04:39
Also @kinshuksen your two explinations made it work, thank you
CamperBot
@camperbot
Mar 08 2016 04:39
fluxrate sends brownie points to @kinshuksen :sparkles: :thumbsup: :sparkles:
:star: 133 | @kinshuksen | http://www.freecodecamp.com/kinshuksen
Kinshuk Sen
@kinshuksen
Mar 08 2016 04:40
@fluxrate you're welcome mate
SamIAmHarris
@SamIAmHarris
Mar 08 2016 04:43
Anyone remember how to use the nth-child function on jQuery?
$("#left-well:nth-child(2)").addClass("animated bounce");
This is not working for me
yelsneH
@yelsneh
Mar 08 2016 04:44
$(".target:nth-child(2)").addClass("animated bounce");
try that
SamIAmHarris
@SamIAmHarris
Mar 08 2016 04:44
yup that was it
thanks @yelsneh
CamperBot
@camperbot
Mar 08 2016 04:44
samiamharris sends brownie points to @yelsneh :sparkles: :thumbsup: :sparkles:
:star: 128 | @yelsneh | http://www.freecodecamp.com/yelsneh
yelsneH
@yelsneh
Mar 08 2016 04:44
np
The wording is definitely odd in that one
SamIAmHarris
@SamIAmHarris
Mar 08 2016 04:45
So how did it know I wanted to get the children of the well objects by just using .target
yelsneH
@yelsneh
Mar 08 2016 04:45
well target is the child of all of the well div's
see how target is a class of every button?
it's just worded poorly
SamIAmHarris
@SamIAmHarris
Mar 08 2016 04:46
ah
yelsneH
@yelsneh
Mar 08 2016 04:46
technically not "the" child but A child
you could do .btn:nth-child(2) and accomplish the exact same thing
SamIAmHarris
@SamIAmHarris
Mar 08 2016 04:47
Yup that gets accepted also as an answer
thanks again, have a good one
yelsneH
@yelsneh
Mar 08 2016 04:48
You too friend
arcjackson06
@arcjackson06
Mar 08 2016 04:54
hello I was wondering if someone could help me with some html code
yelsneH
@yelsneh
Mar 08 2016 04:54
Just ask the question friend no need to ask to ask
jetchirag
@jetchirag
Mar 08 2016 04:56
@arcjackson06 Sure. Just Ask
Geoffrey Montague
@mongeo
Mar 08 2016 04:56
I'm having problems with the "Seek and Destroy" - Basic Algorithm challenge. I don't see how I can implement args in the Array.filter() method
arcjackson06
@arcjackson06
Mar 08 2016 04:56

<nav class="nav navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Arc Designes</a>
</div>
<ul class="nav navbar-nav">
<li><a href"#">Home</a></li>
<li><a href"#">About</a></li>
<li><a href"#">Portfolio</a></li>
<li><a href"#">Contact</a></li>
</ul>
</nav>
</div>

<div class="first-div">
<h1>Hello</h1>
</div>

My h1 tag is hiding behind my navbar I'v tried margin-bottom on the tag and the nav bar but nothing is helping
:/ don't really know how to submit code
jetchirag
@jetchirag
Mar 08 2016 04:59
@arcjackson06 Use Code here
Wait. use ` backticks three times
SSeele
@SSeele
Mar 08 2016 05:01
what am i missing here?
jetchirag
@jetchirag
Mar 08 2016 05:01
@SSeele Didn't Got You?
SSeele
@SSeele
Mar 08 2016 05:02
no idea what they mean by "delete trailing comment tags"
Jake
@Munsterberg
Mar 08 2016 05:03
explain format
CamperBot
@camperbot
Mar 08 2016 05:03

: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

DJ
@qualitymanifest
Mar 08 2016 05:04
@SSeele leading comment tags: <!-- trailing comment tags: -->
SSeele
@SSeele
Mar 08 2016 05:06
i have it at the end, i just can't understand what tehy are asking
jetchirag
@jetchirag
Mar 08 2016 05:06
You have to remove that comment
minhazsiraj
@minhazsiraj
Mar 08 2016 05:08

<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 </p>
please help me

SSeele
@SSeele
Mar 08 2016 05:08
ughh i just did now its giving me the error on the frist 3
first*
David Young
@dayvidwhy
Mar 08 2016 05:08
@minhazsiraj what do you want to happen?
minhazsiraj
@minhazsiraj
Mar 08 2016 05:10
i am stuck up to this and i can't proceed to next challenge
SSeele
@SSeele
Mar 08 2016 05:10
Uncomment your h1, h2 and p elements.
Darren Teo
@sonyteo
Mar 08 2016 05:11
@SSeele Tips: I believe that you should remove something?
jetchirag
@jetchirag
Mar 08 2016 05:12
You have to delete all <!-- and -->
SSeele
@SSeele
Mar 08 2016 05:12
there it is
thanks Chirag
David Young
@dayvidwhy
Mar 08 2016 05:13
@minhazsiraj whats it asking you to do
jetchirag
@jetchirag
Mar 08 2016 05:13
@SSeele NP, you're welcome
minhazsiraj
@minhazsiraj
Mar 08 2016 05:14
it's asking to me "Your p element should contain the first few words of the provided additional kitty ipsum text."
i think i did what i have asked but it is not working
jetchirag
@jetchirag
Mar 08 2016 05:16
This message was deleted
<h1>Hello World</h1>

<h2>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>
David Young
@dayvidwhy
Mar 08 2016 05:17
yeah try and copy paste the entire paragraph from what it suggests, i had that problem
slewis185
@slewis185
Mar 08 2016 05:19
Im having an awful time getting "Return Early Pattern for Functions" figured out guys
minhazsiraj
@minhazsiraj
Mar 08 2016 05:19
blob
David Young
@dayvidwhy
Mar 08 2016 05:20
copy paste all the text, then hit reset
then paste it and try again
if not just move on and try later
minhazsiraj
@minhazsiraj
Mar 08 2016 05:21
ok
seems it is not working ..ok i am moving to next challenge..
thank you @deedubwhy
CamperBot
@camperbot
Mar 08 2016 05:23
minhazsiraj sends brownie points to @deedubwhy :sparkles: :thumbsup: :sparkles:
:star: 111 | @deedubwhy | http://www.freecodecamp.com/deedubwhy
jetchirag
@jetchirag
Mar 08 2016 05:23
@minhazsiraj You must try deleting last <p>------</p>
Darren Teo
@sonyteo
Mar 08 2016 05:24
@minhazsiraj Why not reloading the page and try it again? If you skip you'll not getting that.
jetchirag
@jetchirag
Mar 08 2016 05:25
Hit the reset button and try that again
minhazsiraj
@minhazsiraj
Mar 08 2016 05:26
ok i am trying again
jetchirag
@jetchirag
Mar 08 2016 05:26
:+1:
minhazsiraj
@minhazsiraj
Mar 08 2016 05:30
yeah got my mistake. thank you guys.
DrewBowzer2016
@DrewBowzer2016
Mar 08 2016 05:30
how do i add this: $("button").addClass("animated bounce"); to my document ready function
Jeff
@meankraken
Mar 08 2016 05:34

Hello all, I'm stumped on my ajax call:

$.ajax({
url: "https://en.wikipedia.org/w/api.php?action=blah",
datatype:"json",
success: function() {
$("#main-section").html("Success");
},
error: function(xhr) {
$("#main-section").html(xhr.error.code);

}

});

I'm trying to see what the error is from the wikipedia api, but it never returns anything

Shailesh Kumar
@sksundram
Mar 08 2016 05:36
@DrewBowzer2016 $("document").ready(function() { $("button").addClass("animated bounce");});
DrewBowzer2016
@DrewBowzer2016
Mar 08 2016 05:45
typed it and doesnt work
@sksundram typed it and still doesnt work
V Bhargav Chowdary
@bhargav4
Mar 08 2016 05:47
@meankraken The url you entered won't work because it's a page about how the json will look but not the json itself.
Also change json to jsonp
In short, It's a html representation of the json
@DrewBowzer2016
<script>
  $(document).ready(function() {

    $("button").addClass("animated bounce");

  });
</script>
Mufaddal B
@invinciblemuffi
Mar 08 2016 05:51
@bhargav4 : Were you able to solve it
wiki prime
CamperBot
@camperbot
Mar 08 2016 05:51

:point_right: algorithm sum all primes [wiki]

Explanation:

The explanation for this problem is very simple. You will generate a list of prime numbers up to the number you are given as a parameter. Then you need to add them all up and return that value. The tricky part is on generating the list of prime numbers. I suggest you find a code or a good math algorithm that you can turn into code.

:pencil: read more about algorithm sum all primes on the FCC Wiki

V Bhargav Chowdary
@bhargav4
Mar 08 2016 05:52
@invinciblemuffi Sorry are u asking about my question?
Jeff
@meankraken
Mar 08 2016 05:53
@bhargav4 Hey bhargav, I understand what you're saying, I've changed the url to https://en.wikipedia.org/w/api.php?action=query&titles=San_Francisco&prop=images&imlimit=20&format=json which should return a json file now, but it's still not working. It should at least be giving me an error, but there's nothing, it's just undefined, not sure why
V Bhargav Chowdary
@bhargav4
Mar 08 2016 05:54
@meankraken have you tried jsonp?
i had same issue
Mufaddal B
@invinciblemuffi
Mar 08 2016 05:55
@bhargav4 : Yes your yesterday's question of wiki viewer
Jeff
@meankraken
Mar 08 2016 05:55
@bhargav4 Yep, tried jsonp but still nothing
V Bhargav Chowdary
@bhargav4
Mar 08 2016 05:55
@invinciblemuffi No, im still stuck here.
Mufaddal B
@invinciblemuffi
Mar 08 2016 05:56
ok send me the link once again
Jeff
@meankraken
Mar 08 2016 05:56
@bhargav4 it would be a lot easier if I could see the error, but I have a feeling it has something to do with the 'user agent' thing? do I need to set that?
Thomas Noe
@t3h2mas
Mar 08 2016 05:56
Code?
Explain format
CamperBot
@camperbot
Mar 08 2016 05:57

: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

jetchirag
@jetchirag
Mar 08 2016 05:57
Hello World!
CamperBot
@camperbot
Mar 08 2016 05:57

welcome to FreeCodeCamp @thechiragaggarwal!

jetchirag
@jetchirag
Mar 08 2016 05:57
lol
V Bhargav Chowdary
@bhargav4
Mar 08 2016 05:57
@invinciblemuffi http://codepen.io/bhargav14/pen/bpNrJj
I was able to get the data but no idea how to display the results using jquery
Mufaddal B
@invinciblemuffi
Mar 08 2016 05:58
@bhargav4 : If you are already getting the data the I can explain you on how to use that data and display it as you want
Thomas Noe
@t3h2mas
Mar 08 2016 05:59
Isn't Ajax fun
jetchirag
@jetchirag
Mar 08 2016 05:59
@bhargav4 @invinciblemuffi You should have a look here http://codepen.io/gandhi_rahul/pen/xVGNrZ
Mufaddal B
@invinciblemuffi
Mar 08 2016 05:59
I assume that you have knowledge about working with objects(and retreiving its key/value pairs)
V Bhargav Chowdary
@bhargav4
Mar 08 2016 05:59
@meankraken I couldn't get the error too..
Dont know what the problem was
but eventually could get the data
Jeff
@meankraken
Mar 08 2016 06:00
@bhargav4 Hey Bhargav looking at your code made me realize my dumb mistake.. my dataType property wasn't capitalized correctly, that's why it was failing
Thanks @bhargav4
CamperBot
@camperbot
Mar 08 2016 06:00
meankraken sends brownie points to @bhargav4 :sparkles: :thumbsup: :sparkles:
:star: 299 | @bhargav4 | http://www.freecodecamp.com/bhargav4
V Bhargav Chowdary
@bhargav4
Mar 08 2016 06:00
@thechiragaggarwal Ok thanks.I'll look into it
@invinciblemuffi Thanks
CamperBot
@camperbot
Mar 08 2016 06:00
bhargav4 sends brownie points to @thechiragaggarwal and @invinciblemuffi :sparkles: :thumbsup: :sparkles:
:star: 299 | @invinciblemuffi | http://www.freecodecamp.com/invinciblemuffi
:star: 45 | @thechiragaggarwal | http://www.freecodecamp.com/thechiragaggarwal
V Bhargav Chowdary
@bhargav4
Mar 08 2016 06:01
@thechiragaggarwal You used angularjs didn't you
jetchirag
@jetchirag
Mar 08 2016 06:02
@bhargav4 Thats not mine! I found that over codepen
Thomas Noe
@t3h2mas
Mar 08 2016 06:02
I don't think angular makes retrieving data over Ajax any easier
jetchirag
@jetchirag
Mar 08 2016 06:02
I'm learning JS at very beginning. So, I thought that would be helpful to you.
V Bhargav Chowdary
@bhargav4
Mar 08 2016 06:03
@thechiragaggarwal OK, that works using angularjs but im trying to use jquery to display the search results
jetchirag
@jetchirag
Mar 08 2016 06:03
:+1:
Thomas Noe
@t3h2mas
Mar 08 2016 06:03
@bhargav4 how familiar with jquery are you
V Bhargav Chowdary
@bhargav4
Mar 08 2016 06:04
@t3h2mas Not much
Been doing exercises thats it
Thomas Noe
@t3h2mas
Mar 08 2016 06:04
So you have the data in json right
V Bhargav Chowdary
@bhargav4
Mar 08 2016 06:04
Yes
I got the data to Arrays but cannot figure out how to display
Thomas Noe
@t3h2mas
Mar 08 2016 06:05
Have you accessed the specific variables your want to yet
V Bhargav Chowdary
@bhargav4
Mar 08 2016 06:05
yes
Thomas Noe
@t3h2mas
Mar 08 2016 06:05
So there are methods in jquery to get and set values of elements...
I'm not sure what the format of data you're working with is like, but depending on how you want to display it, you have a few options,
V Bhargav Chowdary
@bhargav4
Mar 08 2016 06:08
i have to target each element for all the results seperately right?
Mufaddal B
@invinciblemuffi
Mar 08 2016 06:29
@bhargav4 : Right now you will be getting data as an object
from that object, access query key, from query key access pages key, this will give you the actual results matched for your input value
now put a for loop or whichever looping mechanism you are comfortable with, take that pages value and loop over it and keep adding each value to a li tag using += operator
V Bhargav Chowdary
@bhargav4
Mar 08 2016 06:36
@invinciblemuffi thanks
CamperBot
@camperbot
Mar 08 2016 06:36
bhargav4 sends brownie points to @invinciblemuffi :sparkles: :thumbsup: :sparkles:
:warning: bhargav4 already gave invinciblemuffi points
Mufaddal B
@invinciblemuffi
Mar 08 2016 06:36
I hope now it will be easier for you to move ahead.
Kyle Bowman
@Kbman99
Mar 08 2016 06:51
Hey, how can I get my browser zoom to be set at 100%?
Mathew Paul
@mathappan
Mar 08 2016 06:55
Ctrl 0
Or go to the options and change
@Kbman99
shivshanker
@shiva013
Mar 08 2016 07:14
Hi good afternoon
Ashraful Islam
@iashraful
Mar 08 2016 07:20
@shiva013 afternoon! :D
I like to suggest all future apps to be in github.com as github.io
that way not only will the apps be readily available in your github, but your employer can review it and see how much you know and stuff
in the meanwhile you learn about github too
I think github.io also offers https so no problem of broken weather apps :D
P.S: All future-apps = frontend apps only
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 07:35
I'm having some trouble with some basics
V Bhargav Chowdary
@bhargav4
Mar 08 2016 07:40

Wiki Api feeback please

http://codepen.io/bhargav14/pen/bpNrJj
CamperBot
@camperbot
Mar 08 2016 07:40
no wiki entry for: api feeback pleasehttpcodepeniobhargav14penbpnrjj
Ashraful Islam
@iashraful
Mar 08 2016 07:40
@luckoftheirish9989 where are you stuck?
@bhargav4 wow! I like it!. The unfolding transition is very nice for the results
I think if you made the results a bit more spaced, it'd be finger friendly in mobile devices :D
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 07:44
@iashraful I think i figured it out thanks
CamperBot
@camperbot
Mar 08 2016 07:44
luckoftheirish9989 sends brownie points to @iashraful :sparkles: :thumbsup: :sparkles:
:star: 490 | @iashraful | http://www.freecodecamp.com/iashraful
V Bhargav Chowdary
@bhargav4
Mar 08 2016 07:45
@iashraful Thanks man
CamperBot
@camperbot
Mar 08 2016 07:45
bhargav4 sends brownie points to @iashraful :sparkles: :thumbsup: :sparkles:
:star: 491 | @iashraful | http://www.freecodecamp.com/iashraful
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 07:45
whats the poit of a css?
point
Ashraful Islam
@iashraful
Mar 08 2016 07:46
point -> 10pt
you should use pixels instead, -> 10px;
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 07:47
i sort of understand what you mean
but what i dont understand is like, can i put two different properties for like an <h2 element on different lines?
or is it linear
like g code
Niko Salonen
@nikosalonen
Mar 08 2016 07:48
you can put as many you like as long as it's all wrapped inside { }
Even Berhe
@eberhe
Mar 08 2016 07:49
how do I make my h1 element visible by uncommenting it
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 07:49
so i cant write something like this,
<h2 blah blah behalf /h2>
then <p bla balh /p>
then <h2 eh2>tc etc /
Niko Salonen
@nikosalonen
Mar 08 2016 07:51
if you want to put the style inside to the tag you need to use style property eg. <h2 style="color:red;font-size:12px;">Bla</h2>
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 07:51
<h2 etc etc /h2>*
okay ill keep playing around
thank you @nikosalonen
CamperBot
@camperbot
Mar 08 2016 07:52
luckoftheirish9989 sends brownie points to @nikosalonen :sparkles: :thumbsup: :sparkles:
:star: 135 | @nikosalonen | http://www.freecodecamp.com/nikosalonen
Niko Salonen
@nikosalonen
Mar 08 2016 07:53
but if you have several tags you want to apply same styles it's good idea to use the <style> tag
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 07:53
okay that makes sense
Niko Salonen
@nikosalonen
Mar 08 2016 07:53
<style>
h2{
color:red;

}
</style>
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 07:54
got it
João Fernandes
@joaofnds
Mar 08 2016 07:54
http://www.freecodecamp.com/challenges/no-repeats-please
What formula they wan't me to use??? I've tried all the formulas I learned at school to solve this kind of problem, but none of them gives me the result that FreeCode Camp wants!
Niko Salonen
@nikosalonen
Mar 08 2016 08:04
I don't think it matters as long as you return correct values
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 08:17
how do I add a second class to a single element
Mathew Paul
@mathappan
Mar 08 2016 08:20
@luckoftheirish9989 if you want to add one more class to, "class abc" put class "abc nameofsecondclass"
Niko Salonen
@nikosalonen
Mar 08 2016 08:21
<div class="first second"> </div>
Hafiz M. Arslan
@hfzarslan
Mar 08 2016 08:26
@adib10mist pakistan
Vijeta
@vijetab
Mar 08 2016 08:26
how to Inside the same <style> tag that contains your red-text class, create an entry for p elements and set the font-size to 16 pixels (16px).
how to change font pixels
Dennis Ezechi
@ezechidc
Mar 08 2016 08:29
I need help with challenge 103 Change Text Inside an Element Using jQuery
question said Italicize the text in your target4 button by adding HTML tags and i did $("target4").html("<i>target4</i>");
Niko Salonen
@nikosalonen
Mar 08 2016 08:30
@ezechidc you don't have the id-selector #
Dennis Ezechi
@ezechidc
Mar 08 2016 08:31
@nikosalonen i did that before yet not working
Niko Salonen
@nikosalonen
Mar 08 2016 08:31
does the target4 button have id attribute?
Dennis Ezechi
@ezechidc
Mar 08 2016 08:32
@nikosalonen id is target4
Niko Salonen
@nikosalonen
Mar 08 2016 08:33
and $("#target4").html("<i>target4</i>"); does not work?
Dennis Ezechi
@ezechidc
Mar 08 2016 08:33
yes
Niko Salonen
@nikosalonen
Mar 08 2016 08:33
what is the error?
Dennis Ezechi
@ezechidc
Mar 08 2016 08:34
when i click submit no response
cannelflow
@cannelflow
Mar 08 2016 08:35
$("#target4").html("<i>#target4</i>"); @ezechidc @nikosalonen
Dennis Ezechi
@ezechidc
Mar 08 2016 08:35
doesn't give any error msg
@cannelflow it worked thanks
CamperBot
@camperbot
Mar 08 2016 08:36
ezechidc sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 868 | @cannelflow | http://www.freecodecamp.com/cannelflow
tpeg5stan
@tpeg5stan
Mar 08 2016 08:46
Hello everyone, I have a problem with the "chnage the font size of an element"
the result on the right is good, I have tried with different sizes, but it tells there is an error when validating
I believe the problem is with "Browser and Text zoom should be at 100%." Do you know how to fix it ? Or how to bypass the level ?
Niko Salonen
@nikosalonen
Mar 08 2016 08:52
ctrl + 0 resets the zoom if you have any
tpeg5stan
@tpeg5stan
Mar 08 2016 08:53
thanks, I knew it but there are no differences
Niko Salonen
@nikosalonen
Mar 08 2016 08:55
what red icons you have on the left bottom
tpeg5stan
@tpeg5stan
Mar 08 2016 08:55
Ah ok, it was a problem with the validation of other criteria, it is good now
Niko Salonen
@nikosalonen
Mar 08 2016 08:56
good
tpeg5stan
@tpeg5stan
Mar 08 2016 08:56
in fact the last icon was red even if the size is the right one, if you have an error in the previous icons
cannelflow
@cannelflow
Mar 08 2016 09:10
@tpeg5stan show your code
tpeg5stan
@tpeg5stan
Mar 08 2016 09:16
too late, I'm 5 levels after :)
more seriously, I had not understood the condition "do not add a style without removing another" or something like that, thus the condition before the last one was false
thus the last one was also flase,
even if, logically speaking, I would have considered the last one to be good
Antonin Archer
@nicknem
Mar 08 2016 09:22
Can you do string interpolation in javascript ? Like say I have an API url in which I want to insert values for specific queries?
GowthamReddyAmbati
@GowthamReddyAmbati
Mar 08 2016 09:26
Hi Everyone, Would you please help me to understand the 4th point ...se the $("button") selector.
Use the $(".btn") selector.
Use the $("#target1") selector.
Only add one class with each of your three selectors.
Your #target1 element should have the classes animated‚ shake and btn-primary.
Only use jQuery to add these classes to the element.
Antonin Archer
@nicknem
Mar 08 2016 09:26
@GowthamReddyAmbati can you use markdown ? Just type "```" before and after your message.
So we can see the code properly
Brendan Kinahan
@BKinahan
Mar 08 2016 09:26

@nicknem like an API call to

var query = "searchterm";
var url = "http://website.com/api?" + query;

? Because yes that will work if you have the format right.

GowthamReddyAmbati
@GowthamReddyAmbati
Mar 08 2016 09:27
<script>
  $(document).ready(function() {
$("button" ).addClass("animated shake btn-primary");
    $(".btn") .addClass("animated shake btn-primary");
    $("#target1").addClass("animated shake btn-primary");
  });
</script>

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

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target" id="target4">#target4</button>
        <button class="btn btn-default target" id="target5">#target5</button>
        <button class="btn btn-default target" id="target6">#target6</button>
      </div>
    </div>
  </div>
</div>
Brendan Kinahan
@BKinahan
Mar 08 2016 09:27
@GowthamReddyAmbati you are adding three classes with each of your selectors. only add one per selector.
Antonin Archer
@nicknem
Mar 08 2016 09:27
@BKinahan yes but mine looks like this :D
var url = baseUrl + pos.lat + "&lon=" + pos.lng + "&appid=" + API
cannelflow
@cannelflow
Mar 08 2016 09:29
<script>
  $(document).ready(function() {
$("button" ).addClass("animated shake btn-primary");<====add only one class here you are adding all three
    $(".btn") .addClass("animated shake btn-primary");
    $("#target1").addClass("animated shake btn-primary");
  });
</script>
@GowthamReddyAmbati
Brendan Kinahan
@BKinahan
Mar 08 2016 09:29
@nicknem should work if all the variables refer to strings, or the js will properly result in a string (for example "a"+1 === "a1") and the final URL is in a format the API can process
Niko Salonen
@nikosalonen
Mar 08 2016 09:29
@GowthamReddyAmbati Only add one class with each of your three selectors.
Brendan Kinahan
@BKinahan
Mar 08 2016 09:30
@nicknem does the value of baseUrl end with "&lat="?
@nicknem you can always console.log the result of that line to make sure the URL works by pasting it into a new browser tab/window
GowthamReddyAmbati
@GowthamReddyAmbati
Mar 08 2016 09:30
i have added one class for each of three selectors. However, the fifth point is "Your #target1 element should have the classes animated‚ shake and btn-primary" is not satisfied.
Brendan Kinahan
@BKinahan
Mar 08 2016 09:31
@GowthamReddyAmbati have you changed your code since you last posted it?
Antonin Archer
@nicknem
Mar 08 2016 09:32
@BKinahan only problem is I can't access the value of the variables lng and lat
Brendan Kinahan
@BKinahan
Mar 08 2016 09:32
because what you shared should not satisfy the part about adding only one class per selector..
Antonin Archer
@nicknem
Mar 08 2016 09:32
// var baseUrl = "//api.openweathermap.org/data/2.5/weather?lat=";
var baseUrl = "//api.openweathermap.org/data/2.5/weather?lat=35&lon=139"
var API = "02049e4cb7c3619b87ed49d3181dc2e0";
// Get user location and store it in the pos variable
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
    var pos = {
      lat: Math.round(position.coords.latitude),
      lng: Math.round(position.coords.longitude)
    };  
  });
}
console.log(pos); //doesn't work
// var url = baseUrl + pos.lat + "&lon=" + pos.lng + "&appid=" + API;
var url = baseUrl + "&appid=" + API;
console.log(url);
Brendan Kinahan
@BKinahan
Mar 08 2016 09:32
@nicknem what does your pos object look like at the time of that call to its properties?
Antonin Archer
@nicknem
Mar 08 2016 09:33
@BKinahan how would you access the value of pos.lat and pos.lng outside the function? Sorry it's a noob quesiton but I'm getting lost
Brendan Kinahan
@BKinahan
Mar 08 2016 09:33
@nicknem ohhh, because pos is in an unavailable scope.
Antonin Archer
@nicknem
Mar 08 2016 09:33
It's a rounded number. I printed it it works.
@BKinahan that's what I thought yes but I'm terrible with scopes so far
Should I return the value ?
Brendan Kinahan
@BKinahan
Mar 08 2016 09:35
@nicknem it might make more sense to declare pos outside of the function (in the main scope) and then use the function to assign its lat and long properties like
pos.lat = ...;
pos.lng = ...;
@nicknem that way you can also check whether pos has those properties before performing the API call, as a step of error-checking in case there is an improper or missing value there
Antonin Archer
@nicknem
Mar 08 2016 09:39
This message was deleted
var pos = {};
// Get user location and store it in the pos variable
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position, pos) {
      pos.lat = Math.round(position.coords.latitude),
      pos.lng =  Math.round(position.coords.longitude)
    });
}
console.log(pos.lat); //doesn't work
@BKinahan like this? I'm making a mistake somewhere :/
V Bhargav Chowdary
@bhargav4
Mar 08 2016 09:40
Cannot access names array in console.log Showing as undefined
$(document).ready(function() {
  var names = [];
  names = ["freecodecamp", "storbeck", "terakilobyte", "habathcx", "RobotCaleb", "thomasballinger", "noobs2ninjas", "beohoff", "ogamingsc2", "esl_sc2"];
  for (var i = 0; i < names.length; i++) {
    var ch = names[i];
    $.getJSON('https://api.twitch.tv/kraken/streams/' + ch + '?callback=?', function(data) {

      if (data.stream == null) {
        console.log(names[i]+ " " + "Offline");
      } else {
        console.log(names[i]+ " " + "Online");
      }

    });
  }

});
Brendan Kinahan
@BKinahan
Mar 08 2016 09:41
@nicknem hm.. you shouldn't need to add a pos parameter to the function; it's probably not expecting a second argument and by adding it, the references to pos within the function will try to work on that second argument (whether or not it exists) rather than going back to the main scope to look for a pos variable there.
@bhargav4 ch is already set to names[i], why not use that variable?
V Bhargav Chowdary
@bhargav4
Mar 08 2016 09:44
@BKinahan Tried ch but its displaying the last element in all cases
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 09:51
Im at a loss here
sorry i dont know how to take a screen shot
Brendan Kinahan
@BKinahan
Mar 08 2016 09:53
@bhargav4 try a forEach instead, this seems to work:
$(document).ready(function() {
  var names = [];
  names = ["freecodecamp", "storbeck", "terakilobyte", "habathcx", "RobotCaleb", "thomasballinger", "noobs2ninjas", "beohoff", "ogamingsc2", "esl_sc2"];


  names.forEach(function(v){
      $.getJSON('https://api.twitch.tv/kraken/streams/' + v + '?callback=?', function(data) {

      if (data.stream === null) {
        console.log(v+ " " + "Offline");
      } else {
        console.log(v+ " " + "Online");
      }
    });
  });
});
@luckoftheirish9989 better to paste formatted code here than to post a screenshot anyway :) use it like this:
```
your code here
```
V Bhargav Chowdary
@bhargav4
Mar 08 2016 09:55
@BKinahan Thanks that worked
CamperBot
@camperbot
Mar 08 2016 09:55
bhargav4 sends brownie points to @bkinahan :sparkles: :thumbsup: :sparkles:
:star: 1011 | @bkinahan | http://www.freecodecamp.com/bkinahan
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 09:56

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

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

<p class="red-text"><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>

like that?
sorry im new like realllly new
Muhammed Shafi
@shafimpk
Mar 08 2016 09:56
Need help in section Target the Parent of an Element Using jQuery
My error is: Your left-well element should have a red background
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well");
    $("#target5").clone().appendTo("#left-well");
    $("#left-well").css("background-color", "red");
    $("#target1").parent().css("background-color", "blue")

  });
</script>

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

<body>
  <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>
</body>
Brendan Kinahan
@BKinahan
Mar 08 2016 09:57
@luckoftheirish9989 like that, but with the ``` on the lines above and below your code
Enlightened_Ones
@luckoftheirish9989
Mar 08 2016 09:58
  .red-text {font-size: 16px;
    color: red;
  }
</style>

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

<p class="red-text"><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>
Antonin Archer
@nicknem
Mar 08 2016 09:58
@BKinahan I'm having troubles with this haha :
```
Brendan Kinahan
@BKinahan
Mar 08 2016 09:59
@shafimpk left-well is the parent of target1, and your last line changes its background color to blue :)
Antonin Archer
@nicknem
Mar 08 2016 09:59
var pos = {};
// Get user location and store it in the pos variable
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
      pos.lat = Math.round(position.coords.latitude);
      pos.lng = Math.round(position.coords.longitude);
  });
}
console.log(pos.lat); //doesn't work
console.log("yo"); //works
Anyone know how I could access the pos variable ? Sorry I don't know why I'm stuck so bad on this :(
Brendan Kinahan
@BKinahan
Mar 08 2016 10:01
@nicknem the code outside the function is working correctly, so the problem must be with the getCurrentPosition callback
Muhammed Shafi
@shafimpk
Mar 08 2016 10:02
@BKinahan ok
V Bhargav Chowdary
@bhargav4
Mar 08 2016 10:03

@nicknem try this

```
var lat;
var lon;
// Get user location and store it in the pos variable
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
      lat = Math.round(position.coords.latitude);
      lon = Math.round(position.coords.longitude);
  });
}
console.log(lat);
console.log(lon); 
console.log("yo"); //works

```

Achtaou Mustapha
@MustaphaSteph
Mar 08 2016 10:04
hi guys , i m new here :D
Muhammed Shafi
@shafimpk
Mar 08 2016 10:05
Your left-well element should have a red background.
how to solve this section?! I am trapped
Brendan Kinahan
@BKinahan
Mar 08 2016 10:06
@shafimpk :point_up: March 8, 2016 9:59 AM answered already
@MustaphaSteph welcome :)
V Bhargav Chowdary
@bhargav4
Mar 08 2016 10:09
@nicknem Did that work?
can u paste full code here
Ammar Najjar
@ammarnajjar
Mar 08 2016 10:09
@MustaphaSteph welcome
Muhammed Shafi
@shafimpk
Mar 08 2016 10:10
I saw the answer! but its shows still error
shivshanker
@shiva013
Mar 08 2016 10:12
hi
Brendan Kinahan
@BKinahan
Mar 08 2016 10:13
@shafimpk post your updated code
shivshanker
@shiva013
Mar 08 2016 10:13
structure pointer means ?
FredZhang
@hhxjzyr
Mar 08 2016 10:20
<script>
  // Only change code below this line.
  if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
    $("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
  });
}


  // Only change code above this line.
</script>
<div id = "data">
  <h4>You are here:</h4>

</div>
why can't i get my location...as freecodecamp told me OK , i got it it's right and i should wait a minute
Antonin Archer
@nicknem
Mar 08 2016 10:21
@bhargav4 this doesn't work but I found a way.
var baseUrl = "//api.openweathermap.org/data/2.5/weather?lat=";
var API = "02049e4cb7c3619b87ed49d3181dc2e0";
var lat = ""
// Get user location and store it in the pos variable
// If user enables location
if (navigator.geolocation) {
  // Get the user position
  navigator.geolocation.getCurrentPosition(function(position) {
      // Get the complete URL with lat and lng
      var lat = Math.round(position.coords.latitude);
      var lng = Math.round(position.coords.longitude);
      var url = baseUrl + lat + "&lon=" + lng + "&appid=" + API;
      // API call to get the weather
      $.get(url,function( data ) {
        // Append the weather to the .weather div
        $(".weather").html( data.weather[0].main );
      })


    });
This works
But it's ugly. I'll have to refactor later haha
Brendan Kinahan
@BKinahan
Mar 08 2016 10:23
@nicknem so the problems you were having were because the console.log statements were evaluated before the geolocation data returned. Asynchronous functions are tricky.
@nicknem here's some more example code to work with:
function setPos(lat,lng){
  var pos = {};
  pos.lat = lat;
  pos.lng = lng;
  console.log(pos);
};

function success(position){      
  setPos(position.coords.latitude, position.coords.longitude);};


function error(err) {
  console.warn('ERROR(' + err.code + '): ' + err.message);
};

navigator.geolocation.getCurrentPosition(success,error);
Antonin Archer
@nicknem
Mar 08 2016 10:30
Thanks @BKinahan
CamperBot
@camperbot
Mar 08 2016 10:30
nicknem sends brownie points to @bkinahan :sparkles: :thumbsup: :sparkles:
:star: 1014 | @bkinahan | http://www.freecodecamp.com/bkinahan
Rakesh1992
@Rakesh1992
Mar 08 2016 10:45
sir i am not getting your question. and i m unable to solve this ?? kindly help me to solve the problem
"Only add one class with each of your three selectors".??
this is the question sir
Rakesh1992
@Rakesh1992
Mar 08 2016 10:51
This message was deleted
cannelflow
@cannelflow
Mar 08 2016 10:52
This message was deleted
there is three different class 1. animated 2 shake 3 btn-primary
<script>
$(document).ready(function() {
$("button").addClass("animated");

$(".btn").addClass("animated shake btn-primary");<====and you have all three class here

$("#target1").addClass("animated shake btn-primary");<====and you have all three class here
});
</script>
@Rakesh1992
Rakesh1992
@Rakesh1992
Mar 08 2016 10:59
sir where i have to use these classes
cannelflow
@cannelflow
Mar 08 2016 11:01
@Rakesh1992 .addClass(here)
Rakesh1992
@Rakesh1992
Mar 08 2016 11:03
Thanks a lot!! Sir
cannelflow
@cannelflow
Mar 08 2016 11:04
@Rakesh1992 no need of calling sir just tag username while conversation
GowthamReddyAmbati
@GowthamReddyAmbati
Mar 08 2016 11:11
@BKinahan Thank you..!!
CamperBot
@camperbot
Mar 08 2016 11:11
gowthamreddyambati sends brownie points to @bkinahan :sparkles: :thumbsup: :sparkles:
:star: 1015 | @bkinahan | http://www.freecodecamp.com/bkinahan
Askar Nurbekov
@alfazick
Mar 08 2016 11:24
Why we are not studying Python in freecodecamp?
Robert Uivarosi
@URobert
Mar 08 2016 11:29
@alfazick Python will be introduced to the freecodecamp curriculum
Askar Nurbekov
@alfazick
Mar 08 2016 11:30
wow it is great i think anybody will enjoy it
DinnerFingers
@DinnerFingers
Mar 08 2016 11:32
hi guys, im stuck on the Testing Objects for Properties challenge, I just need a clue :D
Ooh I'd like to learn python, might get a pi
Robert Uivarosi
@URobert
Mar 08 2016 11:32
@DinnerFingers show us your code
DinnerFingers
@DinnerFingers
Mar 08 2016 11:35
I don't have any yet, not sure exactly where to start, I feel like there ahould be a (val) in there somewhere. The challenge looks like this:
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

function checkObj(checkProp) {
  // Your Code Here

  return ;
}
has "change me" after return but i took that out because i find it distracting
I'll go back through the last couple of challenges again for ideas :smile:
DinnerFingers
@DinnerFingers
Mar 08 2016 11:48
So now I have this, do I need an if statement for undefined property/object?
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

function checkObj(checkProp) {
  // Your Code Here


  return myObj[checkProp];
}
Niko Salonen
@nikosalonen
Mar 08 2016 11:52
won't hurt :)
DinnerFingers
@DinnerFingers
Mar 08 2016 12:07
@nikosalonen I'm trying to work out how to go about it, I think I need to go further back for a refresher
Ghizlane Zouhare
@Zghizlane
Mar 08 2016 12:09
Hi everyone! need some help with this function ,it seems correct to me but palindrome("1 eye for of 1 eye.") return true any idea please :smile:
function palindrome(str) {
  // Good luck!
  var arr=str.toLowerCase().replace(/[^a-z]+/g,'').split('');
  var arrReverse=str.toLowerCase().replace(/[^a-z]+/g,'').split('').reverse();
  for(var i=0;i<arr.length;i++){
      if(arr[i]!=arrReverse[i])
        return false;
  }
  return true;
}
Niko Salonen
@nikosalonen
Mar 08 2016 12:12
@DinnerFingers you can make catch the undefined simply if(xxx === undefined)
@Zghizlane you are replacing all not-letters with '' (eg. removing them) so the string is palindrome and true eye for of eye
Ghizlane Zouhare
@Zghizlane
Mar 08 2016 12:18
@DinnerFingers so i should include numeric in the regex, thanks :+1:
CamperBot
@camperbot
Mar 08 2016 12:18
zghizlane sends brownie points to @dinnerfingers :sparkles: :thumbsup: :sparkles:
:star: 238 | @dinnerfingers | http://www.freecodecamp.com/dinnerfingers
Niko Salonen
@nikosalonen
Mar 08 2016 12:18
@Zghizlane exactly :)
Mohsen Mahmoud Galal
@devmohsengalal
Mar 08 2016 12:30
This message was deleted
Aleksandar Krstić
@acckrs
Mar 08 2016 13:01
hello. I wrote my first codepen (FCC tribute page). When I share a link to it, the thumbnail preview shows my profile picture, instead of pen's thumbnail. How to change that? http://codepen.io/acckrs/pen/bpEKyK
Tomasz K
@tomqbl
Mar 08 2016 13:02
I can see it just fine
love the quote btw :D
Aleksandar Krstić
@acckrs
Mar 08 2016 13:07
I meant when I paste the link facebook
here the thumbnail is fine, but on facebook it shows my face
muhammed amr
@0muhammed
Mar 08 2016 13:10
````
I Khan
@FrostyGit
Mar 08 2016 13:10
<img src="https://bit.ly/fcc-relaxing-cat">
why is this code not working?
Nigel
@nigeljoy
Mar 08 2016 13:12
@acckrs you can't o anything about that unless facebook allows custom image upload when you share the link
muhammed amr
@0muhammed
Mar 08 2016 13:12
<div class="container-fluid">
<div class="row">
   <h3 class="text-primary text-center >jQuery Playground</h3>
</div>
</div>
<div class="container-fluid">
<div class="row">
   <h3 class="text-primary text-center">jQuery Playground</h3>
</div>
</div>
``
why Add a div element below your h3 element ?
pliz help me
Aleksandar Krstić
@acckrs
Mar 08 2016 13:14
@nigeljoy ok thanks
CamperBot
@camperbot
Mar 08 2016 13:14
acckrs sends brownie points to @nigeljoy :sparkles: :thumbsup: :sparkles:
:star: 351 | @nigeljoy | http://www.freecodecamp.com/nigeljoy
Nigel
@nigeljoy
Mar 08 2016 13:14
@0muhammed whta do you mean?
I Khan
@FrostyGit
Mar 08 2016 13:14
muhammed, how do I show my code like you did?
V Bhargav Chowdary
@bhargav4
Mar 08 2016 13:15

Is this the right way to execute functions one after the other after clicking a button?

$('#offline').click(function() {
   $('.resoff').empty();
    $('.reson').empty();
    getdata();
      $('.reson').empty();
  });
Azrul Zulkifli
@azrulnaut
Mar 08 2016 13:15
@FrostyGit Add about 5 space before each line
Nigel
@nigeljoy
Mar 08 2016 13:16
@bhargav4 yes. is it working?
V Bhargav Chowdary
@bhargav4
Mar 08 2016 13:16
No
Mentor
@bestorw01
Mar 08 2016 13:16
This message was deleted
Shaad
@ShaadG
Mar 08 2016 13:17
<button i class="btn btn-block btn-primary fa fa-thumbs-up">Like</i></button>
V Bhargav Chowdary
@bhargav4
Mar 08 2016 13:17
does separating functions by ; make functions execute one after the other?
Nigel
@nigeljoy
Mar 08 2016 13:18
@bhargav4 insert alert("working") in your function to see if button click executes the function
Ammar Najjar
@ammarnajjar
Mar 08 2016 13:18

@ShaadG ,

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

:wink:

V Bhargav Chowdary
@bhargav4
Mar 08 2016 13:19
@nigeljoy The button works but i need to make the functions run one after the other.
But I guess that's not happening in my code
Shaad
@ShaadG
Mar 08 2016 13:20
@ammarnajjar ahhhh.... Hello World!
Nigel
@nigeljoy
Mar 08 2016 13:20
@bhargav4 it should be executing one by one....that is how most programs executes
Ammar Najjar
@ammarnajjar
Mar 08 2016 13:21
@ShaadG , hello!
I Khan
@FrostyGit
Mar 08 2016 13:22
  <img src="https://bit.ly/fcc-relaxing-cat">
why is this not working?
Ammar Najjar
@ammarnajjar
Mar 08 2016 13:23
@FrostyGit , put your whole code plz
I Khan
@FrostyGit
Mar 08 2016 13:24
ok it's alot
Ammar Najjar
@ammarnajjar
Mar 08 2016 13:24
help format
CamperBot
@camperbot
Mar 08 2016 13:24

: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

Mentor
@bestorw01
Mar 08 2016 13:25
help format
CamperBot
@camperbot
Mar 08 2016 13:25

: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

Mentor
@bestorw01
Mar 08 2016 13:25
markdown help
Ammar Najjar
@ammarnajjar
Mar 08 2016 13:25
@FrostyGit , use codepen maybe?
I Khan
@FrostyGit
Mar 08 2016 13:25
@ammarnajjar I figured it out.
Ammar Najjar
@ammarnajjar
Mar 08 2016 13:26
@FrostyGit good :smile:
Niko Salonen
@nikosalonen
Mar 08 2016 13:31
@bhargav4 you could use $.when() http://api.jquery.com/jQuery.when/
swoertz
@swoertz
Mar 08 2016 13:34
does someone know a free (keyless) screenshot API? i don't want to expose the API_KEY in the front-end and i don't want to proxy it. since i want to use codepen.io only
Niko Salonen
@nikosalonen
Mar 08 2016 13:38
unlikely such exists unless you make your own
swoertz
@swoertz
Mar 08 2016 13:39
@nikosalonen did you answer my question?
Niko Salonen
@nikosalonen
Mar 08 2016 13:40
yeah i don't think anybody would want their service for keyless usage as it could get out of control easily
those images can hog bandwidth like a beast
swoertz
@swoertz
Mar 08 2016 13:43
are there alternatives to setting up your own proxy? is it possible to do front-end only solutions without exposing the key?
Antonin Archer
@nicknem
Mar 08 2016 13:43
Guys I'm trying to code the function that displays a different image regarding the weather in the weather app frontend exercise. Here's what I had in mind for the code, do you think it's the right way to do it?
var url = switch(weather) {
  case "Clouds":
    url = "url to image of clouds";
    break;
  case "Rain":
    url = "url to image of rain";
    break;
  default:
  url = "url to default image";
}
Niko Salonen
@nikosalonen
Mar 08 2016 13:45
@swoertz in codepen, not really
Nopply
@StandB
Mar 08 2016 13:45
@nicknem definitely looks correct, of course there are multiple ways to solve problems, but this should work.
Antonin Archer
@nicknem
Mar 08 2016 13:45
thanks @StandB
CamperBot
@camperbot
Mar 08 2016 13:45
nicknem sends brownie points to @standb :sparkles: :thumbsup: :sparkles:
:star: 298 | @standb | http://www.freecodecamp.com/standb
swoertz
@swoertz
Mar 08 2016 13:46
@nikosalonen kiitos
Niko Salonen
@nikosalonen
Mar 08 2016 13:46
:thumbsup:
MoguBen
@mogu9628
Mar 08 2016 13:50
help im stuck
CamperBot
@camperbot
Mar 08 2016 13:50
no wiki entry for: im stuck
MoguBen
@mogu9628
Mar 08 2016 13:50
<script>
$(document).ready(function() {
$("button").addClass ("animatd");
$(".btn").addClass ("shake");
$("#target1").addClass ("btn-primary")
});
</script>
im stuck with this
add one class to each three selectors
Antonin Archer
@nicknem
Mar 08 2016 13:52
@mogu9628 use markdown to write your answers to make it more readable, type : ``` before and after your block of code
Martins Bormanis
@martinsb6
Mar 08 2016 13:53
@mogu9628 isnt there a spelling error "animatd"?
Antonin Archer
@nicknem
Mar 08 2016 13:53
@mogu9628 and there is a spelling error
MoguBen
@mogu9628
Mar 08 2016 13:53
i corrected that
still stuck, i think is a bug
Antonin Archer
@nicknem
Mar 08 2016 13:53
We'd need to see your HTML too.
MoguBen
@mogu9628
Mar 08 2016 13:53
how can i do that
Ammar Najjar
@ammarnajjar
Mar 08 2016 13:53
help format
CamperBot
@camperbot
Mar 08 2016 13:53

: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

Antonin Archer
@nicknem
Mar 08 2016 13:54
oh nice
I didn
Where can I find all the shorcuts?
MoguBen
@mogu9628
Mar 08 2016 13:55

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

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

Ammar Najjar
@ammarnajjar
Mar 08 2016 13:55
@mogu9628 try this, or else show us your complete code :wink:
<script>
$(document).ready(function() {
    $("button").addClass ("animated shake");
    $("#target1").addClass ("btn btn-primary");
});
</script>
MoguBen
@mogu9628
Mar 08 2016 13:55
Use the $("button") selector.
Use the $(".btn") selector.
Use the $("#target1") selector.
Only add one class with each of your three selectors.
Your #target1 element should have the classes animated‚ shake and btn-primary.
Only use jQuery to add these classes to the element.
the fourth line did not pass
the only manipulated part is the script element
V Bhargav Chowdary
@bhargav4
Mar 08 2016 13:58
This message was deleted
Ammar Najjar
@ammarnajjar
Mar 08 2016 13:58
@mogu9628 ; this is what you should have done:
<script>
  $(document).ready(function() {
    $("button").addClass("animated");
    $(".btn").addClass("shake");
    $("#target1").addClass("btn-primary");
  });
</script>
MoguBen
@mogu9628
Mar 08 2016 13:58
omg
V Bhargav Chowdary
@bhargav4
Mar 08 2016 13:58

page width exceeding window size though I used bootstrap correctly

http://codepen.io/bhargav14/pen/MyKxyN
MoguBen
@mogu9628
Mar 08 2016 13:59
thanks so much
is the space!
@ammarnajjar thanks so much!!!!!
CamperBot
@camperbot
Mar 08 2016 13:59
mogu9628 sends brownie points to @ammarnajjar :sparkles: :thumbsup: :sparkles:
Ammar Najjar
@ammarnajjar
Mar 08 2016 13:59
@mogu9628 maybe it is just that last ;
CamperBot
@camperbot
Mar 08 2016 13:59
:star: 141 | @ammarnajjar | http://www.freecodecamp.com/ammarnajjar
codercooooder
@codercooooder
Mar 08 2016 13:59
who wants to help me with my css fixed navbar
Ammar Najjar
@ammarnajjar
Mar 08 2016 13:59
@mogu9628 welcome
codercooooder
@codercooooder
Mar 08 2016 13:59
i have a code pen
V Bhargav Chowdary
@bhargav4
Mar 08 2016 13:59
@codercooooder paste herre
my issue is only a problem when i try to resize
for media responsiveness
V Bhargav Chowdary
@bhargav4
Mar 08 2016 14:02
@codercooooder in codepen you can directly start with body without typing<body> tag
codercooooder
@codercooooder
Mar 08 2016 14:02
i want to be able to change the margin for content and have it not overflow...if i just want one margin, things are fine.. it works, it won't overflow if my content always starts at the same place. but i want the margin to change on each resize.. i can do a hack and get the padding to change, but i don't want that
V Bhargav Chowdary
@bhargav4
Mar 08 2016 14:02
ihatecoding is a funny name though
why not use bootstrap?
codercooooder
@codercooooder
Mar 08 2016 14:03
because i am almost there
and i need some specific things that i cut out
i was worried it would be tricky to get bootstrap to customize in my weird way
im almost done, my navbar is done
now i'm just fixing it
(to the top)
and it works when it is fixed..i just need to make the margins change for the content at different media sizes.
sorry, see this version: http://codepen.io/ihatecoding/pen/ONMKdM
V Bhargav Chowdary
@bhargav4
Mar 08 2016 14:07
@codercooooder im not understanding your requirements
codercooooder
@codercooooder
Mar 08 2016 14:11
yeah, im not being clear. so you see there is content below the navbar?
V Bhargav Chowdary
@bhargav4
Mar 08 2016 14:11
yes
codercooooder
@codercooooder
Mar 08 2016 14:11
they way i have it in the updated version, it does not overlap with the navbar, everything looks fine
hold on, let me take out the padding and you will see the problem more clearly @bhargav4
Dwight Norris
@legend911
Mar 08 2016 14:17
has anybody ever had problems in cloud9 doing (npm install <whatever>). I am getting ECONNREFUSED on registration.
codercooooder
@codercooooder
Mar 08 2016 14:17
@bhargav4 go back and look again
omg it is working
@bhargav4 im sorry
jithin das
@codeassassin77
Mar 08 2016 14:20

help i need to Create a class called smaller-image and use it to resize the image so that it's only 100 pixels wide. but it aint working <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

CamperBot
@camperbot
Mar 08 2016 14:20
no wiki entry for: i need to create a class called smaller-image and use it to resize the image so that its only 100 pixels wide but it aint working link hrefhttpfontsgoogleapiscomcssfamilylobster relstylesheet typetextcssstyle red-text color red h2 font-family lobster monospace p font-size 16px font-family monospace smaller-image width 100px styleh2 classred-textcatphotoapph2img srchttpsbitlyfcc-relaxing-cat stylesmaller-imagep classred-textkitty ipsum dolor sit amet shed everywhere shed everywhere stretching attack your ankles chase the red dot hairball run catnip eat the grass sniffpp classred-textpurr jump eat the grass rip the couch scratched sunbathe shed everywhere rip the couch sleep in the sink fluffy fur catnip scratchedp
codercooooder
@codercooooder
Mar 08 2016 14:20
@bhargav4 let me see if i can get this to work in my expanded version
Ammar Najjar
@ammarnajjar
Mar 08 2016 14:21
@codeassassin77
help format
CamperBot
@camperbot
Mar 08 2016 14:21

: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

Ammar Najjar
@ammarnajjar
Mar 08 2016 14:22
@codeassassin77 ^
Cole Maschino
@ColeMaschino
Mar 08 2016 14:22
help
CamperBot
@camperbot
Mar 08 2016 14:22

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

Basic Commands:

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

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

Cole Maschino
@ColeMaschino
Mar 08 2016 14:22
nevermind
Manish Giri
@Manish-Giri
Mar 08 2016 14:22

@codeassassin77 this is wrong

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

you need

<img src="https://bit.ly/fcc-relaxing-cat" class="smaller-image">
you've got the class setup correctly in your CSS, just need to apply it the right way to your img element, you do that with the class keyword, see my code above
V Bhargav Chowdary
@bhargav4
Mar 08 2016 14:25
Could someone look into this?
page width more than window width
I used bootstrap correctly
http://codepen.io/bhargav14/pen/MyKxyN
shashank2511
@shashank2511
Mar 08 2016 14:27
hi i have problem that i can't get past!
"Do not add a class attribute to the second p element, without removing it from the first one."
This problem isn't being solved aparently
Ammar Najjar
@ammarnajjar
Mar 08 2016 14:28
@shashank2511 , which challenge? what's your code?
bug08
@bug08
Mar 08 2016 14:28
@shashank2511 show ur problem
shashank2511
@shashank2511
Mar 08 2016 14:29
Change the Font Size of an Element
this is the challenge..
bug08
@bug08
Mar 08 2016 14:29
ok, wait
Antonin Archer
@nicknem
Mar 08 2016 14:30
YAY! Actually to switch between images for the weather there's a database full of icons that goes with the API. Since the doc sucks a bit it took me some time to figure that out. But you can do that:
// Retrieve the icon code and form the icon url
      var imgUrl = "http://openweathermap.org/img/w/" + data.weather[0].icon + ".png";
      // Insert the icon in the html
      $("#icon").html("<img id='theIcon' src='" + imgUrl + "' />");
Which is much better!
shashank2511
@shashank2511
Mar 08 2016 14:30

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

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

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

Antonin Archer
@nicknem
Mar 08 2016 14:30
Than writing a case for every kind of weather lol
help formatting
CamperBot
@camperbot
Mar 08 2016 14:30

: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

bug08
@bug08
Mar 08 2016 14:30

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

<a href="#"><img class="smaller-image thick-green-border" 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"></form>

o sorry, wrong code
shashank2511
@shashank2511
Mar 08 2016 14:32
yah, not this..
Ammar Najjar
@ammarnajjar
Mar 08 2016 14:32
my eyes!! :eyes:
@bug08 please format your code
Nick Coleman
@nickcoleman
Mar 08 2016 14:32
@bhargav4 Why not put your <div class="row"> in a container. That will contain it inside the screen.
shashank2511
@shashank2511
Mar 08 2016 14:33
someone.... please.
bug08
@bug08
Mar 08 2016 14:34
just write <p class="red-text">
V Bhargav Chowdary
@bhargav4
Mar 08 2016 14:34
@nickcoleman that worked thanks
bug08
@bug08
Mar 08 2016 14:34
in the required tag
CamperBot
@camperbot
Mar 08 2016 14:34
bhargav4 sends brownie points to @nickcoleman :sparkles: :thumbsup: :sparkles:
:star: 278 | @nickcoleman | http://www.freecodecamp.com/nickcoleman
Nick Coleman
@nickcoleman
Mar 08 2016 14:35
@bhargav4 cool ... glad it was that easy
shashank2511
@shashank2511
Mar 08 2016 14:35
@bug08 the issue is with the font size.
bug08
@bug08
Mar 08 2016 14:37
@shashank2511 canu repeat the exact error ?
shashank2511
@shashank2511
Mar 08 2016 14:37
chuck it, solved it.
thanks anyways.
Maryna Sokolova
@ultramarichka
Mar 08 2016 14:37
Hi guys! I do portfolio page now
And I have a problem - my page doesn't fit screen if I make it smaller
http://codepen.io/ultramarichka/pen/JXYpjP?editors=1100
Should I write css especialy for every kind of screen size?.. or there are easier way..?
bug08
@bug08
Mar 08 2016 14:38
k @shashank2511
Manish Giri
@Manish-Giri
Mar 08 2016 14:41
@ultramarichka you can use bootstrap's grids of the available sizes - xs, sm, md, large
V Bhargav Chowdary
@bhargav4
Mar 08 2016 14:41
@ultramarichka had same issue earlier
just add <div class="container"> above <div class="row> and at end close </div>
Antonin Archer
@nicknem
Mar 08 2016 14:44
Guys I want to code a button that when clicked switches between the temperature in celsius and the temperature in Fahreneit but this makes my button disappear do you know why?
// Get the Celsius and Imperial temperatures
      var temperature = data.main.temp;
      var celsiusTemp = Math.round(temperature - 273.15);
      var imperialTemp = Math.round(temperature * 9/5 - 459.67);
      // Write the place and the country
      $("#name").html( "<p>" + data.name + ", " + data.sys.country + "</p>" );
      // Toggle between celsius and fahreneit
      $('.btn').toggle(function(){
         $("#temperature").html("<p>" + imperialTemp + " °" + "</p>");
        }, 
       function(){
         $("#temperature").html("<p>" + celsiusTemp + " °" + "</p>");
       }
      );
It just makes my button fade away lol
Cole Maschino
@ColeMaschino
Mar 08 2016 14:45
Please help; what am i doing wrong?
Manish Giri
@Manish-Giri
Mar 08 2016 14:53
@ColeMaschino did you delete some code accidentally?
Sumit Basra
@sumitbasra
Mar 08 2016 14:57
.red-text {
color: red;
}
@ColeMaschino
ayyan055
@ayyan055
Mar 08 2016 15:00

<style>
.red-text{
color: red; font-size : 16px;
}
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>

@ColeMaschino
Sumit Basra
@sumitbasra
Mar 08 2016 15:01
@ayyan055 font-size : 16px in .red-text and p?
jetchirag
@jetchirag
Mar 08 2016 15:02
Sumit Basra
@sumitbasra
Mar 08 2016 15:03
I am thinking we just need font-size just once. Please comment.
ayyan055
@ayyan055
Mar 08 2016 15:04
@sumitbasra i too have the same doubt. but i got a green.
Sumit Basra
@sumitbasra
Mar 08 2016 15:06
yeah you would get a green. my coworker who is a pro said less line's of code and more and more comments make a clean code.
I will try this as well and see where it makes sense to use font twice.
I see, if you using .red-text with font, anywhere you use this class it will be of that font.
which you may not want to do for heading like for h2
here -
<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>
Antonin Archer
@nicknem
Mar 08 2016 15:09
help formatting
CamperBot
@camperbot
Mar 08 2016 15:09

: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

Kyle
@tkdkyle
Mar 08 2016 15:10
this what I do

ridinmn
@ridinmn
Mar 08 2016 15:12
hey guys, Turn an Image into a Link , i can't handle the first goal, "Nest the existing img element within an a element.

<p>Click here for <a href="#"><img src="http://bit.ly/fcc-running-cats">cat photos</a></p>

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

Sumit Basra
@sumitbasra
Mar 08 2016 15:12
<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>
ayyan055
@ayyan055
Mar 08 2016 15:13
@sumitbasra thanks. only in p { font-size :16px; }. Now it worked.
CamperBot
@camperbot
Mar 08 2016 15:13
ayyan055 sends brownie points to @sumitbasra :sparkles: :thumbsup: :sparkles:
:star: 36 | @sumitbasra | http://www.freecodecamp.com/sumitbasra
Kyle
@tkdkyle
Mar 08 2016 15:13
i do ``` then js then shift enter paste code and then CTRL +/ and enter
 <div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
V Bhargav Chowdary
@bhargav4
Mar 08 2016 15:13
The text gets underlined when hovered. How do I prevent this?
<a href = '#'>
<div class = 'res'>
<h3>text</h3>
</div>
</a>
Kyle
@tkdkyle
Mar 08 2016 15:14
hmmm
Tej Pratap
@tejscript
Mar 08 2016 15:14
<p>Click here for <a href="#"> <img src="http://bit.ly/fcc-running-cats">cat photos</a></p> How to Nest the existing img element within an a element ? could anyone pls help me with this
Kyle
@tkdkyle
Mar 08 2016 15:14
q
Sumit Basra
@sumitbasra
Mar 08 2016 15:15
This message was deleted
Kyle
@tkdkyle
Mar 08 2016 15:15
italics hello
ridinmn
@ridinmn
Mar 08 2016 15:16
same as @tejscript ...
Sumit Basra
@sumitbasra
Mar 08 2016 15:16
@ayyan055 you welcome.
Maryna Sokolova
@ultramarichka
Mar 08 2016 15:18
@bhargav4 @Manish-Giri
Thanks!
CamperBot
@camperbot
Mar 08 2016 15:18
ultramarichka sends brownie points to @bhargav4 and @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 730 | @manish-giri | http://www.freecodecamp.com/manish-giri
:star: 301 | @bhargav4 | http://www.freecodecamp.com/bhargav4
ridinmn
@ridinmn
Mar 08 2016 15:25
<p>Click here for <a href="#"> <img src="http://bit.ly/fcc-running-cats">cat photos</a></p> How to Nest the existing img element within an a element ? could anyone pls help me with this
Alexander Køpke
@alexanderkopke
Mar 08 2016 15:26
@ridinmn nest just means you put the img inside the a element
Matija
@Kozmo97
Mar 08 2016 15:27

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

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

</a> i got it like that.

Alexander Køpke
@alexanderkopke
Mar 08 2016 15:27
@ridinmn <a href="#"><img etc></a>
ridinmn
@ridinmn
Mar 08 2016 15:28
thanks, got it !
João Fernandes
@joaofnds
Mar 08 2016 15:36
http://www.freecodecamp.com/challenges/no-repeats-please
What formula they wan't me to use??? I've tried all the formulas I learned at school to solve this kind of problem, but none of them gives me the result that FreeCode Camp want!
Kwabena Owusu Aduomi
@nanascoaduomi
Mar 08 2016 16:17
$(document).ready(function() {
$("button").addClass("Animated");
$(".btn").addClass("shake");
$("#target1").addClass("btn-primary");
});
can u help me out dont know whats wrong with this jquery
Manish Giri
@Manish-Giri
Mar 08 2016 16:21
@nanascoaduomi animated doesn't have capital A on line 2, try and change this and see if it works
Kwabena Owusu Aduomi
@nanascoaduomi
Mar 08 2016 16:23
@Manish-Giri thanks a lot
CamperBot
@camperbot
Mar 08 2016 16:23
nanascoaduomi sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 731 | @manish-giri | http://www.freecodecamp.com/manish-giri
Dmytro Pechunka
@simon1400
Mar 08 2016 16:27
Hello! Can you help ??
Now make the game Simon says.
[CodePen] (http://codepen.io/simon1400/pen/BKoXvQ?editors=0110)
The problem is that repetition flashing buttons only 2, and need at least 20.
I do not understand what the problem is.
Phyllis Bennett
@lynnbennett
Mar 08 2016 16:33
hi I am placing in a background and in my style sheet i added div class and style class
Green Leaf
@YoungGrasshopper
Mar 08 2016 16:35
'''
CamperBot
@camperbot
Mar 08 2016 16:35
:bulb: to format code use backticks! ``` more info
Meghana
@meghanasarikonda
Mar 08 2016 16:35

```<function queue(arr, item) {
// Your code here

return arr [0]; // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

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

```

Green Leaf
@YoungGrasshopper
Mar 08 2016 16:36
'''
CamperBot
@camperbot
Mar 08 2016 16:36
:bulb: to format code use backticks! ``` more info
Meghana
@meghanasarikonda
Mar 08 2016 16:37
Please help with this challange
Manish Giri
@Manish-Giri
Mar 08 2016 16:37
@meghanasarikonda is that the stand in line checkpoint?
Meghana
@meghanasarikonda
Mar 08 2016 16:38
@Manish-Giri yes
Manish Giri
@Manish-Giri
Mar 08 2016 16:38
@meghanasarikonda from the instructions, were you able to understand what needs to be done?
Meghana
@meghanasarikonda
Mar 08 2016 16:44
@Manish-Giri last one i dont understand
After queue(testArr, 10), myArr[4] should be 10
What it means???
Manish Giri
@Manish-Giri
Mar 08 2016 16:47
@meghanasarikonda it means, when you complete the function queue(testArr,10), then the element at position 4 of myArr should be 10. You should be thinking in terms of arr and item in the function queue. That's sufficient to complete the challenge
Tindo N. Arsel
@tnga
Mar 08 2016 17:07
@joaofnds can you provide your code? I also expect that there is an error with that challenges. Normally the formula to resolve the given test is n!/n1!*n2!*...nr! where n is the total anagram character's and n1...nr are repetitions time of each indistinguable character.
Eric Murta
@murtinha
Mar 08 2016 17:14
can someone help me? I'm having a big trouble with image sizes and trying to position fix them. Here's my code
http://codepen.io/murtinha/pen/vGLdBO
faraz
@silentarrowz
Mar 08 2016 17:14
could you tell me what's wrong with this code?? I am getting a type error saying -- cannot give property 1 of undefined.
here's the code
function drawer(price, cash, cid) {
 var change=(cash-price)*100;
 var cidArr=arguments[2];
  console.log("cidArr is:",cidArr);
 var changeLeft;
  var cidTotal=0;
 //=======================
 // check drawer cash
  for(var j=0;j<cidArr.length-1;j++){
    cidTotal=cidTotal+(cidArr[i][1])*100;
  }
  console.log("cidTotal is:",cidTotal);
  if(change>cidTotal){
    return  "Insufficient Funds";
  }else if(change===cidTotal){
    return "Closed";
  }
 //console.log("cidArr.length-1 is:",cidArr.length-1);
//=========================
//loop through all coins and return change

  for (var i=cidArr.length-1;i>0;i--){

    var coinName=cidArr[i][0];
    console.log("coinName is:",coinName);
    var coinTotal=cidArr[i][1];
    var coinVal=coinValue(coinName);
    var coinNumber=(coinTotal*100)/coinVal;
    if (coinVal>change){
      console.log("cant use : ",coinName);
    }else if(coinVal<=change){
      div=Math.floor(change/coinVal);
      coinLeft=(coinTotal-div*coinVal)/100;
      cidArr[i][1]=coinLeft;
      changeLeft=change-div*coinVal;
    }
  }

}

function coinValue(coinName){
  switch(coinName){
    case "PENNY":
      return 1;
    case "NICKEL":
      return 5;
    case "DIME":
      return 10;
    case "ONE":
      return 100;
    case "FIVE":
      return 500;
    case "TEN":
      return 1000;
    case "TWENTY":
      return 2000;
    case "ONE HUNDRED":
      return 10000;
  }
}
// Example cash-in-drawer array:
// [["PENNY", 1.01],
// ["NICKEL", 2.05],
// ["DIME", 3.10],
// ["QUARTER", 4.25],
// ["ONE", 90.00],
// ["FIVE", 55.00],
// ["TEN", 20.00],
// ["TWENTY", 60.00],
// ["ONE HUNDRED", 100.00]]

drawer(19.50, 20.00, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.10], ["QUARTER", 4.25], ["ONE", 90.00], ["FIVE", 55.00], ["TEN", 20.00], ["TWENTY", 60.00], ["ONE HUNDRED", 100.00]]);
@Manish-Giri could you help??
Tindo N. Arsel
@tnga
Mar 08 2016 17:15
@joaofnds but to have the result permAlone(aaa) return 0 or permAlone(aab) return 2it will better to do (n!/n1!*n2!*...nr!) - 1) but don't work with permAlone(aabb) return 8 cause give permAlone(aabb) return 5 which is expected to be the good result! Maybe an issue with the challenge ?
Meghana
@meghanasarikonda
Mar 08 2016 17:16

@Manish-Giri ```<function queue(arr, item) {
// Your code here
if (arr.length<1){
return 1;
}
else {
return arr[0] ; }// Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

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

V Bhargav Chowdary
@bhargav4
Mar 08 2016 17:16

In Javascript is there any method to delete a particular element from an array and return that array?

Meghana
@meghanasarikonda
Mar 08 2016 17:16
Please look into this code
Tyler Moeller
@TylerMoeller
Mar 08 2016 17:17
@bhargav4 Yes. Check out all the things you can do with arrays in javascript here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
V Bhargav Chowdary
@bhargav4
Mar 08 2016 17:18
@TylerMoeller Thanks that was helpful
CamperBot
@camperbot
Mar 08 2016 17:18
bhargav4 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star: 424 | @tylermoeller | http://www.freecodecamp.com/tylermoeller
V Bhargav Chowdary
@bhargav4
Mar 08 2016 17:19
@meghanasarikonda What is the name of the exercise?
Tyler Moeller
@TylerMoeller
Mar 08 2016 17:19
@bhargav4 You may be interested in splice() and slice() specifically, but there are other options
V Bhargav Chowdary
@bhargav4
Mar 08 2016 17:20
@TylerMoeller Ok. I'll do with splice and slice for now
Meghana
@meghanasarikonda
Mar 08 2016 17:21
Stand in line@bhargav4
@bhargav4
Manish Giri
@Manish-Giri
Mar 08 2016 17:22
@meghanasarikonda I saw your code. I'm not sure what you were trying to do there.
Here's the only two lines that you need -
arr.push(item);
return arr.shift();
V Bhargav Chowdary
@bhargav4
Mar 08 2016 17:23
@meghanasarikonda The above code from manish will work
Manish Giri
@Manish-Giri
Mar 08 2016 17:23
@silentarrowz at which line did you get the error
@meghanasarikonda just to walk you through the logic-
  1. the first line adds a variable called item to the end of the given array arr - which is your first task
  2. the second line removes the element at the front of the array arr and returns it - which is your second task
faraz
@silentarrowz
Mar 08 2016 17:24
@Manish-Giri line number is not mentioned. I am getting the error in the black box below Run test in fcc
Manish Giri
@Manish-Giri
Mar 08 2016 17:26
@silentarrowz looking at the error, I suggest you look at cidArr, especially what it actually is, and what you were expecting it to be
faraz
@silentarrowz
Mar 08 2016 17:27
cidArr is an array and that's what I was expecting it to be @Manish-Giri
Rikerfi
@rikerfi
Mar 08 2016 17:27
@silentarrowz Could you check your array index? You use i instead of j... at "check drawer cash"
Manish Giri
@Manish-Giri
Mar 08 2016 17:27
@silentarrowz is it a nested array?
Jean Gardy
@jeangardy509
Mar 08 2016 17:28
@jeangardy509
I have question. I was wondering in the build a tribute page and the build a personal portfolio page. Do I have to do it exactly as the rule using divisions in quincy example. or can I do it using DOCTYPE HTML, style, body, h1, etc.?
Thanks in advance
CamperBot
@camperbot
Mar 08 2016 17:28
sorry jeangardy509, you can't send brownie points to yourself! :sparkles: :sparkles:
faraz
@silentarrowz
Mar 08 2016 17:28
@rikerfi @Manish-Giri yeah, I think that was it . put j instead of i and the error is gone. thanks
CamperBot
@camperbot
Mar 08 2016 17:28
silentarrowz sends brownie points to @rikerfi and @manish-giri :sparkles: :thumbsup: :sparkles:
thewildsea
@thewildsea
Mar 08 2016 17:28

Hi all, Is it possible to assign the col-md-* class to a style instead of each individual element? (the below code doesnt work for me)

<style>
.example{
col-md-4;
}
</style>

CamperBot
@camperbot
Mar 08 2016 17:28
:star: 732 | @manish-giri | http://www.freecodecamp.com/manish-giri
:star: 86 | @rikerfi | http://www.freecodecamp.com/rikerfi
Meghana
@meghanasarikonda
Mar 08 2016 17:28
@Manish-Giri actually I think I didn't understand the question, can you please explain me
Jean Gardy
@jeangardy509
Mar 08 2016 17:30
I have question. I was wondering in the build a tribute page and the build a personal portfolio page. Do I have to do it exactly as the rule using divisions in quincy example. or can I do it using DOCTYPE HTML, style, body, h1, etc.?
Thanks in advance
Manish Giri
@Manish-Giri
Mar 08 2016 17:31
@meghanasarikonda okay, I'll explain it over a private chat instead
@meghanasarikonda sent you a message, let me know when you get it.
Jorge
@Cr4ck3rs
Mar 08 2016 17:34
Hi @thewildsea , not with bootstrap, I know of another grid system that allows you to do something like that: http://susy.oddbird.net/
thewildsea
@thewildsea
Mar 08 2016 17:38
thanks @Cr4ck3rs appreciate the help
CamperBot
@camperbot
Mar 08 2016 17:38
thewildsea sends brownie points to @cr4ck3rs :sparkles: :thumbsup: :sparkles:
:star: 133 | @cr4ck3rs | http://www.freecodecamp.com/cr4ck3rs
Tim
@luxis
Mar 08 2016 17:46
This message was deleted
This message was deleted
This message was deleted
This message was deleted
explain format
CamperBot
@camperbot
Mar 08 2016 17:47

: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

Tim
@luxis
Mar 08 2016 17:48
This message was deleted
This is going great.
Tyler Moeller
@TylerMoeller
Mar 08 2016 17:48
copy/paste this: ```js
Tim
@luxis
Mar 08 2016 17:48
  for (product; product < arr.length; product++) {
    for (var j=0; j < arr[product].length; j++) {
    }
  }
Tyler Moeller
@TylerMoeller
Mar 08 2016 17:48
:thumbsup:
Tim
@luxis
Mar 08 2016 17:48
I’m looking for some help at the nesting for loops
Tyler Moeller
@TylerMoeller
Mar 08 2016 17:50
@luxis Typically, they look like this:
for (var i = 0; i < var1.length; i++) {
  for (var j = 0; j < var2.length; j++) {
    // do something
  }
}
Tim
@luxis
Mar 08 2016 17:52
@TylerMoeller that still doesn’t cut it well at least in the challenge
This message was deleted
Tyler Moeller
@TylerMoeller
Mar 08 2016 17:53
@luxis It's just a template - which challenge are you working on?
Tim
@luxis
Mar 08 2016 17:53
Nesting for loops
@TylerMoeller It’s just getting annoying now, been trying for an hour to figure it out
Tyler Moeller
@TylerMoeller
Mar 08 2016 17:54
Let me take a quick look - brb
Tim
@luxis
Mar 08 2016 17:54
cheers
function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  for (product=0; product < arr.length; product++) {
    for (var j=0; j < arr[product].length; j++) {
    }
  }
  // Only change code above this line
  return product;
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
Tyler Moeller
@TylerMoeller
Mar 08 2016 17:55
@luxis In the example, they provide, are you able to see what console.log outputs?
var arr = [ [1, 2], [3, 4], [5, 6],];
for (var i = 0; i < arr.length; i++) {
  for (var j = 0; j < arr[i].length; j++) {
    console.log(arr[i][j]);
  }
Tim
@luxis
Mar 08 2016 17:57
my console returns 3
and it should return 6
Tyler Moeller
@TylerMoeller
Mar 08 2016 17:57
It should output:
1
2
3
4
5
6
The two for loops loop through each element of the individual arrays
Jonathan Mitchell
@Vanhealen
Mar 08 2016 17:57
Build a tribute page is a bonfire or a zipline?
Tim
@luxis
Mar 08 2016 17:57
hmm I wonder what I am doing wrong
should I create a new var in the loop?
Tyler Moeller
@TylerMoeller
Mar 08 2016 17:58
How are you getting console output?
Tim
@luxis
Mar 08 2016 17:58
or use the product
Tyler Moeller
@TylerMoeller
Mar 08 2016 17:58
Try to get the right console output with their example first - it will help for future debugging
This example:
var arr = [ [1, 2], [3, 4], [5, 6],];
for (var i = 0; i < arr.length; i++) {
  for (var j = 0; j < arr[i].length; j++) {
    console.log(arr[i][j]);
  }
I'm on Windows and I use the command prompt with node.js. To run that code, I copy/paste it into a text file, name it something like test.js and then from the command line I do node test.js to see the output.
Tim
@luxis
Mar 08 2016 18:03
I tested it on my mac on chrome with console.
I still can’t get it to work
function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  for (product=0; product < arr.length; product++) {
    for (var j=0; j < arr[product].length; j++) {
       console.log(arr[product][j]);
    }
  }
  // Only change code above this line
  return product;
}

// Modify values below to test your code
multiplyAll([[1],[2],[3]]);
that should return 6
not only 3
@TylerMoeller
Tyler Moeller
@TylerMoeller
Mar 08 2016 18:05

I get:

1
2
3

when I run that code

Tim
@luxis
Mar 08 2016 18:06
me too
but it should return 6
Tyler Moeller
@TylerMoeller
Mar 08 2016 18:07
@luxis When you run this code, what do you see?
var arr = [
  [1, 2], [3, 4], [5, 6],
];
for (var i = 0; i < arr.length; i++) {
  for (var j = 0; j < arr[i].length; j++) {
    console.log(arr[i][j]);
  }
}
Tim
@luxis
Mar 08 2016 18:08
I’m seeing 6
Tyler Moeller
@TylerMoeller
Mar 08 2016 18:08
@luxis Good. Console is working :)
Tim
@luxis
Mar 08 2016 18:08
but you also listed 6.
you should list 3 and get 6
Tyler Moeller
@TylerMoeller
Mar 08 2016 18:08
The function called to your code is multiplyAll([[1],[2],[3]]);, so it is correct, returning: 1, 2, 3
We're just console.logging the values of the array at this point
Now all you have to do is instead of console.log() you multiply product by arr[product][j] -- or using their example, arr[i][j]
function multiplyAll(arr) {

  // Only change code below this line
  for (var i=0; i < arr.length; i++) {
  for (var j=0; j < arr[i].length; j++) {
    product *= (arr[i][j]);
  }
}
  // Only change code above this line
  return product;
}

// Modify values below to test your code
multiplyAll([[1],[2],[3]]);
Tim
@luxis
Mar 08 2016 18:12
that works
however, i still don’t get the logic as of yet. which sucks
Tyler Moeller
@TylerMoeller
Mar 08 2016 18:12
Replace product *= (arr[i][j]); with console.log(arr[i][j]) and you'll see it iterating through the array
Tim
@luxis
Mar 08 2016 18:13
but I guess the part that I am missing is product *= (arr[i][j]);
Tyler Moeller
@TylerMoeller
Mar 08 2016 18:13
All product *= arr[i][j] does is:
product = product * arr[i][j]
It does that once for every element in the array
Tej Pratap
@tejscript
Mar 08 2016 18:15
<p>Click here for <a href="#"><img src="http://bit.ly/fcc-running-cats">cat photos</a></p>
why this is not working.couldanyone pls help me
Michael Mason
@boone2016
Mar 08 2016 18:16
@tejscript <p><a href="#">.............
Tej Pratap
@tejscript
Mar 08 2016 18:17
i have tried that but it's not working
Tyler Moeller
@TylerMoeller
Mar 08 2016 18:17

@luxis This may help clarify what's going on:

function multiplyAll(arr) {
  var product = 1;

  // Only change code below this line
  for (var i = 0; i < arr.length; i++) {
    for (var j = 0; j < arr[i].length; j++) {
      console.log('product =  product * arr[i][j]', ' === ', product, ' * ', arr[i][j], ' = ', product *= (arr[i][j]));
    }
  }

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

// Modify values below to test your code
multiplyAll([[1], [2], [3]]);

output:

product =  product * arr[i][j]  ===  1  *  1  =  1
product =  product * arr[i][j]  ===  1  *  2  =  2
product =  product * arr[i][j]  ===  2  *  3  =  6
Michael Mason
@boone2016
Mar 08 2016 18:17
@tejscript actually refresh my memory what are you trying to achieve
<p><a href="#"><img src"....">Click here for cat photos</a></p>
try that
<img src="..."> sorry I messed that up ha
CAN anyone help with profile lookup
Tej Pratap
@tejscript
Mar 08 2016 18:20
@boone2016 actually i am stucked at challenge 29.
the code is <p><a href="#"><img src="http://bit.ly/fcc-running-cats">cat photos</a></p>
and it's saying "Nest the existing img element within an a element."
cannelflow
@cannelflow
Mar 08 2016 18:21
klklkl.PNG
@tejscript
Tej Pratap
@tejscript
Mar 08 2016 18:21
I have tried in every possible way but its not
working
cannelflow
@cannelflow
Mar 08 2016 18:21
@tejscript which exercise?
Tej Pratap
@tejscript
Mar 08 2016 18:22
@cannelflow 29
cannelflow
@cannelflow
Mar 08 2016 18:22
:point_up: March 8, 2016 11:51 PM @tejscript
Michael Mason
@boone2016
Mar 08 2016 18:23
@tejscript is it NESTING A PARAGRAPH??
Tej Pratap
@tejscript
Mar 08 2016 18:24
@boone2016 no its nesting an element "img" within an element "a"
cannelflow
@cannelflow
Mar 08 2016 18:25
@tejscript can you pls name which exercise it is ?
Michael Mason
@boone2016
Mar 08 2016 18:26
@tejscript you on the right track there is just one thing you forgot in your img tag
Tej Pratap
@tejscript
Mar 08 2016 18:26
@boone2016 what
@cannelflow starting of html...challenge 29
Michael Mason
@boone2016
Mar 08 2016 18:28
@tejscript you have the src which is one part of the img tag. you the missing the styling aka the????
Alban MARIETTE
@AlbanMariette
Mar 08 2016 18:28
hello tejscript do you want some help ?
cannelflow
@cannelflow
Mar 08 2016 18:28
@tejscript its difficult to count can you tell me name
:point_up: March 8, 2016 11:51 PM @tejscript
Alban MARIETTE
@AlbanMariette
Mar 08 2016 18:28
forget the <p></p> and put this <a href="#"><img src="http://bit.ly/fcc-running-cats">cat photos</a>
Michael Mason
@boone2016
Mar 08 2016 18:29
you code if correct you just missing one thing
Tej Pratap
@tejscript
Mar 08 2016 18:30
@noilir worked that way too.but nothing
Alban MARIETTE
@AlbanMariette
Mar 08 2016 18:30
@boone2016 what is tejscript missing ?I don't see it.
Michael Mason
@boone2016
Mar 08 2016 18:30
@tejscript class=""
<p>Click here for <a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">cat photos</a></p>
your code is correct but it's not accepted because it's incomplete
Tej Pratap
@tejscript
Mar 08 2016 18:31
@boone2016 thnx a lot
CamperBot
@camperbot
Mar 08 2016 18:31
tejscript sends brownie points to @boone2016 :sparkles: :thumbsup: :sparkles:
:star: 10 | @boone2016 | http://www.freecodecamp.com/boone2016
Alban MARIETTE
@AlbanMariette
Mar 08 2016 18:31
@boone2016 ok I remember
Michael Mason
@boone2016
Mar 08 2016 18:32
The class is the styling that you should have declared in a previous exercise. NP @tejscript