29th
Feb 2016
Blauelf
@Blauelf
Feb 29 2016 00:04
I would not call that "private", it's just a function-scope variable that is not accessible to anything not defined in the constructor (though its content might leak, but not the variable itself). But that might be due to my history in Java (not Javascript), where properties might be "private".
Capt. Sirius
@Sirius2016gy
Feb 29 2016 00:06
@suffering @Blauelf thank you so much!
CamperBot
@camperbot
Feb 29 2016 00:06
sirius2016gy sends brownie points to @suffering and @blauelf :sparkles: :thumbsup: :sparkles:
:star: 310 | @suffering | http://www.freecodecamp.com/suffering
:star: 1309 | @blauelf | http://www.freecodecamp.com/blauelf
Bhavin Patel
@bpatel1018
Feb 29 2016 00:10
how do i uncomment?
Paul Brown
@paulbwd
Feb 29 2016 00:10
Bhavin Patel
@bpatel1018
Feb 29 2016 00:10
thank you
João Fernandes
@joaofnds
Feb 29 2016 00:13
console.log(data) returns an array
but when I console.log(data.lenght) it say's that data.lenght is equal to 0
I can't iterate over data using $.each() because of that! suffering @suffering Feb 29 2016 00:15 @joaofnds , try console.log(JSON.stringify(data)) check the data João Fernandes @joaofnds Feb 29 2016 00:15 i can see what's in data i just can't iterate it! Paul Brown @paulbwd Feb 29 2016 00:16 your array is empty suffering @suffering Feb 29 2016 00:16 yes, it is empty. João Fernandes @joaofnds Feb 29 2016 00:17 but what about that "lengh: 10" that's in my array? what's that reffering to? referring* Brandon Mitchell @OlympusBrons Feb 29 2016 00:18 This message was deleted @joaofnds That's just the length property of the array all arrays have one, it changes when more things are added to it, etc João Fernandes @joaofnds Feb 29 2016 00:21 but data.length returns 0 i can't iterate over it because data.lengh is equal to 0 but my array has 10 objects Zach @SolarDifference Feb 29 2016 00:23 I was wondering if someone could help me out with the first jQuery task in the Front End Development course. We *We' damn enter key. Ok we're supposed to add the animated and bounce classes to the button elements and place those inside the document ready function. But I'm not sure where "inside" the function refers Coy Sanders @coymeetsworld Feb 29 2016 00:24 arr.length is the length of the array @joaofnds , are you sure data is an array? João Fernandes @joaofnds Feb 29 2016 00:27 @coymeetsworld it's a object, but$.each() shouldn't iterate over it??
Jaren Lynch
@JarenL
Feb 29 2016 00:27
Would someone mind explaining how stuff in html is organized? I can't seem to get things placed how I'd like.
Coy Sanders
@coymeetsworld
Feb 29 2016 00:28
not too familiar with the $.each method @joaofnds, it should work with an array and I guess some objects im just reading the API http://api.jquery.com/jquery.each/ berihu john @berihuj Feb 29 2016 00:30 sorry can we create to class for 1 image to add css João Fernandes @joaofnds Feb 29 2016 00:33 I've read all the jquery api before I start FreeCodeCamp I've used$.each() a handful of times before
I just don't know what's happening now =\
Coy Sanders
@coymeetsworld
Feb 29 2016 00:35
maybe it would help to see the rest of the code @joaofnds
João Fernandes
@joaofnds
Feb 29 2016 00:35
I will put everything in codepen
just a sec
Coy Sanders
@coymeetsworld
Feb 29 2016 00:36
ok
@mjabby
Feb 29 2016 00:37
hey guys i'm having a little problem with one off the freecode challenges.
Set the ID of an Element
whenever I try to to give my form an id it wont do anything
DJ
@qualitymanifest
Feb 29 2016 00:38
@mjabby
Feb 29 2016 00:38
<form action="/submit-cat-photo">
<form action="/submit-cat-photo" id="cat-photo-form">
I think that is the answer
DJ
@qualitymanifest
Feb 29 2016 00:39
@mjabby that should work
@mjabby
Feb 29 2016 00:39
But it doesn't work
DJ
@qualitymanifest
Feb 29 2016 00:39
try refreshing the page and doing it again
Paul Brown
@paulbwd
Feb 29 2016 00:40
what error are you getting?
DJ
@qualitymanifest
Feb 29 2016 00:40
sometimes that fixes it. if that doesn't fix it there may be another problem somewhere in your code
@mjabby
Feb 29 2016 00:40
LMAO
I refresehd and it worked lol
Thanks @qualitymanifest
CamperBot
@camperbot
Feb 29 2016 00:41
mjabby sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1016 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Feb 29 2016 00:41
np :+1: yeah unfortunately that happens sometimes, it's pretty rare though
BAH Chernor bakar
@dokkal
Feb 29 2016 00:42
@mjabby it ok?
João Fernandes
@joaofnds
Feb 29 2016 00:42
João Fernandes
@joaofnds
Feb 29 2016 00:48
I think I found the awnser! http://jsfiddle.net/46bv5/
Coy Sanders
@coymeetsworld
Feb 29 2016 00:50
that answer is using JSON data you're using an array though
$(streamers).each doesn't work comaeternal @comaeternal Feb 29 2016 00:50 hey I'm new here and I got stuck. I'm working on HTML and want to resize my (img) image Coy Sanders @coymeetsworld Feb 29 2016 00:51$() references an element like an id or a class, not a JS variable i think
comaeternal
@comaeternal
Feb 29 2016 00:51
using a class
João Fernandes
@joaofnds
Feb 29 2016 00:51
@coymeetsworld typeof data returns Object
Marina
@marinakatalina
Feb 29 2016 00:52
Hi - I need help when it comes to entering an ID for h2. i've tried variations of <h2 id="cat-photo-form." class="red-text">CatPhotoApp</h2> and simply typing <h2 id="Cat-photo-form."></h2> but nothing seems to let me pass.
Coy Sanders
@coymeetsworld
Feb 29 2016 00:53
@marinakatalina remove the period after cat-photo-form
make sure its all lowercase too
idkd @joaofnds haven't gotten that far yet, but have you tried just using a regular for loop to iterate through the array?
Marina
@marinakatalina
Feb 29 2016 00:54
right, I tried thats what I tried initiatlly. and actually, got onto using the period cos I noticed the instructions state "Give your form element the id cat-photo-form." -- regardless of lowercase and removing periods, it still doesn't let mepass.
I have this now <h2 id="cat-photo-form" class="red-text">CatPhotoApp</h2>
Mikayla Porter
@mikaylaporter
Feb 29 2016 00:55
Can I please get some help with Prioritizing One Style Over Another?
João Fernandes
@joaofnds
Feb 29 2016 00:55
@coymeetsworld haven't tried yet
Leonardo Galante
@lndgalante
Feb 29 2016 00:55
Hi guys needing some help here! I'm in the Bootstrap part using Font Awesome icons. But I'm having some problem with this part "Your fa-thumbs-up icon should be located within the Like button." This is my code: "<button type="submit">
<i class="fa fa-thumbs-up"></i>
Submit
</button>"
Coy Sanders
@coymeetsworld
Feb 29 2016 00:56
what does the rest of the code look like and which challenge is it @mikaylaporter
?
Mikayla Porter
@mikaylaporter
Feb 29 2016 00:56

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

<h1 pink-text>Hello World!</h1>

Coy Sanders
@coymeetsworld
Feb 29 2016 00:56
ok maybe try that @joaofnds, unless the zipline says to explicitly use jquery there
Karla Parker Schultz
@TheAmazingKarla
Feb 29 2016 00:56

Can somebody help me with this? I can't spot the mistake. To me it looks just like what they're asking for.

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

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

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

Coy Sanders
@coymeetsworld
Feb 29 2016 00:57
@mikaylaporter you need to specify class attribute to the h1 tag
Mikayla Porter
@mikaylaporter
Feb 29 2016 00:57
How
Coy Sanders
@coymeetsworld
Feb 29 2016 00:57
<h1 class="some_class"></h1>
Karla Parker Schultz
@TheAmazingKarla
Feb 29 2016 00:57
It says I still need to make the h2 element red. I thought I did.
Coy Sanders
@coymeetsworld
Feb 29 2016 00:57
looks right to me @TheAmazingKarla
Abdul Awali
@awalthefirst
Feb 29 2016 00:57
@mikaylaporter
 .pink-text {
color: pink;
}
Umar Khan
@umar-khan
Feb 29 2016 00:57
@TheAmazingKarla You don't need to have "h2" in your <style> tag
Karla Parker Schultz
@TheAmazingKarla
Feb 29 2016 00:58
Okay, I'll try taking that out.
Leonardo Galante
@lndgalante
Feb 29 2016 00:58
Hi guys needing some help here! I'm in the Bootstrap part using Font Awesome icons. But I'm having some problem with this part "Your fa-thumbs-up icon should be located within the Like button." This is my code: "<button type="submit">
<i class="fa fa-thumbs-up"></i>
Submit
</button>"
Abdul Awali
@awalthefirst
Feb 29 2016 00:58
<h1 class='pink-text'> @mikaylaporter
Mikayla Porter
@mikaylaporter
Feb 29 2016 00:58
It didn't work @coymeetsworld
Karla Parker Schultz
@TheAmazingKarla
Feb 29 2016 00:58
That was it! Thanks.
Mikayla Porter
@mikaylaporter
Feb 29 2016 00:58
I tried that @awalthefirst
Umar Khan
@umar-khan
Feb 29 2016 00:59
@TheAmazingKarla no worries :)
Kinshuk Sen
@kinshuksen
Feb 29 2016 00:59
@Fenwil You have associated the icon against the Submit button and not the Like button.
Abdul Awali
@awalthefirst
Feb 29 2016 00:59
<style>
body {
background-color: black;
font-family: Monospace;
color: green;
}
.pink-text {
color: pink;
}
</style>
<h1 class='pink-text'>Hello World!</h1>
@mikaylaporter it's working on my side
Marina
@marinakatalina
Feb 29 2016 00:59
Alright, so i'm still stuck with not being able to pass "Set the ID of an Element" lesson. It wants to me insert an Id for h2 that is <h2 id="cat-photo-form" and here's what I have
<h2 id="cat-photo-form" class="red-text">CatPhotoApp</h2>
Mikayla Porter
@mikaylaporter
Feb 29 2016 01:00
That didn't work
Abdul Awali
@awalthefirst
Feb 29 2016 01:00
Leonardo Galante
@lndgalante
Feb 29 2016 01:00
@kinshuksen ahhh thanks let me try that! really thanks men!
CamperBot
@camperbot
Feb 29 2016 01:00
fenwil sends brownie points to @kinshuksen :sparkles: :thumbsup: :sparkles:
:star: 130 | @kinshuksen | http://www.freecodecamp.com/kinshuksen
Leonardo Galante
@lndgalante
Feb 29 2016 01:00
@awalthefirst I think I have it but let me try
Abdul Awali
@awalthefirst
Feb 29 2016 01:01
@mikaylaporter hard refresh the page
Kinshuk Sen
@kinshuksen
Feb 29 2016 01:01
@Fenwil You're welcome :)
Umar Khan
@umar-khan
Feb 29 2016 01:01
@marinakatalina Read the question again. Are you sure it's telling you to give that ID to your <h2> element?
Leonardo Galante
@lndgalante
Feb 29 2016 01:02
@kinshuksen @awalthefirst thanks guys problem solved! :)
CamperBot
@camperbot
Feb 29 2016 01:02
fenwil sends brownie points to @kinshuksen and @awalthefirst :sparkles: :thumbsup: :sparkles:
:warning: fenwil already gave kinshuksen points
:star: 601 | @awalthefirst | http://www.freecodecamp.com/awalthefirst
Mikayla Porter
@mikaylaporter
Feb 29 2016 01:02
I tried and it didn't work
Abdul Awali
@awalthefirst
Feb 29 2016 01:02
@Fenwil anytime
Marina
@marinakatalina
Feb 29 2016 01:02
haha oh finally, thanks! that was it.
Umar Khan
@umar-khan
Feb 29 2016 01:02
:)
Mikayla Porter
@mikaylaporter
Feb 29 2016 01:03
@awalthefirst it is not working
Abdul Awali
@awalthefirst
Feb 29 2016 01:03
@mikaylaporter try in a different browser
Mikayla Porter
@mikaylaporter
Feb 29 2016 01:04
I don't have a nosher browser
^ @mikaylaporter
Mikayla Porter
@mikaylaporter
Feb 29 2016 01:05
Wait never mind i got it
Mirage2832
@Mirage2832
Feb 29 2016 01:08
how do i create a css class called pin-text
Abdul Awali
@awalthefirst
Feb 29 2016 01:09
<div class='nameOfClass'> <div> @Mirage2832
Mirage2832
@Mirage2832
Feb 29 2016 01:09
thnx
Melissa
Feb 29 2016 01:10
what I'm doing wrong with this code? I tried to format it several different ways using the CSS style for the font color
<style>
h2 {color: blue;}CatPhotoApp
</style>
Davide
@DavOnGit
Feb 29 2016 01:15
<style>
h2 {
color: black;
}
</style>
Melissa
Feb 29 2016 01:16
Thank you! @DavOnGit
CamperBot
@camperbot
Feb 29 2016 01:16
melissad85 sends brownie points to @davongit :sparkles: :thumbsup: :sparkles:
:star: 335 | @davongit | http://www.freecodecamp.com/davongit
agirlnamedJared
@agirlnamedJared
Feb 29 2016 01:19
http://codepen.io/agirlnamedJared/pen/pyzpZM?editors=1100
navigation won't go in a straight line my css has it set to display: inline-block, Also navigation tabs jump to each section but not the top of the section. How do I get each section to start at the beginning instead of jumping to the end?
Alexander Louiciano
@louiciano
Feb 29 2016 01:25
hello everyone, just join FCC, and join this room.
Davide
@DavOnGit
Feb 29 2016 01:25
@louiciano hi :)
Alexander Louiciano
@louiciano
Feb 29 2016 01:26
Hi @DavOnGit
Davide
@DavOnGit
Feb 29 2016 01:29
@agirlnamedJared your navbar isn't working properly, u fogot put bootstrap.js, go in settings then javascript then add bootstrap also there!
agirlnamedJared
@agirlnamedJared
Feb 29 2016 01:31
@DavOnGit bootstrap isn't in the dropdown menu
Davide
@DavOnGit
Feb 29 2016 01:32
i assure that is there :)
agirlnamedJared
@agirlnamedJared
Feb 29 2016 01:34
@DavOnGit its not. Not under javascript. It is however listed under css which I added first
Briana Swift
@brianamarie
Feb 29 2016 01:35
@agirlnamedJared Bootstrap needs to be there, and I see it there. It looks to me like a problem could be that there's no ul/li structure. I'd spend some time looking at examples of simple nav bars with bootstrap and model that structure.
Don't tell anyone that I posted a link to w3 schools...but...http://www.w3schools.com/bootstrap/bootstrap_navbar.asp
You have css bootstrap added, but not JS. If you can't find it in the quick-add menu under JS, just post this link for bootstrap: //maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js
The bootstrap navbar works by taking an unordered list and automatically formatting it based on the classes you use. If you don't have the unordered list or if you don't include the correct classes in the right places, it won't look how you expect.
agirlnamedJared
@agirlnamedJared
Feb 29 2016 01:37
@DavOnGit nevermind I did find it. I've looked at all sorts of examples. on all sorts of sites. I did find a guy who had a simple set up like i do and his page works well on codepen. @brianamarie I also don't know if I'm using javascript for any of this. I'm making this page after completing only the html5 css and jquery lessons on freecodecamp. I have no working knowledge of java as of yet
Briana Swift
@brianamarie
Feb 29 2016 01:38
No worries about the JS. :) Your HTML isn't including the proper bootstrap elements like <ul> and <li>
agirlnamedJared
@agirlnamedJared
Feb 29 2016 01:38
@brianamarie the w3 site is what has gotten me as far as I have because the freecodecamp hasn't helped me much so far
Davide
@DavOnGit
Feb 29 2016 01:38
@agirlnamedJared look the settings of this pen under javascript u will see it!
http://codepen.io/Daviz/pen/NxVYom
Briana Swift
@brianamarie
Feb 29 2016 01:39
Ok. Well do you see the differences between the example on w3 and what you have currently?
agirlnamedJared
@agirlnamedJared
Feb 29 2016 01:40
@brianamarie I had the <ul> and was having the same issues so I looked up someone elses page and they did what i currently have going and it seemed to work for them. Once again its not working for me.
@DavOnGit i said before I did find it but I also said before I'm not using java for this project because I haven't been through that part of the program yet and therefore would have no idea what I'm doing.
Briana Swift
@brianamarie
Feb 29 2016 01:42
Ok @agirlnamedJared. You're right, only adding <ul> isn't going to help. There are a couple more pieces that need to be added also, like <li> and the proper classes. Do you see on the W3 example how there's <li> components in addition to <ul> and that the <ul> and <li> elements each have specific classes?
(Additionally, if you can find the example you're talking about, I bet there's more to the story that they had going on to make it work. :) )
agirlnamedJared
@agirlnamedJared
Feb 29 2016 01:43
@brianamarie yes I had all of that before the whole list thing from beginning to end. It would jump around the page but not specifically to the beginning of the section. more towards the middle of each section. Is it a margin settings issue. I promise when I had the lists (all properly done) I was having the same issue I'm currently having now
Davide
@DavOnGit
Feb 29 2016 01:45
@agirlnamedJared doesn't matter you dont use javascript because bootstrap does, it is needed for navbars functionality....
....and other stuff
agirlnamedJared
@agirlnamedJared
Feb 29 2016 01:46
@DavOnGit freecodecamp did not tell me that...I'm really starting to question using this site to learn these things. Thank you for that info
CamperBot
@camperbot
Feb 29 2016 01:46
agirlnamedjared sends brownie points to @davongit :sparkles: :thumbsup: :sparkles:
Briana Swift
@brianamarie
Feb 29 2016 01:46
I'm not trying to argue with you...I've been working on your codepen and if I replace your nav HTML with a different block taken from an example using all of these things, it works. If I were you, I'd find a block of simple, functional code and plug that into your current code in place of your nav html. Does that make sense?
CamperBot
@camperbot
Feb 29 2016 01:46
:star: 337 | @davongit | http://www.freecodecamp.com/davongit
@ajsnetiker
Feb 29 2016 01:47
@agirlnamedJared That might just be a link issue. To go to the beginning of each section assign an id to that <section> tag (or div tag, if that’s how you’re dividing it”) and then link with <a href=“#sectionID”>Section Name</a>
Briana Swift
@brianamarie
Feb 29 2016 01:47
part of free code camp is the community, which did just tell you that...thanks to the patience of @DavOnGit ;) thanks Davide
CamperBot
@camperbot
Feb 29 2016 01:47
brianamarie sends brownie points to @davongit :sparkles: :thumbsup: :sparkles:
:star: 338 | @davongit | http://www.freecodecamp.com/davongit
Byeongjun3
@Byeongjun3
Feb 29 2016 01:49
how do you use container-fluid??
Make sure you have nested all HTML elements in .container-fluid.
?
what does that mean
Briana Swift
@brianamarie
Feb 29 2016 01:50
It means the beginning of your HTML body code should be <div class="container-fluid"> and at the very end should be </div>. If that isn't at the very start and very end, it won't work as you expect
Byeongjun3
@Byeongjun3
Feb 29 2016 01:51
@brianamarie thank you
CamperBot
@camperbot
Feb 29 2016 01:51
byeongjun3 sends brownie points to @brianamarie :sparkles: :thumbsup: :sparkles:
:star: 572 | @brianamarie | http://www.freecodecamp.com/brianamarie
agirlnamedJared
@agirlnamedJared
Feb 29 2016 01:55
@brianamarie this is the code i'm looking at. works perfect http://codepen.io/poisonhawk/pen/jqOYdJ?editors=1000
William Smith
@wxiv
Feb 29 2016 01:56
@brianamarie How did you become a member of FreeCodeCamp on Github?
Maryna Sokolova
@ultramarichka
Feb 29 2016 01:56
I'm stuck( what do they mean 'Replace the value of your a element's href attribute with a #' . i searched google tried various variants. nothing helps
agirlnamedJared
@agirlnamedJared
Feb 29 2016 01:57
@brianamarie this is where i'm at currently http://codepen.io/agirlnamedJared/pen/pyzpZM?editors=1100
Phyllis Bennett
@lynnbennett
Feb 29 2016 01:57
Hi a friend recommend me how do you write a function that takes two numbers and gives a percentage of one by 50%
Briana Swift
@brianamarie
Feb 29 2016 01:57
@agirlnamedJared Not sure if this is what makes it work or not, but if you look at the JS add-ons used in that pen, they are including jQuery.
@ajsnetiker
Feb 29 2016 01:58
@lynnbennett Gives a percentage of one by 50%? What does that mean?
@lynnbennett Do you mean the average of the two numbers?
Briana Swift
@brianamarie
Feb 29 2016 01:59
@agirlnamedJared try to make these minor changes and see if this accomplishes what you want it to:
<div class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-left">
<ul class="nav navbar-nav">
<li><a class="active" href="#home">Home</a></li>
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div>
</div>
</div>
Phyllis Bennett
@lynnbennett
Feb 29 2016 01:59
yes, will take two numbers, figure out what percent the first number represents of the second number, and return the result. It should also log a string like "2 is 50% of 4."
Briana Swift
@brianamarie
Feb 29 2016 01:59
@whsmithiv lots and lots of contributions :)
@ajsnetiker
Feb 29 2016 02:00
ah ok
William Smith
@wxiv
Feb 29 2016 02:00
@brianamarie Oh ok. Always looking for new badges/benchmarks to gauge progress. :smile:
@ajsnetiker
Feb 29 2016 02:01

@lynnbennett Think of it in plain English, and write that down then convert it into javascript.

function name(inputs) {
….. code ….
return output String;
}

Davide
@DavOnGit
Feb 29 2016 02:01
@brianamarie maybe a couple of challanges on codepen basics is not a bad idea, do you.....? :)
Briana Swift
@brianamarie
Feb 29 2016 02:02
Hey, if you want it, build it! I am 100% in support of that idea! lol
Kally Chung
@chunggnuhc
Feb 29 2016 02:03
Hi guys
Davide
@DavOnGit
Feb 29 2016 02:03
@brianamarie but u have more experience.... :shipit:
@ajsnetiker
Feb 29 2016 02:04

@lynnbennett num1 / num2 = .XX (percentage). Multiply that by 100 to get the real percentage then output the string.

return num1 + “ is “ + percentage + “ of “ + num2 ;

num1 = first number
num2 = second number
percentage = (num1 / num2) * 100

Briana Swift
@brianamarie
Feb 29 2016 02:04
:sparkles: Can't wait to see what you come up with @DavOnGit :)
Phyllis Bennett
@lynnbennett
Feb 29 2016 02:05

but i am working on it I tried the following code let me <script>
function halfNumber ( 12,2) {
document.getElementById( 12,2) divide by 1/2
console log( “multiply” +num12 +”divide” + gives you” + results
return results

};
</script>
okay i see

I am new to coding
Davide
@DavOnGit
Feb 29 2016 02:06
:candy:
Phyllis Bennett
@lynnbennett
Feb 29 2016 02:07
@ajsnetiker thanks
CamperBot
@camperbot
Feb 29 2016 02:07
lynnbennett sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles:
:star: 294 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
@ajsnetiker
Feb 29 2016 02:09
@lynnbennett you aren’t even writing javascript, document.getElementById is for controlling HTML elements. And you don’t need script tags, in FreeCodeCamp you’re always writing javascript so delete that. It should look something like this:
function findPercentage(num1, num2) {
var percentage = (num1/num2) * 100;
var result = num1 + “ is “ + percentage + “% of “ + num2 + “.”;
return result;
}
swissricola
@swissricola
Feb 29 2016 02:09
can anyone help me with the "Replacing If Else Chains with Switch" way point?
function myTest(val) {
// Only change code below this line

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

case "bob":
break;

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

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

case "7":
break;

default:
break;

}

// Only change code above this line
}

// Change this value to test
myTest(7);
Tim Bowman
@gibbypoo
Feb 29 2016 02:11
"case: "?
Maryna Sokolova
@ultramarichka
Feb 29 2016 02:11
People! pls help . mb for many of you it's done - how to 'Replace the value of your a element's href attribute with a #'
Tim Bowman
@gibbypoo
Feb 29 2016 02:11
.<a href="#"></a>
Briana Swift
@brianamarie
Feb 29 2016 02:12
at the beginning of your switch statement, it shouldn't be switch (answer), but switch(val) in reference to the input of the function @swissricola
Maryna Sokolova
@ultramarichka
Feb 29 2016 02:12
@gibbypoo Thank you so much! words were extra.now i see
CamperBot
@camperbot
Feb 29 2016 02:12
ultramarichka sends brownie points to @gibbypoo :sparkles: :thumbsup: :sparkles:
:star: 36 | @gibbypoo | http://www.freecodecamp.com/gibbypoo
Briana Swift
@brianamarie
Feb 29 2016 02:12
Also, if the case is a string, it should be in quotes. But if it's a number, it doesn't need to be put in quotes.
@ajsnetiker
Feb 29 2016 02:12
@swissricola Just follow exactly what they did on the bottom using the different values from up tom
Tim Bowman
@gibbypoo
Feb 29 2016 02:13
@ultramarichka np!
swissricola
@swissricola
Feb 29 2016 02:13
kk trying thanks
guys
@ajsnetiker
Feb 29 2016 02:13
@swissricola nevermind
@swissricola I think you just need to take the quotes around the numbers
and delete the top part
swissricola
@swissricola
Feb 29 2016 02:14
ah yes did both, was simple as that LOL
thanks @ajsnetiker
CamperBot
@camperbot
Feb 29 2016 02:15
swissricola sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles:
:star: 295 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
@ajsnetiker
Feb 29 2016 02:15
switch (val) {
case “bob”:
break;

etc….

you don’t need the if/else part there at all @swissricola
awesome!
Tim Bowman
@gibbypoo
Feb 29 2016 02:15
think the if else was showing the if/else version before using switch
@ajsnetiker
Feb 29 2016 02:16
it was
Tim Bowman
@gibbypoo
Feb 29 2016 02:16
with that being said, can't say I use switch that much at all
@ajsnetiker
Feb 29 2016 02:16
I don’t either but it’s still part of JavaScript worth learning
Tim Bowman
@gibbypoo
Feb 29 2016 02:16
Yeah
Byeongjun3
@Byeongjun3
Feb 29 2016 02:19
hi
Create a new button element below your large kitten photo. Give it the class btn and the text of "Like".
?
how do u do it
@brianamarie
@ajsnetiker
Feb 29 2016 02:20

@Byeongjun3 look at the example on the left, I think it shows you.

To assign a class, you would use class = “btn” inside the button tag, then the word Like between the tags

@gibbypoo i used to hate programming but i’m actually starting to have fun with it the more advanced I get. I’m a bit caught up on the weather API on codepen, I know my API works but it hasn’t been loading properly. Still, in general it’s fun to solve the puzzle and make things work!
Julian Betancourt
@julianbetancourt
Feb 29 2016 02:21
hi guys, with jquery, how do i test if an element's children has x class ? This is what I tried
<li class="employee"><span class="out status">OUT</span> Aimee</li>
<li class="employee"><span class="in status">IN</span> Aimee</li>

if ($('.employee').children().hasClass( "in" )) {$(this).css('color', 'pink');
}
@ajsnetiker
Feb 29 2016 02:22
@Byeongjun3 Here’s how you do it, without giving you the answer:
<tagName class = “className”>Button Text</tagName>
Briana Swift
@brianamarie
Feb 29 2016 02:22
There's a few steps included in that. Do you know how to do any of the parts it's asking you about? @Byeongjun3
Byeongjun3
@Byeongjun3
Feb 29 2016 02:23
no
i didn't learn <tagName class = “className”>Button Text</tagName>
'code' <tagName class = “className”>Button Text</tagName>
Briana Swift
@brianamarie
Feb 29 2016 02:24

As much as I hate giving the answer, I feel like it's sort of necessary to explain this question. It's asking you to do something that has 3 parts: create a button, give it a class, and give it text.

The create a button part is actually asking you to make a new element that looks like <button> </button>

To give it a class, you add class = "btn" like this: <button class="btn"> </button>

To add the word Like between the tags, you put the word in between the opening and closing tags like this: <button class="btn">Like</button>

@ajsnetiker
Feb 29 2016 02:25

@Byeongjun3 that’s just general.

The tag name is button, because you’re adding a button.
The class name is btn, because that’s what they told you to add.
Button Text is “Like”, because that’s also what they told you to use.
So…

<button class=“btn”>Like</button>
@brianamarie I agree, I guess ther’es no way around it this time! I thought there might be
Briana Swift
@brianamarie
Feb 29 2016 02:25
Haha we're on the same wavelength @ajsnetiker :)
Julian Betancourt
@julianbetancourt
Feb 29 2016 02:26
Hi @brianamarie :D , do you know how to test if an element's children has x class ?
@ajsnetiker
Feb 29 2016 02:26
@brianamarie Yeah :) How far have you gotten, are you going through the program too? I’m up to the projects which take a long time so I spend some of my time in here just answering questions
Julian Betancourt
@julianbetancourt
Feb 29 2016 02:26
this is what i tried
<li class="employee"><span class="out status">OUT</span> Aimee</li>
<li class="employee"><span class="in status">IN</span> Aimee</li>

if ($('.employee').children().hasClass( "in" )) {$(this).css('color', 'pink');
}
Byeongjun3
@Byeongjun3
Feb 29 2016 02:27
thank u @ajsnetiker @brianamarie
CamperBot
@camperbot
Feb 29 2016 02:27
byeongjun3 sends brownie points to @ajsnetiker and @brianamarie :sparkles: :thumbsup: :sparkles:
:warning: byeongjun3 already gave brianamarie points
:star: 296 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
@ajsnetiker
Feb 29 2016 02:27
@Byeongjun3 sure
Almost up to 300 stars!
Briana Swift
@brianamarie
Feb 29 2016 02:28
@julianbetancourt I'd have to go back and review that specific challenge. From glancing at it, I'm not sure about the .children() part of that. Can you link that challenge?
Julian Betancourt
@julianbetancourt
Feb 29 2016 02:29
@brianamarie it's not a challenge, I'm working on project on my own
Briana Swift
@brianamarie
Feb 29 2016 02:29
@ajsnetiker I'm a few projects in to the data vis certificate, but I just got an awesome tech job (which was my goal all along) so i'm probably going to refocus my energy to more contribution
@ajsnetiker
Feb 29 2016 02:29
@julianbetancourt @brianamarie My gut instinct would probably say try using the $(‘li’) selector at the beginning instead of the class name @brianamarie Awesome, congrats!! did you get a job based on prior background or just learning throug here? Julian Betancourt @julianbetancourt Feb 29 2016 02:30 @ajsnetiker but what if that page has more li s ? Briana Swift @brianamarie Feb 29 2016 02:30 Oh, got it. @julianbetancourt Could this be helpful? https://api.jquery.com/find/ anthonygallina1 @anthonygallina1 Feb 29 2016 02:30 @brianamarie Congratulations on the TECH job! Moisés Man @moigithub Feb 29 2016 02:31 @julianbetancourt i suppose ur <li>'s part its on ur html.. and the if block is on ur <script> ... but why u just dont add ur css color on ur in class ?? **css** .in { color: pink; } Briana Swift @brianamarie Feb 29 2016 02:31 @ajsnetiker a mix of both, but I think my contributions to FCC were really the most important part. It's a training position at a fantastic company in SF, so I'll be working closely with engineering and also other software devs but in a somewhat instructional way. :) thanks @anthonygallina1 I'm pumped! CamperBot @camperbot Feb 29 2016 02:31 brianamarie sends brownie points to @ajsnetiker and @anthonygallina1 :sparkles: :thumbsup: :sparkles: :star: 1001 | @anthonygallina1 | http://www.freecodecamp.com/anthonygallina1 :star: 297 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker Adam Snetiker @ajsnetiker Feb 29 2016 02:32 @julianbetancourt It shouldn’t matter, the children are still children and it’s only checking each li independent…so it’ll check EVERY li not just those 2 anthonygallina1 @anthonygallina1 Feb 29 2016 02:32 :+1: Adam Snetiker @ajsnetiker Feb 29 2016 02:33 @brianamarie awesome…so you’re moving then, or are you in SF already? Welcome to CA! I’m in L.A. …. SF is where FCC is based though I believe! so good for you..I gotta run but maybe i’ll follow ya on github or something, you can’t seem to add friends on here i don’t think Julian Betancourt @julianbetancourt Feb 29 2016 02:34 @moigithub because I don't want to add another class to the <li>, I mean I could, but I think this is a good way to practice traversing the dom Michael Thomas Richards @madebymtr Feb 29 2016 02:34 @julianbetancourt is this just you tinkering with jquery? cause css would be a lot easier Briana Swift @brianamarie Feb 29 2016 02:34 later :) Mikayla Porter @mikaylaporter Feb 29 2016 02:34 Can i please get some help anthonygallina1 @anthonygallina1 Feb 29 2016 02:35 @brianamarie Also thank you for doing the hike videos. I have a hard time remembering things and learning. Bit not at all with your presentation KUDO's you are a excellent teacher thank you @brianamarie CamperBot @camperbot Feb 29 2016 02:35 anthonygallina1 sends brownie points to @brianamarie and @brianamarie :sparkles: :thumbsup: :sparkles: :star: 573 | @brianamarie | http://www.freecodecamp.com/brianamarie :star: 573 | @brianamarie | http://www.freecodecamp.com/brianamarie Mikayla Porter @mikaylaporter Feb 29 2016 02:35 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/> <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"> <style> .red-text { color: red; } h2 { font-family: Lobster, Monospace; } p { font-size: 16px; font-family: Monospace; } .thick-green-border { border-color: green; border-width: 10px; border-style: solid; border-radius: 50%; } .smaller-image { width: 100px; } </style> <h2 class="red-text">CatPhotoApp</h2> <p>Click here for <a href="#">cat photos</a>.</p> <a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a> <p>Things cats love:</p> <ul> <li>cat nip</li> <li>laser pointers</li> <li>lasagna</li> </ul> <p>Top 3 things cats hate:</p> <ol> <li>flea treatment</li> <li>thunder</li> <li>other cats</li> </ol> <form action="/submit-cat-photo"> <label><input type="radio" name="indoor-outdoor"> Indoor</label> <label><input type="radio" name="indoor-outdoor"> Outdoor</label> <label><input type="checkbox" name="personality"> Loving</label> <label><input type="checkbox" name="personality"> Lazy</label> <label><input type="checkbox" name="personality"> Crazy</label> <input type="text" placeholder="cat photo URL" required> <button type="submit">Submit</button> </form> Briana Swift @brianamarie Feb 29 2016 02:35 That's really kind, @anthonygallina1 :) I'm glad they're working for you. Expect more from other contributors - I'm really excited for some of the content in the works! @mikaylaporter do you have a specific question about what you don't understand about this challenge? Michael Thomas Richards @madebymtr Feb 29 2016 02:37 @mikaylaporter if you're wondering why its not working, re-read what it wants you to do, cause you haven't done it Mikayla Porter @mikaylaporter Feb 29 2016 02:37 Yes the code is not working and i don't know the problem or how to fix it Michael Thomas Richards @madebymtr Feb 29 2016 02:37 god that was vague. Mikayla Porter @mikaylaporter Feb 29 2016 02:37 sorry Michael Thomas Richards @madebymtr Feb 29 2016 02:37 its asking for you to contain all your html in a div "To get started, we should nest all of our HTML in a div element with the class container-fluid." Mikayla Porter @mikaylaporter Feb 29 2016 02:38 so i should put all the code inside a div Michael Thomas Richards @madebymtr Feb 29 2016 02:38 give it a shot Briana Swift @brianamarie Feb 29 2016 02:38 Someone was in here with the same confusion earlier, @mikaylaporter . I told them this: It means the beginning of your HTML body code should be <div class="container-fluid"> and at the very end should be </div>. If that isn't at the very start and very end, it won't work as you expect Mikayla Porter @mikaylaporter Feb 29 2016 02:38 okay Briana Swift @brianamarie Feb 29 2016 02:38 I think the wording of that question could be better Mikayla Porter @mikaylaporter Feb 29 2016 02:39 that didn't work Michael Thomas Richards @madebymtr Feb 29 2016 02:39 <div class="container-fluid"> (all of your previously written HTML (not css)</div> Mikayla Porter @mikaylaporter Feb 29 2016 02:40 okay i figured it out thank you Aseel @aseelsky Feb 29 2016 02:41 Hello camper! I have a question. I notice when I first opened the weather app provided by fCC in the Zipline: Show the Local Weather, it didn’t ask for permission to get access to my location, do anyone know why is that? Briana Swift @brianamarie Feb 29 2016 02:41 It could have to do with previous settings stored in your browser, maybe unintentionally. Julian Betancourt @julianbetancourt Feb 29 2016 02:43 this isn't working either if ($('.employee').find('.in')) {
$(this).css('color', 'pink'); } When I console the$(this), I get this, I think is an object [document, context: document]

Aseel
@aseelsky
Feb 29 2016 02:44
@brianamarie I have cleard my browser setting just to check and it still not asking for permission, beside I also notice that when I go to some new websites and I found my city weather displayed there without asking, which I liked acually..
Briana Swift
@brianamarie
Feb 29 2016 02:44
Are you using chrome? @aseelsky
Aseel
@aseelsky
Feb 29 2016 02:44
@brianamarie yes, chrome
Michael Thomas Richards
Feb 29 2016 02:44
are you just exploring DOM traversal, @julianbetancourt
Briana Swift
@brianamarie
Feb 29 2016 02:45
Have you tried with an incognito browser?
Aseel
@aseelsky
Feb 29 2016 02:45
@brianamarie, I check that now..
Julian Betancourt
@julianbetancourt
Feb 29 2016 02:45
Davide
@DavOnGit
Feb 29 2016 02:46
@aseelsky if i remember right, they don't use html5 geolocalization, but ip loc that is less accurate but does not asks for permission
Julian Betancourt
@julianbetancourt
Feb 29 2016 02:46
@madebymtr what i'm trying to do is of course easier with just css but I know it can also be accomplished with jquery, so I want to practice
Briana Swift
@brianamarie
Feb 29 2016 02:48
IMHO @julianbetancourt After you figure this out, I would practice on practical projects that will serve a purpose - the practice will be easier to remember long term because of how our brains learn and store information, and also will help fill out your resume. But, that's just me. :)
Aseel
@aseelsky
Feb 29 2016 02:48
@brianamarie, I just checked, it didn’t ask either with incognito browser
Briana Swift
@brianamarie
Feb 29 2016 02:49
I bet @DavOnGit is right about IP loc that doesn't need permission because it's pretty general
Davide
@DavOnGit
Feb 29 2016 02:51
Clifton Choiniere
@crcnum4
Feb 29 2016 02:51

Hello Help chat I hope someone can direct me to what I am just not finding. I'm working on the weather app which needs longitude and Latitude for the location of the user. I'm trying to pull the data using an api (I'm doing this in case the navigation.getCurrentLocation doesn't work.) below is how I'm trying to pull the IP address' long and lat incase the navigation console doesn't work. I know i don't really need this but mostly i'm looking for information on something specific in the .ajax getjson call:

location = $.ajax({ url: 'https://sanarora-get-ip-info.p.mashape.com/v3/ip-city/', type: 'GET', data: 'format=JSON&ip='+ data.ip, dataType: 'json', success: function(info) { location[0] = info.longitude; location[1] = info.latitude; return location; I'm curious of the format for data. According to documentation it's the information that gets parsed at the end of the url. The url should be 'https://sanarora-get-ip-info.p.mashape.com/v3/ip-city/?format=JSON&ip=173.69.59.44 but entering that extra stuff in the url field does nothing. Does anyone know the syntax or a site that can explain the syntax of the data property? Davide @DavOnGit Feb 29 2016 02:51 ;) Clifton Choiniere @crcnum4 Feb 29 2016 02:51 @DavOnGit hey it works :D doesn't always have to be complicated the difficult part is solved. I'm actually working on that zipline now Aseel @aseelsky Feb 29 2016 02:52 @DavOnGit, for me the app displays my location correctly and that exactly why I’m asking because I’m trying to use OpenWeather API but it doesn’t give me an accure location so I figure asking about what fCC developer used in that App Mikayla Porter @mikaylaporter Feb 29 2016 02:54 HELP! CamperBot @camperbot Feb 29 2016 02:54 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! B. Garber @TheBGar Feb 29 2016 02:54 @mikaylaporter hello! How can we help? Mikayla Porter @mikaylaporter Feb 29 2016 02:54 so <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"> <style> .red-text { color: red; } h2 { font-family: Lobster, Monospace; } p { font-size: 16px; font-family: Monospace; } .thick-green-border { border-color: green; border-width: 10px; border-style: solid; border-radius: 50%; } .smaller-image { width: 100px; } </style> <div class="container-fluid"> <h2 class="red-text">CatPhotoApp</h2> <h2 class="img-responsive">http://bit.ly/fcc-running cats</h2> <p>Click here for <a href="#">cat photos</a>.</p> <a href="#"><img class="smaller-image thick-green-border" src="http://bit.ly/fcc-relaxing-cat"></a> <p>Things cats love:</p> <ul> <li>cat nip</li> <li>laser pointers</li> <li>lasagna</li> </ul> <p>Top 3 things cats hate:</p> <ol> <li>flea treatment</li> <li>thunder</li> <li>other cats</li> </ol> <form action="/submit-cat-photo"> <label><input type="radio" name="indoor-outdoor"> Indoor</label> <label><input type="radio" name="indoor-outdoor"> Outdoor</label> <label><input type="checkbox" name="personality"> Loving</label> <label><input type="checkbox" name="personality"> Lazy</label> <label><input type="checkbox" name="personality"> Crazy</label> <input type="text" placeholder="cat photo URL" required> <button type="submit">Submit</button> </form> </div> Davide @DavOnGit Feb 29 2016 02:55 i suggest u to go with html5 geolocalization, super accurate @aseelsky B. Garber @TheBGar Feb 29 2016 02:55 @mikaylaporter try posting using the following format explain format CamperBot @camperbot Feb 29 2016 02:55 ## :point_right: code formatting [wiki] ### Inline code This an inline <paste code here> code formatting with a single backtick() at start and end around the code. ### Code Block js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css) <paste your code here>, then press [shift + enter ⏎]  ⇦ Type 3 backticks, then press [enter ⏎] See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics B. Garber @TheBGar Feb 29 2016 02:55 @mikaylaporter :point_up: Mikayla Porter @mikaylaporter Feb 29 2016 02:55 and it is telling that 4/5 things aren't working okay i will try it B. Garber @TheBGar Feb 29 2016 02:56 @mikaylaporter what are you trying to accomplish for this exercise? Thomas Mullen @t-mullen Feb 29 2016 02:56 How advanced does our portfolio page need to be? As much as I love making websites, I already have one for myself and would prefer not to spend too much time on another one. B. Garber @TheBGar Feb 29 2016 02:57 @RationalCoding I believe it just needs to fulfill the user experience parts of the zipline, yeah? Thomas Mullen @t-mullen Feb 29 2016 02:57 Do we just need to fulfill the user stories and not resemble the example site? That's fairly minimal then> Abdul Qoyyuum @Qoyyuum Feb 29 2016 02:57 @RationalCoding Depends on your skills and what you can deliver. If you have some creative ideas that you can make within your resources, you can make anything, upload to Github for hosting and show it off to potential clients/employers Mikayla Porter @mikaylaporter Feb 29 2016 02:57 @TheBGar that isn't working B. Garber @TheBGar Feb 29 2016 02:58 @RationalCoding If you already have one you like, then I'd suggest simply fulfilling the User Experiences. I don't believe it has to be completely done up. Abdul Qoyyuum @Qoyyuum Feb 29 2016 02:58 @mikaylaporter Your bitly URL needs to be in <img src=> tags Davide @DavOnGit Feb 29 2016 02:58 @crcnum4 do u need infos about ajax sintax? Thomas Mullen @t-mullen Feb 29 2016 02:59 @Qoyyuum That's true, I'll keep that in mind too! @TheBGar Ok! Just making sure. Thanks to both of you. CamperBot @camperbot Feb 29 2016 02:59 rationalcoding sends brownie points to @qoyyuum and @thebgar :sparkles: :thumbsup: :sparkles: Mikayla Porter @mikaylaporter Feb 29 2016 02:59 okay CamperBot @camperbot Feb 29 2016 02:59 :star: 113 | @qoyyuum | http://www.freecodecamp.com/qoyyuum :star: 308 | @thebgar | http://www.freecodecamp.com/thebgar Briana Swift @brianamarie Feb 29 2016 02:59 @RationalCoding for the certificate, just the user stories. I agree with @TheBGar on taking the simple route since you've already got something Clifton Choiniere @crcnum4 Feb 29 2016 02:59 @DavOnGit yes please. I don't know how the data property works @DavOnGit If i don't need to use the data property the ajax call works fine but this one needs extra info sent via data I don't know how that field works B. Garber @TheBGar Feb 29 2016 02:59 @mikaylaporter yep, @Qoyyuum is right. Looks like you're lacking that img element for that link Mikayla Porter @mikaylaporter Feb 29 2016 03:00 now 3/5 are working but the one that was working isn't anymore B. Garber @TheBGar Feb 29 2016 03:00 @brianamarie :thumbsup: btw, I'm a P-town coder. Recognized your profile pic from our FB group! Harry Gill @mygnu Feb 29 2016 03:01 Everything Be True Help Davide @DavOnGit Feb 29 2016 03:01 mmm, i've never used that one specifically, so i can give only general help sorry Aseel @aseelsky Feb 29 2016 03:02 @DavOnGit, I’m using OpenWeatherMap API, should I use the Latitude and Longitude to check location? I’m confused beacuse these numbers keep changing, is that normal? Briana Swift @brianamarie Feb 29 2016 03:02 Ah, right on @TheBGar :) I am in Urbana now, but up in P-town on the regs. I owe Jay a huge favor for him sending me a job posting! Mikayla Porter @mikaylaporter Feb 29 2016 03:02 <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"> <style> .red-text { color: red; } h2 { font-family: Lobster, Monospace; } p { font-size: 16px; font-family: Monospace; } .thick-green-border { border-color: green; border-width: 10px; border-style: solid; border-radius: 50%; } .smaller-image { width: 100px; } </style> <div class="container-fluid"> <h2 class="red-text">CatPhotoApp</h2> <h2 class="img-responsive"><img src=http://bit.ly/fcc-running cats></h2> <p>Click here for <a href="#">cat photos</a>.</p> <a href="#"><img class="smaller-image thick-green-border" src="http://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> B. Garber @TheBGar Feb 29 2016 03:02 @brianamarie yeah? you found a job coding already? Mikayla Porter @mikaylaporter Feb 29 2016 03:03 <li>flea treatment</li> <li>thunder</li> <li>other cats</li> </ol> <form action="/submit-cat-photo"> <label><input type="radio" name="indoor-outdoor"> Indoor</label> <label><input type="radio" name="indoor-outdoor"> Outdoor</label> <label><input type="checkbox" name="personality"> Loving</label> <label><input type="checkbox" name="personality"> Lazy</label> <label><input type="checkbox" name="personality"> Crazy</label> <input type="text" placeholder="cat photo URL" required> <button type="submit">Submit</button> </form> </div> Davide @DavOnGit Feb 29 2016 03:03 @aseelsky yes, retrive lat long with html5 geoloc, then pass it to openweather....... Mikayla Porter @mikaylaporter Feb 29 2016 03:03 i ned help need* Manish Giri @Manish-Giri Feb 29 2016 03:03 @mikaylaporter what’s up, where you stuck? Briana Swift @brianamarie Feb 29 2016 03:03 @TheBGar Sure did...it's a trainer position, so it's not a developer position, but it's at a tech company and my work with FCC absolutely is what got me looked at Mikayla Porter @mikaylaporter Feb 29 2016 03:03 umm.. the code isn't working Manish Giri @Manish-Giri Feb 29 2016 03:04 @mikaylaporter which one? can you post the code formatted right? explain format CamperBot @camperbot Feb 29 2016 03:04 ## :point_right: code formatting [wiki] ### Inline code This an inline <paste code here> code formatting with a single backtick() at start and end around the code. ### Code Block js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css) <paste your code here>, then press [shift + enter ⏎]  ⇦ Type 3 backticks, then press [enter ⏎] See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics B. Garber @TheBGar Feb 29 2016 03:04 @brianamarie That is fantastic! A trainer position? Like training developers? Is it in UC? Aseel @aseelsky Feb 29 2016 03:04 Thank you @DavOnGit for the help and thank you @brianamarie :) CamperBot @camperbot Feb 29 2016 03:04 aseelsky sends brownie points to @davongit and @brianamarie :sparkles: :thumbsup: :sparkles: :star: 574 | @brianamarie | http://www.freecodecamp.com/brianamarie :star: 340 | @davongit | http://www.freecodecamp.com/davongit Briana Swift @brianamarie Feb 29 2016 03:05 Nope...it's in SF. If you poke around on my facebook, you'll see some clues as to the company. I'm trying to keep it sorta on the down low until I start offically lol Mikayla Porter @mikaylaporter Feb 29 2016 03:05 umm @Manish-Giri i can't figure the code formatting thing out Manish Giri @Manish-Giri Feb 29 2016 03:05 @mikaylaporter look at the instructions just above B. Garber @TheBGar Feb 29 2016 03:05 @brianamarie that is totally nuts. A huge congrats to you though! When do you ship out? Briana Swift @brianamarie Feb 29 2016 03:05 @mikaylaporter you put three backticks before and after your code. The backticks are the button right by the number 1 on your keyboard. Mikayla Porter @mikaylaporter Feb 29 2016 03:06 i have it doesn't work i will try again Briana Swift @brianamarie Feb 29 2016 03:06 @TheBGar My official start date for training is March 14, but it's 50% remote and 50% travel B. Garber @TheBGar Feb 29 2016 03:06 unbelievable! What a gig Briana Swift @brianamarie Feb 29 2016 03:07 @mikaylaporter you can play around here to try to figure out formatting: https://gitter.im/FreeCodeCamp/camperbotPlayground :sparkles: :D Manish Giri @Manish-Giri Feb 29 2016 03:08 @brianamarie congratulations! Davide @DavOnGit Feb 29 2016 03:08 @mikaylaporter also ALT+96 does a backtick if u're not us..... Mikayla Porter @mikaylaporter Feb 29 2016 03:19 <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"> <style> .red-text { color: red; } h2 { font-family: Lobster, Monospace; } p { font-size: 16px; font-family: Monospace; } .thick-green-border { border-color: green; border-width: 10px; border-style: solid; border-radius: 50%; } .smaller-image { width: 100px; } </style> <div class="container-fluid"> <h2 class="red-text">CatPhotoApp</h2> <h2 class="img-responsive"><img src=http://bit.ly/fcc-running cats></h2> <p>Click here for <a href="#">cat photos</a>.</p> <a href="#"><img class="smaller-image thick-green-border" src="http://bit.ly/fcc-relaxing-cat"></a> <p>Things cats love:</p> <ul> <li>cat nip</li> <li>laser pointers</li> <li>lasagna</li> </ul> <p>Top 3 things cats hate:</p> <ol> <li>flea treatment</li> <li>thunder</li> <li>other cats</li> </ol> <form action="/submit-cat-photo"> <label><input type="radio" name="indoor-outdoor"> Indoor</label> <label><input type="radio" name="indoor-outdoor"> Outdoor</label> <label><input type="checkbox" name="personality"> Loving</label> <label><input type="checkbox" name="personality"> Lazy</label> <label><input type="checkbox" name="personality"> Crazy</label> <input type="text" placeholder="cat photo URL" required> <button type="submit">Submit</button> </form> </div>  see doesn't work Briana Swift @brianamarie Feb 29 2016 03:21 You need to press shift+enter after the first 3 ticks. Ghost @ghost~56c733f2e610378809c24d2c Feb 29 2016 03:22 <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"> <style> .red-text { color: red; } h2 { font-family: Lobster, Monospace; } p { font-size: 16px; font-family: Monospace; } .thick-green-border { border-color: green; border-width: 10px; border-style: solid; border-radius: 50%; } .smaller-image { width: 100px; } </style> <div class="container-fluid"> <h2 class="red-text">CatPhotoApp</h2> <h2 class="img-responsive"><img src=http://bit.ly/fcc-running cats></h2> <p>Click here for <a href="#">cat photos</a>.</p> <a href="#"><img class="smaller-image thick-green-border" src="http://bit.ly/fcc-relaxing-cat"></a> <p>Things cats love:</p> <ul> <li>cat nip</li> <li>laser pointers</li> <li>lasagna</li> </ul> <p>Top 3 things cats hate:</p> <ol> <li>flea treatment</li> <li>thunder</li> <li>other cats</li> </ol> <form action="/submit-cat-photo"> <label><input type="radio" name="indoor-outdoor"> Indoor</label> <label><input type="radio" name="indoor-outdoor"> Outdoor</label> <label><input type="checkbox" name="personality"> Loving</label> <label><input type="checkbox" name="personality"> Lazy</label> <label><input type="checkbox" name="personality"> Crazy</label> <input type="text" placeholder="cat photo URL" required> <button type="submit">Submit</button> </form> </div> magic B. Garber @TheBGar Feb 29 2016 04:02 @travisboss Are you needing help with something? Or just posting your code for review? Ghost @ghost~56c733f2e610378809c24d2c Feb 29 2016 04:03 @TheBGar that was for the person above not able to post inside code blocks. B. Garber @TheBGar Feb 29 2016 04:03 @travisboss :thumbsup: Umar Khan @umar-khan Feb 29 2016 04:07 Hey all, question regarding constructor functions in JS if we have a parameter named "eyes" we can define it by this.eyes = 2; But what if our parameter has a space in the name How do we define a parameter with spaces in the name? B. Garber @TheBGar Feb 29 2016 04:09 @umar-khan use bracket notation then @umar-khan this.["two names"] = 2; @umar-khan whoops, didn't mean to type the dot --> this["two names"] = 2; should work. Let me know! David O'Connor @davidmaoconnor Feb 29 2016 04:15 I'm on the first project, the tribute project. Am I successful if I use the same html elements as FreeCodeCamp site or am I also successful if it looks the same, but uses different html elements? Pawan @pawan92 Feb 29 2016 04:16 @davidmaoconnor you can use whatever you want honestly. make it your own Umar Khan @umar-khan Feb 29 2016 04:16 @TheBGar Ah thanks, without the dot worked CamperBot @camperbot Feb 29 2016 04:16 umar-khan sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles: :star: 310 | @thebgar | http://www.freecodecamp.com/thebgar B. Garber @TheBGar Feb 29 2016 04:16 @davidmaoconnor I believe it doesn't matter if you use the same html elements. Since html elements are the nuts and bolts to every page! @umar-khan rock on :thumbsup: David O'Connor @davidmaoconnor Feb 29 2016 04:16 @pawan92 ah, ok. Thanks so much CamperBot @camperbot Feb 29 2016 04:16 davidmaoconnor sends brownie points to @pawan92 :sparkles: :thumbsup: :sparkles: :star: 314 | @pawan92 | http://www.freecodecamp.com/pawan92 Umar Khan @umar-khan Feb 29 2016 04:17 @TheBGar with dot notation, can we only add single word, string based parameter names? Daniel Bashir @db7894 Feb 29 2016 04:17 I'm on the "Target Elements by Class Using jQuery" lesson and had a quick question on selecting. With the lesson before it had me make the buttons on the screen bounce by selecting with$("button"), but for targeting the div elements with the class well it says to use the $(".well") selector. I don't understand why that second selector requires the period before it. Can anyone explain this? Kazadi K. @kazadi Feb 29 2016 04:17 take the . out of well David O'Connor @davidmaoconnor Feb 29 2016 04:17 @TheBGar thanks also CamperBot @camperbot Feb 29 2016 04:17 davidmaoconnor sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles: B. Garber @TheBGar Feb 29 2016 04:17 @umar-khan I believe so CamperBot @camperbot Feb 29 2016 04:17 :star: 311 | @thebgar | http://www.freecodecamp.com/thebgar B. Garber @TheBGar Feb 29 2016 04:17 @davidmaoconnor :thumbsup: Umar Khan @umar-khan Feb 29 2016 04:18 ah alright that makes sense thanks again :) Kazadi K. @kazadi Feb 29 2016 04:18 @db7894 i think you have to take the . out of well Daniel Bashir @db7894 Feb 29 2016 04:18 @kazadi it only works when I put the . there, and that's what the lesson is saying to do It says "First, let's target your div elements with the class well by using the$(".well") selector."
It says that you type a . before the class's name like with CSS declarations but I don't understand why I didn't have to do that with the $("button") selector Kazadi K. @kazadi Feb 29 2016 04:20 @db7894 ohhhh! i think before it would just select every button element and apply w/e effect you desired. with the “.well” parameter it selects whatever element has that class applied Daniel Bashir @db7894 Feb 29 2016 04:21 Ah so is it because I set it up initially with <div class="well">? Kazadi K. @kazadi Feb 29 2016 04:22 correct .well is an indicator that your looking for a class with the name of well Daniel Bashir @db7894 Feb 29 2016 04:22 I think I get it. Thanks @kazadi CamperBot @camperbot Feb 29 2016 04:22 db7894 sends brownie points to @kazadi :sparkles: :thumbsup: :sparkles: :star: 229 | @kazadi | http://www.freecodecamp.com/kazadi ganeshtotad @ganeshtotad Feb 29 2016 04:23 Do we have java freecode camp Daniel Bashir @db7894 Feb 29 2016 04:26 @ganeshtotad I don't think so ganeshtotad @ganeshtotad Feb 29 2016 04:27 Thanks Daniel Bashir @db7894 Feb 29 2016 04:27 @ganeshtotad If you do want to learn it there are a bunch of places though. Here's one: http://www.w3schools.in/java/intro/ ganeshtotad @ganeshtotad Feb 29 2016 04:30 How to prictice algorithm problem's like reverse string or find reapting characters count from string Daniel Bashir @db7894 Feb 29 2016 04:31 Hm... I used a book to learn the basics but there are a bunch of IDEs you can download to just try the stuff out. I'd recommend Eclipse or Atom. Bhavin Patel @bpatel1018 Feb 29 2016 04:32 is there a program for ruby on rails? Daniel Bashir @db7894 Feb 29 2016 04:37 I'm on the "Change Text Inside an Element Using jQuery" lesson and it's asking me to change a button by italicizing its text so that the text is otherwise unchanged. I followed their examples and used the code "$("#target4").html("<i>target4</i>");" but that doesn't seem to work. Can anyone help me out with this?
Ah, just forgot the "#". Silly me.
DJ
@qualitymanifest
Feb 29 2016 04:45
@bpatel1018 there's http://www.theodinproject.com/ but it's not as good as FCC imo
savaj
@savaj
Feb 29 2016 04:45
i have problem on the laravel blade code view i will share my code.
Bhavin Patel
@bpatel1018
Feb 29 2016 04:46
thank you
what do you guys think abot app academy
DJ
@qualitymanifest
Feb 29 2016 04:47
@savaj FCC doesn't deal with PHP... you might be able to find someone who knows PHP on the main chat https://gitter.im/FreeCodeCamp/FreeCodeCamp but you'd be better of finding a PHP-specific room
i'm wondering how, in the past 30 minutes here, the questions have been regarding java, ruby, and php... this is a javascript chatroom, where are you guys finding this?
savaj
@savaj
Feb 29 2016 04:48
please provide me anyroom for php so i will take help.
DJ
@qualitymanifest
Feb 29 2016 04:50
@savaj well you could google it, which i did for you. there's this https://chat.stackoverflow.com/rooms/11/php
Liban Mohamed
@LibanTheDev
Feb 29 2016 04:52
I'm having a problem with the Target a Specific Child of an Element using jQuery exercise
My code: $(".target:nth-class(2)").addClass("animated bounce"); The question is asking to make the second child in each of the well elements bounce Thomas Mullen @t-mullen Feb 29 2016 04:54 @LibanTheDev The children are zero indexed. If you want the second child $(".target:nth-class(2)").addClass("animated bounce");
Sorry $(".target:nth-class(1)").addClass("animated bounce"); Liban Mohamed @LibanTheDev Feb 29 2016 04:56 @RationalCoding I just tried that and it's not letting me run the tests. The example stated this: Here's how you would give the third element in each well the bounce class:$(".target:nth-child(3)").addClass("animated bounce");

Manish Giri
@Manish-Giri
Feb 29 2016 05:00
@LibanTheDev second class is nth-child(2)
Liban Mohamed
@LibanTheDev
Feb 29 2016 05:01
@Manish-Giri thats exactly what i did
Manish Giri
@Manish-Giri
Feb 29 2016 05:01
@LibanTheDev send the url to your challenge
Clifton Choiniere
@crcnum4
Feb 29 2016 05:02

Hello Help chat. Ok gonna try a different question with the .getJSON query. this is my query:

$.getJSON('https://simple-weather.p.mashape.com/weatherdata?lat=' + lat + '&lng=' + lon + '&Mashape-Key=geNBkDiDRjmshS6faFoqwNKsqtBjp1H1O5Njsn8TmYNos3VQfT', function(json) { problem is the simple-weather api doesn't like the key. They call it a header. When I use the f12 developer tools the key gets put in the Query String not the Request Headers... I'm not finding headers for the .getJSON script in the documentation. Anyone work with this before? Liban Mohamed @LibanTheDev Feb 29 2016 05:02 @Manish-Giri LOL Im an idiot i had nth-class the entire its nth-child. Im so tired @Manish-Giri I got it now thanks!! CamperBot @camperbot Feb 29 2016 05:02 libanthedev sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles: :star: 684 | @manish-giri | http://www.freecodecamp.com/manish-giri Manish Giri @Manish-Giri Feb 29 2016 05:02 @LibanTheDev welcome, good luck ahead Clifton Choiniere @crcnum4 Feb 29 2016 05:02 any help would be greatly appreciated this api is kicking my butt today Thomas Mullen @t-mullen Feb 29 2016 05:04 n-th child isn't zero indexed? Well that's a surprise to me. 11wrx @11wrx Feb 29 2016 05:06 Have you guys done your tribute page yet? More specific, any suggestions on how to get started? I've made it to this point and I've googled other tribute pages but I see code in the other pages that I don't recognize and I'm having a hard time just getting started. I don't feel like I should be able to know how to create my own page at this point. Brian @sludge256 Feb 29 2016 05:16 Just start simple and add onto it as you go Kinshuk Sen @kinshuksen Feb 29 2016 05:17 @crcnum4 have you read their documentation? This might be helpful http://docs.mashape.com/javascript Clifton Choiniere @crcnum4 Feb 29 2016 05:18 @kinshuksen thanks, I think I might have something close I'll check this if this will help. CamperBot @camperbot Feb 29 2016 05:18 crcnum4 sends brownie points to @kinshuksen :sparkles: :thumbsup: :sparkles: :star: 131 | @kinshuksen | http://www.freecodecamp.com/kinshuksen Kinshuk Sen @kinshuksen Feb 29 2016 05:19 No worries. Boris @boris-in-london Feb 29 2016 05:19 @11wrx follow the user stories, for tribute i think its : use a picture, use a link, use text. that's all that's expected, google search each case. Like "how do you insert image in html", and take it from there. take it step by step... focus on learning and not putting out a perfect product. 11wrx @11wrx Feb 29 2016 05:20 @boris-in-london thanks. I'll give that a shot. CamperBot @camperbot Feb 29 2016 05:20 11wrx sends brownie points to @boris-in-london :sparkles: :thumbsup: :sparkles: :star: 301 | @boris-in-london | http://www.freecodecamp.com/boris-in-london Danny McCollins @dmccollins Feb 29 2016 05:22 @11wrx If don't feel like you're ready to start building, I recommend completing HTML and CSS courses at Codecademy.com (it's free). Hello world! CamperBot @camperbot Feb 29 2016 05:22 ## welcome to FreeCodeCamp @droymac! Danny McCollins @dmccollins Feb 29 2016 05:22 I'm looking for feedback on my tribute page. Let me know what you think... http://codepen.io/droymac/full/xVxMBY/ Michael Thomas Richards @madebymtr Feb 29 2016 05:24 i like it, but that background makes it kind of hard to read the colors in there are so vibrant the text / layout is :+1: anthonygallina1 @anthonygallina1 Feb 29 2016 05:27 @crcnum4 Is there a way to console log your responce. I had a hard time making this one and have had good code work on and off in code pen. Frustrated me. Nothing worse than trying to fix unbroken code. Clifton Choiniere @crcnum4 Feb 29 2016 05:28 @anthonygallina1 @kinshuksen so I got a successful download now I'm trying to access the data. I can stringify the json Object but now trying to access the data via dot notation is not going well. at least finally SOME progress lol :D Kinshuk Sen @kinshuksen Feb 29 2016 05:29 @crcnum4 well done :) Danny McCollins @dmccollins Feb 29 2016 05:29 Thanks for the tip, @madebymtr. I adjusted the brightness on my bg image to make the page more readable. CamperBot @camperbot Feb 29 2016 05:29 droymac sends brownie points to @madebymtr :sparkles: :thumbsup: :sparkles: :star: 107 | @madebymtr | http://www.freecodecamp.com/madebymtr anthonygallina1 @anthonygallina1 Feb 29 2016 05:30 @crcnum4 if you get the json you are most of the way there. Michael Thomas Richards @madebymtr Feb 29 2016 05:30 much better @droymac - and a great subject to pay tribute to Clifton Choiniere @crcnum4 Feb 29 2016 05:31 @anthonygallina1 yeah i'm already pretty happy just getting the data to actually pull that was the first hurdle. The next part hopefully won't be too difficult. Unlike the lessons this api has a lot more nested data gotta figure out what I can use. anthonygallina1 @anthonygallina1 Feb 29 2016 05:35 @crcnum4 cool anthonygallina1 @anthonygallina1 Feb 29 2016 05:42 @crcnum4 They say to not look at the code. But since mine has been done for months I went a head and looked at others at code pen and there are many broken ones. Even from original example. So if it breaks remember to console log. To be sure you are getting the data. Other wise the test environment to tell whether or not your code is good , is suspect. rickyantony @rickyantony Feb 29 2016 05:56 hello world CamperBot @camperbot Feb 29 2016 05:56 ## welcome to FreeCodeCamp @rickyantony! rickyantony @rickyantony Feb 29 2016 05:57 thank you Adam Snetiker @ajsnetiker Feb 29 2016 05:57 @crcnum4 @anthonygallina1 I just finished the weather project, and before that a couple weeks ago I did the quote generator. In both situations, one thing I found is that using codepen you have to add ?callback=? to the URL so it uses JSONP format, not regular JSON. It’s called the Same-origin policy, which from what I understand seems to mean you have to use callbacks if the API is on a different domain. I’m not sure if that’s the correct way of describing it, I just know I had to use them at least in the weather project. I struggled for a little while until I figured that out, but then adding that made it work! Francis @Francis-p Feb 29 2016 06:00 how do you add a navigation bar which won't move when you scroll? Abdul Qoyyuum @Qoyyuum Feb 29 2016 06:00 @Francis-p you mean a static navbar? Francis @Francis-p Feb 29 2016 06:00 @Qoyyuum yup Danny McCollins @dmccollins Feb 29 2016 06:01 nav { position: fixed; z-index:1; } Francis @Francis-p Feb 29 2016 06:01 @droymac thanks. will try it out CamperBot @camperbot Feb 29 2016 06:01 francis-p sends brownie points to @droymac :sparkles: :thumbsup: :sparkles: :star: 132 | @droymac | http://www.freecodecamp.com/droymac Danny McCollins @dmccollins Feb 29 2016 06:02 No prob! Clifton Choiniere @crcnum4 Feb 29 2016 06:02 @ajsnetiker really? never found anything on that. oh and @anthonygallina1 I actually just got something finally working here's what got it to work: $.ajax({
url: 'https://simple-weather.p.mashape.com/weatherdata?lat=' + lat + '&lng=' + lon,
type: 'GET',
datatype: 'json',
success: function(json) {
var data = eval('(' + json + ')');
},
beforeSend: function(xhr) {
}
});
});

using the $.ajax function I can sent in headers in the beforeSend case. however what comes back is an uncommon json format. it can be stringified but can't be .notated or bracketed. using the eval('(' + json + ')'); function coverts the json into an object stored in the data variable now I can use dot notation on the Data variable because it's considered an object. anthonygallina1 @anthonygallina1 Feb 29 2016 06:02 @ajsnetiker thank you I plan on fixing mine Err well making it work again CamperBot @camperbot Feb 29 2016 06:02 anthonygallina1 sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles: :star: 298 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker Clifton Choiniere @crcnum4 Feb 29 2016 06:03 can't believe i got it working @ajsnetiker thanks for the recommendation I'll keep that in mind if i ever use an API that doesn't need headers. CamperBot @camperbot Feb 29 2016 06:03 crcnum4 sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles: :star: 299 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker anthonygallina1 @anthonygallina1 Feb 29 2016 06:07 @ajsnetiker this used to run http://codepen.io/anthonygallina/full/WQeZJE/ dociledevil @dociledevil Feb 29 2016 06:49 I just joined the course and I am kinda apprehensive Steven Cruz @itsstoiven Feb 29 2016 06:58 var array = [1, 12, 21, 2]; array.sort(function(a, b) { return a - b; }); can anyone help me understand how this sorts smallest to largest like what are the parameters a and b specifically doing for the var array Abdul Qoyyuum @Qoyyuum Feb 29 2016 07:00 When it was first triggered, the parameter a is arguing with parameter b using the sort function, it takes the first 2 data from the array array and compares so it compares 1 and 12, then 12 and 21, then 21 and 2 and so on and it repeats until it is done. Steven Cruz @itsstoiven Feb 29 2016 07:01 but the list is unordered so im assuming n^2 complexity? and just returns the smallest a? Abdul Qoyyuum @Qoyyuum Feb 29 2016 07:01 yes because it returned a - b Steven Cruz @itsstoiven Feb 29 2016 07:02 oh ok tyty Abdul Qoyyuum @Qoyyuum Feb 29 2016 07:02 I hope that makes sense Steven Cruz @itsstoiven Feb 29 2016 07:09 actually im still kinda confused Abdul Qoyyuum @Qoyyuum Feb 29 2016 07:09 hahaha Steven Cruz @itsstoiven Feb 29 2016 07:10 maybe a small example will help lets say function(40,100). The function calculates 40-100, and returns -60 (a negative value). so 40 will be lower Abdul Qoyyuum @Qoyyuum Feb 29 2016 07:10 uh, no it doesn't subtract anything But it does check which is bigger by subtracting Steven Cruz @itsstoiven Feb 29 2016 07:10 var array = [1, 12, 21, 2]; array.sort(function(a, b) { return a - b; }); it does subract? a = 40, b = 100 Abdul Qoyyuum @Qoyyuum Feb 29 2016 07:11 It does subtract as a way to check but after it does the check, it sorts. Steven Cruz @itsstoiven Feb 29 2016 07:11 sorry i dont follow uhhh what im trying to ask is how does it compare each values like for instance lets say Abdul Qoyyuum @Qoyyuum Feb 29 2016 07:12 So a = 1, b = 12, 1-12 = -11, so a < b, then b = 21, a - b = 1 - 21, which equals to - 20, etc If it checked that against all that its the lowest, it repeats with a second and third so on. Much like a loop and that's what the sort does. Kazadi K. @kazadi Feb 29 2016 07:14 @itsstoiven im not sure if i can post links… but you might want to try visualgo.com ; it helps for visualing algorithms Steven Cruz @itsstoiven Feb 29 2016 07:14 nvm Kazadi K. @kazadi Feb 29 2016 07:14 @itsstoiven they have one for sorting so you can see the actual process Steven Cruz @itsstoiven Feb 29 2016 07:14 I understand it now it just clicked haha i was thinking of it the wrong way thanks guys! @Qoyyuum tyvm Kazadi K. @kazadi Feb 29 2016 07:15 oops i meant .net but either way youve got it now lol Abdul Qoyyuum @Qoyyuum Feb 29 2016 07:15 no prob @itsstoiven :D Steven Cruz @itsstoiven Feb 29 2016 07:16 @kazadi ill def take a look at it too anyway haha Matt Burd @EskimoBurd Feb 29 2016 07:23 Been stuck (also very busy) with how to start and create my portfolio, its really tricky to me just even starting it. Abdul Qoyyuum @Qoyyuum Feb 29 2016 07:24 @EskimoBurd Need help? Roman Macak @DrMacak Feb 29 2016 08:02 Hi All! 曾苔眠 @alxtz Feb 29 2016 08:10 Hello Francis @Francis-p Feb 29 2016 08:11 some help! why is there a gap at the side of my navigation? http://codepen.io/Francis-p/pen/JXjqZO?editors=1000 Coy Sanders @coymeetsworld Feb 29 2016 08:14 what gap? Francis @Francis-p Feb 29 2016 08:16 the white space at contact me @coymeetsworld Coy Sanders @coymeetsworld Feb 29 2016 08:17 hmm i don't see it @Francis-p, im using Chrome looks like a solid gray bar left-to-right HTML looks fine to me Francis @Francis-p Feb 29 2016 08:18 @coymeetsworld hmm. alright! i will see to it again! thanks! CamperBot @camperbot Feb 29 2016 08:18 francis-p sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles: :star: 312 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld Coy Sanders @coymeetsworld Feb 29 2016 08:19 np Humphrey @Humphreto Feb 29 2016 08:20 Hello World!. Am back. CamperBot @camperbot Feb 29 2016 08:20 ## welcome to FreeCodeCamp @Humphreto! Humphrey @Humphreto Feb 29 2016 08:20 @DrMacak @fate412460 Hi Brian Phillips @unipheas Feb 29 2016 08:22 I'm trying to create a transparent img in gimp but it won't let me. I'm using a transparent img for the img element in the html so i can make a sprite with the css. Am I going about this the wrong way or is there a special way to make a transparent img? V Bhargav Chowdary @bhargav4 Feb 29 2016 08:30 Any clue why my second api isn't working $(document).ready(function(){
$.get("http://ipinfo.io", function(response) { var r = response;$('#coun').html(r.country);
$('#cit').html(r.city);$('#reg').html(r.region);
$('#loc').html(r.loc); }, "jsonp");$.get("api.openweathermap.org/data/2.5/weather?lat=35&lon=139&APPID=8ccd5c26658281d7e5879a2e7a390c4c",function(data){
$('#rt').html('a'); alert(sucess); },"json"); }); Coy Sanders @coymeetsworld Feb 29 2016 08:33 @bhargav4 need to specify http:// at beginning of URL V Bhargav Chowdary @bhargav4 Feb 29 2016 08:34 @coymeetsworld :smile: somehow missed that. Thanks CamperBot @camperbot Feb 29 2016 08:34 bhargav4 sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles: :star: 313 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld Claire Walker @kjarva Feb 29 2016 08:34 hey folks! So I've been trying to figure out for hours why my CSS styling isn't working on the div id "quote" and I just can't figure it out. What I want to be happening is that my quote is centered on screen and has a border box around it. I thought that's what I added to the CSS but it's not working. Can anyone make any suggestions as to what I'm doing wrong? http://codepen.io/kjarva/pen/EKxbdr Coy Sanders @coymeetsworld Feb 29 2016 08:34 np ran into same issuer earlier this week lol Cris Nagandang @louger143 Feb 29 2016 08:35 hi guys, I'm currently in mutation challenge. I already solved it but is there any other way to make my code shorter and efficient? function mutation(arr) { //First Solution for (var i=0;i<arr[1].length; i++) { if( arr[0].toLowerCase().indexOf(arr[1][i].toLowerCase()) == -1 ) return false; } return true; } Coy Sanders @coymeetsworld Feb 29 2016 08:36 @kjarva you need to specify a width for the quote div Claire Walker @kjarva Feb 29 2016 08:36 really, it was that simple? grrrrrr.... lol. Thanks @coymeetsworld ! CamperBot @camperbot Feb 29 2016 08:36 kjarva sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles: :star: 314 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld Coy Sanders @coymeetsworld Feb 29 2016 08:37 ya don't see anything else wrong Claire Walker @kjarva Feb 29 2016 08:41 yay! I just added a width to it and it's moved further over to the middle, it's still not centered but it's progress from where it was all the way over on the left ;) M.P. GIRISH @Girishmurali Feb 29 2016 08:43 <script>$(document).ready(function() {
$("button").addClass("animated");$(".btn").addClass("shake");
$("#target1").addClass("animated shake btn-primary") }); </script> Only add one class with each of your three selectors. what should i do ? Claire Walker @kjarva Feb 29 2016 08:43 and now it's centered - yippee!! Coy Sanders @coymeetsworld Feb 29 2016 08:45 gj @kjarva Claire Walker @kjarva Feb 29 2016 08:46 that all important 33.33% did it ;) V Bhargav Chowdary @bhargav4 Feb 29 2016 08:57 How do i access variables lon, lat outside the first get method. I declared them globally at the beginning but that didn't work var lat; var lon; var loc=[];$(document).ready(function(){
$.get("http://ipinfo.io", function(response) { var r = response;$('#coun').html(r.country);
$('#cit').html(r.city);$('#reg').html(r.region);
$('#loc').html(r.loc); loc = r.loc.split(','); lat = loc[0]; lon = loc[1]; }, "jsonp"); var url = "http://api.openweathermap.org/data/2.5/weather?lat="+lat+"&lon="+lon+"&APPID=8ccd5c26658281d7e5879a2e7a390c4c";$.get(url,function(data){
$('#main').html(data.weather[0].main);$('#des').html(data.weather[0].description);
},"json");

});
Steven Cruz
@itsstoiven
Feb 29 2016 08:59
have you tried
Justin Steele
@JustinSteele02
Feb 29 2016 09:03
https://gist.github.com/JustinSteele02/af0c2c55cd8daa281e32
The initialization code is in main.js:
$(document).ready(function() {$('#fullpage').fullpage();
});
Humphrey
@Humphreto
Feb 29 2016 09:07
@Girishmurali you still neeed help on you script??????
if so give me the link i will help
Humphrey
@Humphreto
Feb 29 2016 09:14
  $(document).ready(function() {$("#target1").css("color", "red");
$("#target1").prop("disabled", true);$("#target4").remove();
$("#target2").appendTo("#right-well");$("#target5").clone().appendTo("#left-well");
$("#target1").parent().css("background-color", "red");$("#right-well").children().css("background-color", "orange");
});
All children of #right-well should have orange text.
Can someone help me out on that
the code above is what i have type, but still it is not acceptable
baciualexandru
@baciualexandru
Feb 29 2016 09:15
Hello, i have a problem, can't go ..and i don't know what to do to pass

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

pink-text {
color: pink;
}

</style>

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

Your h1 element should have the class pink-text.
Your <style> should have a pink-text CSS class with its color set to pink.
Your h1 element should be pink.
Humphrey
@Humphreto
Feb 29 2016 09:17
@baciualexandru your missing the period. change this .pink-text { color: pink; } to thiss.pink-text { color: pink; }
baciualexandru
@baciualexandru
Feb 29 2016 09:17
problem solved..i've forgot the dot
@Humphreto thanks!
CamperBot
@camperbot
Feb 29 2016 09:17
baciualexandru sends brownie points to @humphreto :sparkles: :thumbsup: :sparkles:
:star: 131 | @humphreto | http://www.freecodecamp.com/humphreto
M.P. GIRISH
@Girishmurali
Feb 29 2016 09:17

<script>
$(document).ready(function() {$("#target1").css("color", "red");

});
</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>

what should i do ?
Humphrey
@Humphreto
Feb 29 2016 09:18
Humphrey
@Humphreto
Feb 29 2016 09:21
@Girishmurali here is what i did and it accepted
  $(document).ready(function() {$("#target1").css("color", "red");
$("#target4").html("<i>#target4</i>"); }); </script> give me feedback if it works M.P. GIRISH @Girishmurali Feb 29 2016 09:22 it did mate thanks a ton Humphrey @Humphreto Feb 29 2016 09:23 :smiley: SuhasHosamani @SuhasHosamani Feb 29 2016 09:28 Hi All has any1 done "Record Collection"???? in that first condition im not able to achieve rest i did..... Humphrey @Humphreto Feb 29 2016 09:31 @SuhasHosamani i dont understand your question. do you mean undo your code? SuhasHosamani @SuhasHosamani Feb 29 2016 09:32 @Humphreto // Setup var collection = { 2548: { album: "Slippery When Wet", artist: "Bon Jovi", tracks: [ "Let It Rock", "You Give Love a Bad Name" ] }, 2468: { album: "1999", artist: "Prince", tracks: [ "1999", "Little Red Corvette" ] }, 1245: { artist: "Robert Palmer", tracks: [ ] }, 5439: { album: "ABBA Gold" } }; // Keep a copy of the collection for tests var collectionCopy = JSON.parse(JSON.stringify(collection)); // Only change code below this line function update(id, prop, value) { if(value === ""){ delete collection[id][prop]; }else{ collection[id][prop].push(value); } return collection; } // Alter values below to test your code update(5439, "artist", "ABBA"); Humphrey @Humphreto Feb 29 2016 09:32 Nope . i aint good with JavaScripts JS savaj @savaj Feb 29 2016 09:33 ( ! ) Parse error: syntax error, unexpected 'App' (T_STRING), expecting ']' in E:\wamp\www\test\config\app.php on line 167 Call Stack # Time Memory Function Location 1 0.0010 240744 {main}( ) ..\index.php:0 2 0.0630 3855544 Illuminate\Foundation\Http\Kernel->handle( ) ..\index.php:54 3 0.0630 3855760 Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter( ) ..\Kernel.php:99 4 0.0640 3894744 Illuminate\Foundation\Http\Kernel->bootstrap( ) ..\Kernel.php:127 5 0.0640 3894912 Illuminate\Foundation\Application->bootstrapWith( ) ..\Kernel.php:232 6 0.0700 4031680 Illuminate\Foundation\Bootstrap\LoadConfiguration->bootstrap( ) ..\Application.php:203 7 0.0710 4063624 Illuminate\Foundation\Bootstrap\LoadConfiguration->loadConfigurationFiles( ) ..\LoadConfiguration.php:38 error on the execute the code on the wamp laravel. anyone help me. Alexander Louiciano @louiciano Feb 29 2016 09:50 Hello, anyone know, how do I change the view to text editor, instead mobile phone view? Joumana @JoumanaE Feb 29 2016 10:12 Hello world CamperBot @camperbot Feb 29 2016 10:12 ## welcome to FreeCodeCamp @JoumanaE! mangesh1413 @mangesh1413 Feb 29 2016 10:18 Nest your first image and your h2 element within a single <div class="row"> element. Nest your h2 element within a <div class="col-xs-8"> and your image in a <div class="col-xs-4"> so that they are on the same line. Whats wrong here? <div calss="row"> <div class="col-xs-8"> <h2 class="text-primary text-center">CatPhotoApp</h2></div> <div class="col-xs-4"> <a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a></div> </div> Randy @techtolentino Feb 29 2016 10:25 Div calss. mangesh1413 @mangesh1413 Feb 29 2016 10:25 what about it? Randy @techtolentino Feb 29 2016 10:25 Should be class mangesh1413 @mangesh1413 Feb 29 2016 10:26 ohw thanks man cheers Randy @techtolentino Feb 29 2016 10:26 Sure V Bhargav Chowdary @bhargav4 Feb 29 2016 10:30 mangesh1413 @mangesh1413 Feb 29 2016 10:36 Add a div element with the class well inside each of your div elements with the class "col-xs-6" Nest both of your div elements with the class "col-xs-6" within your div element with the class "row". Make sure all your div elements have closing tags. <div class="container-fluid"> <h3 class="text-primary text-center">jQuery Playground</h3> <div class="row"> <div class="col-xs-6 well"></div> <div class="col-xs-6 well"></div> </div> </div> Help me out guys CamperBot @camperbot Feb 29 2016 10:37 no wiki entry for: me out guys mangesh1413 @mangesh1413 Feb 29 2016 10:37 Add a div element with the class well inside each of your div elements with the class "col-xs-6"Add a div element with the class well inside each of your div elements with the class "col-xs-6" Laurens Brand @laurensbrand Feb 29 2016 10:37 Hi, i hope someone is able to help me with the following: i need to sort an numerical array in coffeescript Donnie Lee @Mrdonnie1 Feb 29 2016 10:37 Hi, can someone tell me why <p>Click here for <a #="http://www.freecatphotoapp.com">cat photos</a>.</p> is not a dead link? Randy @techtolentino Feb 29 2016 10:38 @mangesh1413 <div class="col-xs-6 well"></div> should be <div class="col-xs-6"> well</div>, I think mangesh1413 @mangesh1413 Feb 29 2016 10:38 <p>Click here for <a href="#">cat photos</a>.</p> cannelflow @cannelflow Feb 29 2016 10:38 @Mrdonnie1 make dead link like this <a href="#"></a> Donnie Lee @Mrdonnie1 Feb 29 2016 10:39 oh ok thank you! mangesh1413 @mangesh1413 Feb 29 2016 10:39 @techtolentino nope it isnt it Randy @techtolentino Feb 29 2016 10:43 oops, try this <div class="container-fluid"> <h3 class="text-primary text-center">jQuery Playground</h3> <div class="row"> <div class="col-xs-6"> <div class="well"></div> </div> <div class="col-xs-6"> <div class="well"></div> </div> </div> </div> you need a div with the class well, nested inside Daniyal @danyalasif Feb 29 2016 10:45 Hello World! CamperBot @camperbot Feb 29 2016 10:45 ## welcome to FreeCodeCamp @codeInjection! Daniyal @danyalasif Feb 29 2016 10:46 I like this. Humphrey @Humphreto Feb 29 2016 10:46 @mangesh1413 is the problem solved? Laurens Brand @laurensbrand Feb 29 2016 11:01 I was able to get to work using this website http://js2.coffee Daniyal @danyalasif Feb 29 2016 11:03 What kinda work? John McKeag @macmurdo Feb 29 2016 11:05 Just joined up. Hope to get some input soon. akila2048 @akila2048 Feb 29 2016 11:08 hi guys, I joined today to fcc have small problem while doing the excercises, can anyone tell me what's wrong in this code, <style> .red-text { color: red; font-size=16px; } </style> akhilesh kapoor @akhikapoor Feb 29 2016 11:10 hello world CamperBot @camperbot Feb 29 2016 11:10 ## welcome to FreeCodeCamp @akhikapoor! V Bhargav Chowdary @bhargav4 Feb 29 2016 11:11 Can i add my fcc projects to my Github? Vishnu Dileesh @VishnuDileesh Feb 29 2016 11:12 @akila2048 what was the excercise meant to do? akila2048 @akila2048 Feb 29 2016 11:12 @VishnuDileesh Change the Font Size of an Element anthonygallina1 @anthonygallina1 Feb 29 2016 11:12 hello @akhikapoor Welcome to the Free Code Camp community. FavoriteFave @FavoriteFave Feb 29 2016 11:13 what do i do wrong here ? function rot13(str) { // LBH QVQ VG! var Alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; var upper = str.toUpperCase(); var newArr=[]; for(var i = 0; i < str.length; i++){ var match = str.charAt(i); for(var j = 0; j < Alphabet.length; j++){ if(match === Alphabet[j]){ j += 13; if(j > 26){ j = j % 26; var match2 = Alphabet[j]; newArr.push(match2); } else{ var match3 = Alphabet[j]; newArr.push(match3); } } } } return newArr; } // Change the inputs below to test rot13("SERR PBQR PNZC"); anthonygallina1 @anthonygallina1 Feb 29 2016 11:13 @akhikapoor How are you? akila2048 @akila2048 Feb 29 2016 11:13 "Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%. " it fails in this step Vishnu Dileesh @VishnuDileesh Feb 29 2016 11:14 its the = sign, the code should be font-size: 16px; akila2048 @akila2048 Feb 29 2016 11:16 thanks, but still problem persist.. is their anything to do with text zoom 100% V Bhargav Chowdary @bhargav4 Feb 29 2016 11:16 @FavoriteFave What error are you getting? FavoriteFave @FavoriteFave Feb 29 2016 11:17 @bhargav4 potential infinite loop or just an empty array Vishnu Dileesh @VishnuDileesh Feb 29 2016 11:17 may be you should add the font-size: 16px; to a p selector. like this: p{ font-size: 16px;} Daniyal @danyalasif Feb 29 2016 11:17 I need a point to start at akila2048 @akila2048 Feb 29 2016 11:18 @VishnuDileesh Thanks, it solved the problem CamperBot @camperbot Feb 29 2016 11:18 akila2048 sends brownie points to @vishnudileesh :sparkles: :thumbsup: :sparkles: :star: 155 | @vishnudileesh | http://www.freecodecamp.com/vishnudileesh Vishnu Dileesh @VishnuDileesh Feb 29 2016 11:19 Welcome @akila2048 :smile: V Bhargav Chowdary @bhargav4 Feb 29 2016 11:23 @FavoriteFave you are changing j value inside a for loop which iterates using j. copy j value and assign it to new variable FavoriteFave @FavoriteFave Feb 29 2016 11:24 @bhargav4 thanks a lot man! solved the infinite loop problem :D CamperBot @camperbot Feb 29 2016 11:24 favoritefave sends brownie points to @bhargav4 :sparkles: :thumbsup: :sparkles: :star: 290 | @bhargav4 | http://www.freecodecamp.com/bhargav4 V Bhargav Chowdary @bhargav4 Feb 29 2016 11:30 @FavoriteFave glad to know. Have you considered for the spaces in the input? FavoriteFave @FavoriteFave Feb 29 2016 11:33 @bhargav4 i'm looking into that right now as well as for the other special characters V Bhargav Chowdary @bhargav4 Feb 29 2016 11:33 ok good luck João Fernandes @joaofnds Feb 29 2016 11:36 @coymeetsworld http://codepen.io/joaofnds/full/wGvYzN/ it's not how i wanted to be, but at least works! hahahaha XD Aleksander Gębicki @Takumar Feb 29 2016 11:40 @lilgcheng you should have only one link: <a href="http://www.freecatphotoapp.com"> in your code. The best would be using "Reset" button for now. Nest this link inside a paragraph, and add only "View more " text to your paragraph (at the beginning). dbCheng @lilgcheng Feb 29 2016 11:43 @Takumar thx I will try it CamperBot @camperbot Feb 29 2016 11:43 lilgcheng sends brownie points to @takumar :sparkles: :thumbsup: :sparkles: :star: 2486 | @takumar | http://www.freecodecamp.com/takumar Aleksander Gębicki @Takumar Feb 29 2016 11:44 @lilgcheng try again and ask once more, in any trouble :-) Ben McMullan @benmcm1994 Feb 29 2016 11:46 Hi, I need help with some Jquery. I'm told to add one class for each selector but I have an error. Can someone help? <script>$(document).ready(function() { $("button").addClass("animated");$(".btn").addClass("animated shake"); $("#target1").addClass("btn-primary"); }); </script> pls Aleksander Gębicki @Takumar Feb 29 2016 11:50 @benmcm1994 as you were asked, add only one class at a time. Here: $(".btn").addClass("animated shake"); you have added two classes. You have added animated class to the button earlier, so there is no need to add it again!
Ben McMullan
@benmcm1994
Feb 29 2016 11:50
yeah i thought animated shake was one class but apparently its two :)
Aleksander Gębicki
@Takumar
Feb 29 2016 11:52
@benmcm1994 also, use three backticks when you are passing block of code, it is easier to check:
<script>
$(document).ready(function() {$("button").addClass("animated");
$(".btn").addClass("shake");$("#target1").addClass("btn-primary");
});
</script>
Ben McMullan
@benmcm1994
Feb 29 2016 11:54
ok cheers!
96street
@96street
Feb 29 2016 11:57
i thought match, relpace, spit etc. were built-in methods, not RegExp's?
Can someone clear up
Liam Bang
@Liam345
Feb 29 2016 12:00
MDN states this as the code line to convert argument into an array
var args = (arguments.length === 1?[arguments[0]]:Array.apply(null, arguments));
Do you know what is the significance of each of the parts of the code. For e.g..
Why are we using arguments.length === 1?
etc
Vishnu Dileesh
@VishnuDileesh
Feb 29 2016 12:02
how to store image in html 5 session storage?
Coy Sanders
@coymeetsworld
Feb 29 2016 12:04
looks good to me @joaofnds gj
Aleksandra Masiukevych
@amasiukevych
Feb 29 2016 12:04
Hey everyone, could someone look at my "Golf Code" chunk because I can't get if I have a mistake or there is a bug . The problem is: I am passing all tests except of the "Hole-in-one", but in a compiller I actually see that it returns "Hole-in-one":
function golfScore(par, strokes) {
if (strokes === 1) {
return "Hole-in-one";
} else if (strokes <= par - 2) {
return "Eagle";
} else if (strokes === par - 1) {
return "Birdie";
} else if (strokes === par) {
return "Par";
} else if (strokes === par + 1) {
return "Bogey";
} else if (strokes === par + 2) {
return "Double Bogey";
} else if (strokes >= par + 3) {
return "Go Home!";
}
}

golfScore(4, 1);
Coy Sanders
@coymeetsworld
Feb 29 2016 12:05
missing the exclaimation point @amasiukevych :)
should be "Hole-in-one!"
Arend Groot Bleumink
@arendgb
Feb 29 2016 12:17

$(".target: nth-child(2)").addClass=("animated bounce"); }); The task is The second element in your target elements should bounce What did I do wrong? js$(".target: nth-child(2)").addClass=("animated bounce");
});

The second element in your target elements should bounce

What did I do wrong?

js $(".target: nth-child(2)").addClass=("animated bounce"); }); The task is The second element in your target elements should bounce What did I do wrong? Vishnu Dileesh @VishnuDileesh Feb 29 2016 12:18 @arendgb i think you should use the parent of the .target as the selector savaj @savaj Feb 29 2016 12:18 this is wrong statement my bro$(".target: nth-child(2)").addClass("animated bounce");
});
try this.
Vishnu Dileesh
@VishnuDileesh
Feb 29 2016 12:26
how to store image in html5 sessionStorage?
Aleksander Gębicki
@Takumar
Feb 29 2016 12:32
@arendgb you don't need = equals character.
$(".target: nth-child(2)").addClass("animated bounce"); Yong @milfordyg Feb 29 2016 12:38 may i know how u ppl post code in that black background? Blauelf @Blauelf Feb 29 2016 12:38 Either ".target:nth-child(2)" or ".target :nth-child(2)", but not ".target: nth-child(2)". The first two are different (the nth-child in the first applies to the .target itself, in the second it's the children or grandchildren and so on that are tested for nth-child) help format CamperBot @camperbot Feb 29 2016 12:38 ## :point_right: code formatting [wiki] ### Inline code This an inline <paste code here> code formatting with a single backtick() at start and end around the code. ### Code Block js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css) <paste your code here>, then press [shift + enter ⏎]  ⇦ Type 3 backticks, then press [enter ⏎] See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics Yong @milfordyg Feb 29 2016 12:39 hello world CamperBot @camperbot Feb 29 2016 12:39 ## welcome to FreeCodeCamp @dogis! Yong @milfordyg Feb 29 2016 12:39 thanks mangesh1413 @mangesh1413 Feb 29 2016 12:39 <div class="container-fluid"> <h3 class="text-primary text-center">jQuery Playground</h3> <div class="row"> <div class="col-xs-6"> <div class="well"> <button class="btn"></button> <button class="btn"></button> <button class="btn"></button> </div> </div> <div class="col-xs-6"> <div class="well"> <button class="btn"></button> <button class="btn"></button> <button class="btn"></button> </div> </div> </div> </div>  Yong @milfordyg Feb 29 2016 12:40 <p>Hello World </p> Aleksander Gębicki @Takumar Feb 29 2016 12:41 @mangesh1413 does number of closing </div> matches opening <div> in your code? Also start your code with three backticks to format it:  your code  mangesh1413 @mangesh1413 Feb 29 2016 12:42 @Takumar I passed it Thanks Aleksander Gębicki @Takumar Feb 29 2016 12:42 @dogis welcome :-) Yong @milfordyg Feb 29 2016 12:42 thanks @Takumar CamperBot @camperbot Feb 29 2016 12:42 dogis sends brownie points to @takumar :sparkles: :thumbsup: :sparkles: :star: 2488 | @takumar | http://www.freecodecamp.com/takumar Ali @UmutAlihan Feb 29 2016 12:48 int main(void) { printf("Hello, World!\n"); } reutrn 0; cannelflow @cannelflow Feb 29 2016 12:49 @UmutAlihan :+1: Mufaddal B @invinciblemuffi Feb 29 2016 12:49 function fearNotLetter(str) { var charCodes = [], compareCodes=[], xy,zx; var first = str.charCodeAt(0); var last = str.charCodeAt(str.length-1); var str1 = str.split(''); for(var x=first; x<=last; x++) { compareCodes.push(x); } str1.forEach(function(strChar) { charCodes.push(strChar.charCodeAt(0)); }); for(var i=0; i<charCodes.length; i++) { if(charCodes.indexOf(compareCodes[i]) === -1) { str = String.fromCharCode(compareCodes[i]); } else {str = undefined;} } return str; } fearNotLetter("abcdefghjklmno"); For this the expected output is "i", which is what I am getting, still the test does not pass. mangesh1413 @mangesh1413 Feb 29 2016 12:50 c programming language ? Any one got wordpress projects to complete, I can help you? Blauelf @Blauelf Feb 29 2016 12:52 @invinciblemuffi You could insta-return String.fromCharCode(compareCodes[i]); in your loop instead of setting str, remove the else path and the last return statement. Mufaddal B @invinciblemuffi Feb 29 2016 12:53 As per the challenge if all charCodes match then i have to return undefined so cant skip else Blauelf @Blauelf Feb 29 2016 12:54 Why not? Keep undefined as the default, and return something else otherwise. return; or not returning and still reaching the end of the function is both equivalent to return undefined;, so you could choose any of these three, and return on mismatch in your loop. Ross @rossfaarley Feb 29 2016 12:55 hey folks.. i’m having issues with a collapsible nav bar on my portfolio project. it won’t open, any ideas what I may have done wrong or forgotten http://codepen.io/rossfarley/full/ONJwmM/ Mufaddal B @invinciblemuffi Feb 29 2016 12:56 @Blauelf : Let me try. @Blauelf : I didnt understand how to go about this. Should i write 2 return statement sin my for loop Blauelf @Blauelf Feb 29 2016 12:58 @invinciblemuffi 1 return statement in your loop, just where you set str to String.fromCharCode(compareCodes[i]). One optional return; or return undefined; after. Mufaddal B @invinciblemuffi Feb 29 2016 12:58 It passed I would like to understand upon this concept a little more, can u please explain me in more detail Enrico Mattiazzi @emattiazzi Feb 29 2016 13:00 is there a way to solve the palindrome exercise without a loop? elyazzi @elyazzi Feb 29 2016 13:00 Hello, I am having the issue that my 4th and 5th div aren't sliding down and I can't figure out why. It should be the exact same code. http://codepen.io/elyazzi/pen/reNwdr Blauelf @Blauelf Feb 29 2016 13:00 @invinciblemuffi The concept basically is returning as soon as you have nothing left to do and know the answer you want to return. Mufaddal B @invinciblemuffi Feb 29 2016 13:01 Great, understood, Thanks. Also can u give me some tips on my code, how can I write it more efficiently. Blauelf @Blauelf Feb 29 2016 13:02 @emattiazzi Of course there is, though it needs some sort of loops (but these can be pretty implicit). Where do you have that loop you want to get rid of? Mufaddal B @invinciblemuffi Feb 29 2016 13:03 Right now I am using 3 loops, how can I reduce that by using the prototype methods like filter, reduce and others. Enrico Mattiazzi @emattiazzi Feb 29 2016 13:03 @Blauelf currently I don't have a loop. I only did this: str.replace(/\W/gi, "" ).toLowerCase(); Blauelf @Blauelf Feb 29 2016 13:04 @emattiazzi You remember http://www.freecodecamp.com/challenges/reverse-a-string ? One does not need a loop for that (though one could use one). Enrico Mattiazzi @emattiazzi Feb 29 2016 13:04 Blauelf @Blauelf Feb 29 2016 13:05 You'll have to reverse your sanitized string, so that's why I'm linking reverse-a-string. Bastian B. @DeXtr0niC Feb 29 2016 13:05 Hey people, I am struggling with the Profile Lookup on the map. All tests run fine except the (Bob, number) which should return "No such contact". If i implement the necessary if-statement, my other tests are not validating anymore. Enrico Mattiazzi @emattiazzi Feb 29 2016 13:05 @Blauelf Ok, I will try Blauelf @Blauelf Feb 29 2016 13:05 @DeXtr0niC Put the return "No such contact"; after your loop, outside. You'll only reach that point if none of the names matched. Bastian B. @DeXtr0niC Feb 29 2016 13:06 var contacts = [ { "firstName": "Akira", "lastName": "Laine", "number": "0543236543", "likes": ["Pizza", "Coding", "Brownie Points"] }, { "firstName": "Harry", "lastName": "Potter", "number": "0994372684", "likes": ["Hogwarts", "Magic", "Hagrid"] }, { "firstName": "Sherlock", "lastName": "Holmes", "number": "0487345643", "likes": ["Intriguing Cases", "Violin"] }, { "firstName": "Kristian", "lastName": "Vos", "number": "unknown", "likes": ["Javascript", "Gaming", "Foxes"] } ]; function lookUp(firstName, prop){ // Only change code below this line for(var i = 0; i<contacts.length;i++){ if(contacts[i].firstName == firstName){ if(contacts[i].hasOwnProperty(prop)){ return contacts[i][prop]; } else { return "No such property"; } } } // Only change code above this line } // Change these values to test your function lookUp("Akira", "likes"); PratsBhatt @PratsBhatt Feb 29 2016 13:06 Hello World CamperBot @camperbot Feb 29 2016 13:06 ## welcome to FreeCodeCamp @PratsBhatt! cannelflow @cannelflow Feb 29 2016 13:08 welcome @PratsBhatt Bastian B. @DeXtr0niC Feb 29 2016 13:08 why can´t I put it inside the for loop? shouldn´t it work that way too? Enrico Mattiazzi @emattiazzi Feb 29 2016 13:08 @Blauelf Ok, but I sanitize, I reverse the string and I still need a loop to check untile array.length/2. Right? PratsBhatt @PratsBhatt Feb 29 2016 13:08 Thank you Blauelf @Blauelf Feb 29 2016 13:08 @emattiazzi You can check if two strings are equal using == Enrico Mattiazzi @emattiazzi Feb 29 2016 13:09 @Blauelf right Blauelf @Blauelf Feb 29 2016 13:09 so something like return sanitized = reverse(sanitized); works without a loop (though instead of reversing, a loop is a bit faster) Bastian B. @DeXtr0niC Feb 29 2016 13:09 @Blauelf thx helps and works. But still wondering why i can't place it inside the loop. Does a for-loop stop iterating when returning inside a function? CamperBot @camperbot Feb 29 2016 13:09 dextr0nic sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles: :star: 1315 | @blauelf | http://www.freecodecamp.com/blauelf Blauelf @Blauelf Feb 29 2016 13:10 @DeXtr0niC When should you tell "No such contact"? When you have asked them all. Bastian B. @DeXtr0niC Feb 29 2016 13:11 @Blauelf silly me, you're right haha. Danke ;) Blauelf @Blauelf Feb 29 2016 13:11 Of course, return stops a loop, as it ends execution of the current function. Does not care about loops. gts00k @gts00k Feb 29 2016 13:19 This message was deleted This message was deleted This message was deleted Tilen Pogačnik @TilenPogacnik Feb 29 2016 13:20 @gts00k Try reading documentation for match(), I think it returns an array of matches @gts00k and you are comparing it to true with === operator gts00k @gts00k Feb 29 2016 13:21 @TilenPogacnik bb Tilen Pogačnik @TilenPogacnik Feb 29 2016 13:22 if ( str.match(your regex here).length > 0) I think this would work better guilherme @wwwjsw Feb 29 2016 13:22 I can't post code here? or is not a god ideia? just to know! Mufaddal B @invinciblemuffi Feb 29 2016 13:22 @Blauelf : In my code that i pasted, as return str, why were the other 3 tests passing and only one was failing even though the code was returning the value expected correctly And then just by removing else part, the last test also passed, can you please explain what is the difference in my code and the one you suggested gts00k @gts00k Feb 29 2016 13:25 @TilenPogacnik solved it Mohamed Hagag @HagagEmpire Feb 29 2016 13:26 Only add one class with each of your three selectors. <script>$(document).ready(function() {
$("button").addClass("animated")$(".btn").addClass("shake")
$("#target1") }); </script> gts00k @gts00k Feb 29 2016 13:27 @TilenPogacnik Mohamed Hagag @HagagEmpire Feb 29 2016 13:27 help guys xD gts00k @gts00k Feb 29 2016 13:27 vowelsAndConsonants = s => { var v = []; var c = []; for(var i =0; i<s.length; i++){ s[i].match(/[a,e,i,o,u]/ig) ? v.push(s[i]) : c.push(s[i]); } console.log(v.concat(c).join('\n')); } CamperBot @camperbot Feb 29 2016 13:27 no wiki entry for: guys xd elyazzi @elyazzi Feb 29 2016 13:28 This message was deleted Blauelf @Blauelf Feb 29 2016 13:28 @invinciblemuffi That code would work if either the return value should be undefined, or if the missing letter is missing just before the last one. Using  str = undefined; for(var i = charCodes.length; i; i--) { if(charCodes.indexOf(compareCodes[i]) === -1) { str = String.fromCharCode(compareCodes[i]); } } return str; should work, too, as it will go backwards and the last assignment will be the first mismatch instead of the last. Mohamed Hagag @HagagEmpire Feb 29 2016 13:29 <script>$(document).ready(function() {
$("button").addClass("animated")$(".btn").addClass("shake")
$("#target1") }); </script> i fixed it thanks guys elyazzi @elyazzi Feb 29 2016 13:29 This message was deleted Mufaddal B @invinciblemuffi Feb 29 2016 13:32 @Blauelf : Thank You :+1: CamperBot @camperbot Feb 29 2016 13:32 invinciblemuffi sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles: :star: 1316 | @blauelf | http://www.freecodecamp.com/blauelf Nick Dalley @yellad Feb 29 2016 13:48 hello world! CamperBot @camperbot Feb 29 2016 13:48 ## welcome to FreeCodeCamp @yellad! chan @fundchan Feb 29 2016 13:54 Hello everyone guilherme @wwwjsw Feb 29 2016 13:54 yo Keith Wildridge @krwildridge Feb 29 2016 13:57 hello world! CamperBot @camperbot Feb 29 2016 13:57 ## welcome to FreeCodeCamp @krwildridge! Wilson Han @wi0821 Feb 29 2016 13:59 hello world CamperBot @camperbot Feb 29 2016 13:59 ## welcome to FreeCodeCamp @wi0821! Enrico Mattiazzi @emattiazzi Feb 29 2016 13:59 Hi, I am doing the palindrome challenge. My code is: function palindrome(str) { // Good luck! var sanitized = str.replace(/[^a-zA-z0-9]+/gi, "" ).toLowerCase(); return sanitized === sanitized.split("").reverse().join(""); } but it doesn't work for the last test: palindrome("0_0 (: /-\ :) 0-0") why? I also tried with str.replace(/\W/gi, "" ) Rafael Martins @RafaelMartins10 Feb 29 2016 14:10 Hello, a need help, my exemple is 43 "Set the ID of an Element" a not add element of my form V Bhargav Chowdary @bhargav4 Feb 29 2016 14:12 @emattiazzi is the last test a palindrome? 0_0......0-0 Enrico Mattiazzi @emattiazzi Feb 29 2016 14:13 @bhargav4 no but my code returns true, because it doesn't pass the test sorry, it returns false and is palindrome V Bhargav Chowdary @bhargav4 Feb 29 2016 14:14 @emattiazzi I think it's a bug.. or we should consider - and _ to be same .. only then its a plaindrome @emattiazzi I too got struck there. I considered - and _ to be same and fooled the bot to return true for that condition Markus Kiili @Masd925 Feb 29 2016 14:16 Non-alphanumeric characters (-_ etc.) should be removed before palindromicality check. V Bhargav Chowdary @bhargav4 Feb 29 2016 14:17 @Masd925 :smile: ha ha didn't knew that Enrico Mattiazzi @emattiazzi Feb 29 2016 14:17 @Masd925 but /[^a-zA-z0-9]+/gi should remove non-alphanumeric Blauelf @Blauelf Feb 29 2016 14:18 @emattiazzi A-z takes more than you think, also includes [\]^_ Enrico Mattiazzi @emattiazzi Feb 29 2016 14:18 @Blauelf I also tried with \W and I wrote [^a-zA-z0-9] so it should not consider [ ]^_ Jacob Boykin @jacobboykin Feb 29 2016 14:18 Hi everyone! I'm getting a TypeError in the JavaScript Stand in Line challenge: function queue(arr, item) { // Your code here arr += item; firstElement = arr.shift(); return firstElement; // Change this line } "TypeError: arr.shift is not a function" I double checked the MDN and I don't see how I'm using the function incorrectly. Anyone have any thoughts? Blauelf @Blauelf Feb 29 2016 14:19 @emattiazzi \W does not include underscore, so did you try [\W_] or \W|_? Enrico Mattiazzi @emattiazzi Feb 29 2016 14:19 @Blauelf \W|_ works but I don't get why Blauelf @Blauelf Feb 29 2016 14:19 @jacobboykin Adding to an array converts the array to string. Use arr.push(item) Jacob Boykin @jacobboykin Feb 29 2016 14:20 @Blauelf Ah, that makes sense. Thank you! :D CamperBot @camperbot Feb 29 2016 14:20 jacobboykin sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles: :star: 1317 | @blauelf | http://www.freecodecamp.com/blauelf Blauelf @Blauelf Feb 29 2016 14:20 @emattiazzi Matches anything in \W (all that is neither alphanumeric nor underscore) or underscore. Enrico Mattiazzi @emattiazzi Feb 29 2016 14:22 @Blauelf Ok, but why [a-zA-Z0-9] doesn't work? It should not get other characters. btw thanks Blauelf @Blauelf Feb 29 2016 14:23 @emattiazzi [^a-zA-Z0-9] works. But you wrote A-z (which includes the six punctuation characters) Enrico Mattiazzi @emattiazzi Feb 29 2016 14:23 @Blauelf Oh! right! Thanks! CamperBot @camperbot Feb 29 2016 14:23 emattiazzi sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles: :star: 1318 | @blauelf | http://www.freecodecamp.com/blauelf Tilen Pogačnik @TilenPogacnik Feb 29 2016 14:27 What does the argument "arr" mean in this function: function destroyer(arr) { } if it's called like this: destroyer([1, 2, 3, 1, 2, 3], 2, 3); does it mean only the first argument that we passed to the function? Markus Kiili @Masd925 Feb 29 2016 14:28 @TilenPogacnik Yes. There is only one parameter arr and it catches the first passed argument. Use arguments object for the extra arguments. suchamessi10 @suchamessi10 Feb 29 2016 14:29 Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%. Tilen Pogačnik @TilenPogacnik Feb 29 2016 14:30 @Masd925 Thanks. I spent an hour trying to get second and third arguments with arr[1] and arr[2] xD CamperBot @camperbot Feb 29 2016 14:30 tilenpogacnik sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles: :star: 1101 | @masd925 | http://www.freecodecamp.com/masd925 suchamessi10 @suchamessi10 Feb 29 2016 14:30 Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%. What does it mean.?? V Bhargav Chowdary @bhargav4 Feb 29 2016 14:33 In your css p should have font-size:16px . Browser and text zoom is your browser settings. Nothing to do with your code. Aleksandra Masiukevych @amasiukevych Feb 29 2016 14:37 @coymeetsworld ahaha thank you so much, with the exclamation point it works! CamperBot @camperbot Feb 29 2016 14:37 amasiukevych sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles: :star: 315 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld Shawn @seancyw Feb 29 2016 14:39 can someone help me on the challenge 87? <button type="input" class ="btn btn-primary" ><i class="fa fa-paper-plane"></i>Submit</button> </form> the requirements are as follows:Give the submit button in your form the classes btn btn-primary. Add a <i class="fa fa-paper-plane"></i> within your submit button element. Give the text input in your form the class form-control. What did I miss here? naassi @naassi Feb 29 2016 14:42 Anyone had problems using navigator.geolocation in chrome ? V Bhargav Chowdary @bhargav4 Feb 29 2016 14:43 @naassi It didn't work for me. I might have done it wrong. I used ipinfo instead Chris Davis @chrisdav6 Feb 29 2016 14:47 @seancyw did you add... <form class="form-control" action="someAction"> also, i think the type for the button should be <button type="submit"> naassi @naassi Feb 29 2016 14:48 @bhargav4$.getJSON('http://ipinfo.io', function(data){
console.log(data)
})
How did you get the current ip ?
Feb 29 2016 14:49
Is there a way to get basic vim-like editing in FCC editor?
V Bhargav Chowdary
@bhargav4
Feb 29 2016 14:50
@naassi data.ip
you can get data.city data.region data.country data.loc also
This is the JSON format
{
"ip": "8.8.8.8",
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.3860,-122.0838",
"postal": "94040"
}
Jack Heaton
@LikeClockwork
Feb 29 2016 14:54
Anyone else have it where one of your pens refuse to run javascript?
Tilen Pogačnik
@TilenPogacnik
Feb 29 2016 14:54
How can I reliably retrieve the second and third arguments?

function destroyer(arr) {
// Remove all the values
var args = Array.prototype.slice.call(arguments, 1);
console.log(args);
this is how I'm trying to do it now
naassi
@naassi
Feb 29 2016 14:54
@bhargav4 Should just using $.getJSON('http://ipinfo.io', function(data){ console.log(data) }) return the ip of the ip your using ? Tilen Pogačnik @TilenPogacnik Feb 29 2016 14:55 oh nevermind, that works Jack Heaton @LikeClockwork Feb 29 2016 14:55 I've even tried deleting everything except for a console.log("test"); on doc ready and it does nothing. Shawn @seancyw Feb 29 2016 14:55 @chrisdav6 <button class ="btn btn-primary"><form class="form-control" action = "someaction"></form><i class="fa fa-paper-plane"></i>Submit</button> naassi @naassi Feb 29 2016 14:55 The ip im getting is in waltham cross? Markus Kiili @Masd925 Feb 29 2016 14:55 @TilenPogacnik That works. Slicing arguments has some optimization problems, so doing the same with a for loop is preferred over that slice.call way. V Bhargav Chowdary @bhargav4 Feb 29 2016 14:55 @naassi NO, data.ip data gives a whole set of information i just posted above for ip type data.ip Shawn @seancyw Feb 29 2016 14:56 @chrisdav6 I modified the code, but it seems that it still does not meet the requirement V Bhargav Chowdary @bhargav4 Feb 29 2016 14:58 @seancyw Whats the title of the exercise? naassi @naassi Feb 29 2016 14:58 Yea @bhargav4 I understand how to access the data object, i just wasnt sure if the first argument is ipinfo.io because it was giving an ip in london, but it must be the network im using ? Thanks that really helps, couldnt understand why it wasnt working CamperBot @camperbot Feb 29 2016 14:58 naassi sends brownie points to @bhargav4 :sparkles: :thumbsup: :sparkles: :star: 291 | @bhargav4 | http://www.freecodecamp.com/bhargav4 Shawn @seancyw Feb 29 2016 14:59 @bhargav4 Style Text Inputs as Form Controls V Bhargav Chowdary @bhargav4 Feb 29 2016 15:00 @seancyw for <input> tag have you given the class form-control? Jack Heaton @LikeClockwork Feb 29 2016 15:01 Could someone look at this and tell me if it is running JavaScript for you? It's stopped working completely for me. http://codepen.io/likeclockwork/pen/eZmNdp Varun Upadhyay @varunu28 Feb 29 2016 15:02 I am trying to write a regex to check if the first and last character of a string are vowels and also check if they are same Here is the regex var re = /^[aeiou].[aeiou]$.\1/ig;
This is giving an output of false for an input such as "aba".What am I doing wrong here?
Chris Davis
@chrisdav6
Feb 29 2016 15:03

@seancyw i believe this is the format you should follow if you are using a standalone button...

<button class="someClass anotherClass"><i class="someClass anotherClass"></i> SomeText</button>

if the button is within a form it would look something like this...

<form class="someClass" action="someAction>
<button type="submit" class="someClass anotherClass"><i class="someClass anotherClass"></i> SomeText</button>
</form>
Daniel O'Mahony
@OMahonyD
Feb 29 2016 15:05
Anyone got any good resources on json and submitting ajax requests to apis. This random quote machine is kicking my ass.
Blauelf
@Blauelf
Feb 29 2016 15:06
@LikeClockwork You have not closed one of your HTML comments (<!-- main col missing -->), so the rest of the page (including JS) is ignored.
Jack Heaton
@LikeClockwork
Feb 29 2016 15:07
@Blauelf omg . . . thanks so much. Driving my bonkers.
@Blauelf thanks!
CamperBot
@camperbot
Feb 29 2016 15:07
likeclockwork sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
Daniyal
@danyalasif
Feb 29 2016 15:07
I'm trying to make a list of stuff, and when I'm using <ul> and <li> it only gives the first item the * and all other just come without it?
CamperBot
@camperbot
Feb 29 2016 15:07
:star: 1319 | @blauelf | http://www.freecodecamp.com/blauelf
V Bhargav Chowdary
@bhargav4
Feb 29 2016 15:08
@OMahonyD I used mashape
ramyomar2020
@ramyomar2020
Feb 29 2016 15:09
guys need help here
Blauelf
@Blauelf
Feb 29 2016 15:09
@varunu28 That .*\1 seems somewhat off. Is ^([aeiou]).*\1$ what you want? ramyomar2020 @ramyomar2020 Feb 29 2016 15:09 <script$(document).ready(function() { });>
</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>

cant find the mistake
Daniyal
@danyalasif
Feb 29 2016 15:10
Can't you post formatted code?
Chris Davis
@chrisdav6
Feb 29 2016 15:10
@ramyomar2020
<script>
$(document.ready(function() { code }); </script> Blauelf @Blauelf Feb 29 2016 15:10 @ramyomar2020 Not sure, but have you counted opening and closing div tags? Would be better visible if you used formatted text. help format CamperBot @camperbot Feb 29 2016 15:10 ## :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 Varun Upadhyay @varunu28 Feb 29 2016 15:10 I am trying to write a regex to check if the first and last character of a string are vowels and also check if they are same Here is the regex var re = /^[aeiou].[aeiou]$.\1/ig;
This is giving an output of false for an input such as "aba".What am I doing wrong here?
Blauelf
@Blauelf
Feb 29 2016 15:11
@varunu28 :point_up: 29. Februar 2016 16:09
ramyomar2020
@ramyomar2020
Feb 29 2016 15:12
@Blauelf already did and they are ok
Blauelf
@Blauelf
Feb 29 2016 15:12
@varunu28 Also, enclose your code into backticks, so that * are not taken as formatting advice.
Chris Davis
@chrisdav6
Feb 29 2016 15:12
@ramyomar2020 take another look at the syntax on your script tag and document ready function
Allen Sacco
Feb 29 2016 15:12
Can anyone help me? I am trying to make a submit button on my form send the data to my email http://codepen.io/SerpentAdonis/pen/JGVrNP?editors=1100
ramyomar2020
@ramyomar2020
Feb 29 2016 15:12
@chrisdav6 still not working
Daniel O'Mahony
@OMahonyD
Feb 29 2016 15:13
@bhargav4 I subscribed to mashape myself but now I've no idea what to do. Any tips? Thanks
CamperBot
@camperbot
Feb 29 2016 15:13
omahonyd sends brownie points to @bhargav4 :sparkles: :thumbsup: :sparkles:
:star: 292 | @bhargav4 | http://www.freecodecamp.com/bhargav4
Allen Sacco
Feb 29 2016 15:13
If I wasn't humble enough when I started this I sure know now how little I know
Shawn
@seancyw
Feb 29 2016 15:14
thanks @chrisdav6 for the explaination. It work now. :) May I know how to put snippet here, so that I wont make the code unreadable. Thanks a lot
CamperBot
@camperbot
Feb 29 2016 15:14
seancyw sends brownie points to @chrisdav6 :sparkles: :thumbsup: :sparkles:
Blauelf
@Blauelf
Feb 29 2016 15:14
@ramyomar2020 Look at @chrisdav6 's post :point_up: 29. Februar 2016 16:10 and compare it with your code
CamperBot
@camperbot
Feb 29 2016 15:14
:star: 291 | @chrisdav6 | http://www.freecodecamp.com/chrisdav6
Ravi
@Ravi-Sankar
Feb 29 2016 15:15
hi
V Bhargav Chowdary
@bhargav4
Feb 29 2016 15:15
@OMahonyD Search for random quote in search bar. The first result is your friend. You need to add that api to your project to get the key. It was hard for me to figure it out too..
Ask if u any need help
@varunu28
Feb 29 2016 15:15
yeah that worked
thanks @Blauelf :)
CamperBot
@camperbot
Feb 29 2016 15:15
varunu28 sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
Chris Davis
@chrisdav6
Feb 29 2016 15:15
@seancyw you are welcome sir
CamperBot
@camperbot
Feb 29 2016 15:15
:star: 1320 | @blauelf | http://www.freecodecamp.com/blauelf
ramyomar2020
@ramyomar2020
Feb 29 2016 15:16
@Blauelf still not working
Blauelf
@Blauelf
Feb 29 2016 15:17
What does your script element look like?
ramyomar2020
@ramyomar2020
Feb 29 2016 15:17
even i copy and past the code from here its still not working
how can i copy it to here with black background
Blauelf
@Blauelf
Feb 29 2016 15:18
help format
CamperBot
@camperbot
Feb 29 2016 15:18

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

ramyomar2020
@ramyomar2020
Feb 29 2016 15:19
///css
Daniel O'Mahony
@OMahonyD
Feb 29 2016 15:19
ramyomar2020
@ramyomar2020
Feb 29 2016 15:20
<script>
$(document.ready(function() { code }); </script> Shawn @seancyw Feb 29 2016 15:20 note with thanks @chrisdav6 :) CamperBot @camperbot Feb 29 2016 15:20 seancyw sends brownie points to @chrisdav6 :sparkles: :thumbsup: :sparkles: :warning: seancyw already gave chrisdav6 points Blauelf @Blauelf Feb 29 2016 15:21 @ramyomar2020 What is the code meant to be? Is that part of the tasks? Which challenge is that, BTW? Chris Davis @chrisdav6 Feb 29 2016 15:21 @ramyomar2020 the word "code" was just a placeholder in my syntax example, insert you own code there. Sorry for the confusion ramyomar2020 @ramyomar2020 Feb 29 2016 15:23 what is ment by this code ? @chrisdav6 Learn how Script Tags and Document Ready Work @Blauelf V Bhargav Chowdary @bhargav4 Feb 29 2016 15:23 @OMahonyD Sorry its Application In the top right there'll be a Applications tab create new application and click explore Search random quote select first result now you will see the key for that api Chris Davis @chrisdav6 Feb 29 2016 15:24 @ramyomar2020 i believe this lesson is to teach you the document ready syntax without executing any code. Remove the word "code" that you copied from my example and it should work. Blauelf @Blauelf Feb 29 2016 15:25 @ramyomar2020 so removing the word "code" does the trick, there is no actual code required inside the $(document).ready(function(){});
Chris Davis
@chrisdav6
Feb 29 2016 15:30
my bad, @ramyomar2020 i was just looking at the syntax example i sent you and there was an error in my syntax! Lols. I forgot the closing parenthesis after document. Again i apologize. should be...
(document).ready(function() { }); Daniyal @danyalasif Feb 29 2016 15:33 How do I center all the content? I've made an outer container div, and gave it left right margin of auto. Chris Davis @chrisdav6 Feb 29 2016 15:36 text-align: center; to the content div might help, you could also give the content div margin: 0 auto; to center it in the container div ramyomar2020 @ramyomar2020 Feb 29 2016 15:41 <script>(document.ready(function() {
});
</script>
Erik
@Nerik54
Feb 29 2016 15:41
Hi Everyone just started coding can you help me? : <p>
<a href="http://freecatphotoapp.com">
cat photos
<a/><p>
it says there is no closing tag to my "a" element?
Rakesh Shah
@rakeshshahmd
Feb 29 2016 15:41
How can I give ID attribute to form element ?
ramyomar2020
@ramyomar2020
Feb 29 2016 15:41
i made it like this and still not accepting this is why i'm asking for help i thought i made ome thing wrong
Valerie P
@valsedai
Feb 29 2016 15:41
the / needs to be before the a
Daniel O'Mahony
@OMahonyD
Feb 29 2016 15:42
@bhargav4 This is terrible - i mustn't be seeing it properly. Thanks for your help. I've got to head back to work now. and my paper submission was rejected! I need beer :)
CamperBot
@camperbot
Feb 29 2016 15:42
omahonyd sends brownie points to @bhargav4 :sparkles: :thumbsup: :sparkles:
:warning: omahonyd already gave bhargav4 points
Erik
@Nerik54
Feb 29 2016 15:42
thanks!
valsedai!
Valerie P
@valsedai
Feb 29 2016 15:42
Rakesh Shah
@rakeshshahmd
Feb 29 2016 15:42
@valsedai How can I give ID attribute to form element ?
Valerie P
@valsedai
Feb 29 2016 15:42
sure
Chris Davis
@chrisdav6
Feb 29 2016 15:44
@ramyomar2020 add a closing parenthesis after document, sorry, that was my fault...
$(document).ready(function() { }); Valerie P @valsedai Feb 29 2016 15:44 <a id="test" href="www.google.com>Google</a> The test will be the CSS/Javascript code related to the ID ramyomar2020 @ramyomar2020 Feb 29 2016 15:44 @chrisdav6 its ok dont be sorry we all ake mistakes this is how we learn efielding731 @efielding731 Feb 29 2016 15:46 Hi, I just started and its saying how i still need to make the p monospace but the h2 lobster and its not letting me keep the p monospace with changing the h2 to lobster <style> .red-text { color: red; font-family:lobster; } p { font-size: 16px; font-family: Monospace; } </style> ramyomar2020 @ramyomar2020 Feb 29 2016 15:46 still cant go through this challenge Chris Davis @chrisdav6 Feb 29 2016 15:47 @ramyomar2020 <script>$(document).ready(function() {

});
</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>
ramyomar2020
@ramyomar2020
Feb 29 2016 15:49
@chrisdav6 it worked but still dont know what as the problem :worried:
thanks @chrisdav6
CamperBot
@camperbot
Feb 29 2016 15:49
ramyomar2020 sends brownie points to @chrisdav6 :sparkles: :thumbsup: :sparkles:
:star: 292 | @chrisdav6 | http://www.freecodecamp.com/chrisdav6
Rakesh Shah
@rakeshshahmd
Feb 29 2016 15:49
How can I give ID attribute to form element ?
Chris Davis
@chrisdav6
Feb 29 2016 15:50
at first your script tag was a little screwy. Then i gave you the incorrect syntax! That was all.
The HTML is not relevant in this lesson. They just want you to create an empty \$(document).ready function
Ashraful Islam
@iashraful
Feb 29 2016 15:50
hello!
am here to help, who got questions! :D
Maulik Darji
@maulikdarji
Feb 29 2016 15:50
@rakeshshahmd <form id="form_id_here">`
ramyomar2020
@ramyomar2020
Feb 29 2016 15:51
i c
Rakesh Shah
@rakeshshahmd
Feb 29 2016 15:51