These are chat archives for FreeCodeCamp/Help

25th
Mar 2016
Anh Phan
@createwithanh
Mar 25 2016 00:00
lol. Got it.
jhches21
@jhches21
Mar 25 2016 00:00
Ahh, I just realized that as well.
Okay, I see.
Anh Phan
@createwithanh
Mar 25 2016 00:00
@mdelgadonyc - so for this result variable, am I creating multiple sentences on one line?
Moisés Delgado
@mdelgadonyc
Mar 25 2016 00:00
So result is holding to hold one sentence composed of the variables parts of speeches contain in the variables passed into the function.
Anh Phan
@createwithanh
Mar 25 2016 00:01
Okay. So not multiple separate sentences.
That’s why it hasn’t been working hah
Moisés Delgado
@mdelgadonyc
Mar 25 2016 00:01
The challenge was designed after the word blank exercises where you would have something like "The was _ really !"
Hm the chatroom changed what I typed
Let me try again, so the classic exercises would have something like "The [blank] was [blank] really [blank]"
Anh Phan
@createwithanh
Mar 25 2016 00:03
Solved :-)
That was more confusing than i expected lol
the phrasing on that challenge was off.
Moisés Delgado
@mdelgadonyc
Mar 25 2016 00:04
@createwithanh I have been thrown off by the wording of more than once challenge myself! Congrats tho.
Anh Phan
@createwithanh
Mar 25 2016 00:04
thank you for your help @mdelgadonyc !!!
CamperBot
@camperbot
Mar 25 2016 00:04
createwithanh sends brownie points to @mdelgadonyc :sparkles: :thumbsup: :sparkles:
:warning: createwithanh already gave mdelgadonyc points
Moisés Delgado
@mdelgadonyc
Mar 25 2016 00:04
Sure no problem
jhches21
@jhches21
Mar 25 2016 00:05
@jlouiss I would place the blame on jade
becuase it is very very difficult to put both text and i element in same element.
here’s what I did.
You can fix it further.
Jean Louis Salbego
@jlouiss
Mar 25 2016 00:07
@jhches21 thank you :smile:
CamperBot
@camperbot
Mar 25 2016 00:07
jlouiss sends brownie points to @jhches21 :sparkles: :thumbsup: :sparkles:
:warning: jlouiss already gave jhches21 points
jhches21
@jhches21
Mar 25 2016 00:08
@jlouiss good luck with it!
@jlouiss put overflow: hidden for icon instead of the #text itself.
jhches21
@jhches21
Mar 25 2016 00:13
@jlouiss http://codepen.io/jhcheslik/pen/ONmedP some more stuff if you’re interested.
Jean Louis Salbego
@jlouiss
Mar 25 2016 00:13
@jhches21 thanks again
CamperBot
@camperbot
Mar 25 2016 00:13
jlouiss sends brownie points to @jhches21 :sparkles: :thumbsup: :sparkles:
:warning: jlouiss already gave jhches21 points
jhches21
@jhches21
Mar 25 2016 00:13
Anyway, yup, good luck.
Thomas Luong
@luongthomas
Mar 25 2016 00:13
Hello, can anyone help me with the random quote api?
I just need the basics of how to request the json
Jeff
@meankraken
Mar 25 2016 00:14
@luongthomas it depends on what api you're using? you have plenty of chances to learn apis in the upcoming projects, so for the random quote one you can just use an array of quotes if you'd like
jhches21
@jhches21
Mar 25 2016 00:15
Yeah, just need to find api that give you what you need.
Thomas Luong
@luongthomas
Mar 25 2016 00:15
Jordan Meyer
@Jordanmeyer89
Mar 25 2016 00:16
I used this @luongthomas http://forismatic.com/en/api/
jhches21
@jhches21
Mar 25 2016 00:16
Okay, @luongthomas then you need to follow here - http://docs.mashape.com/api-keys unless you already have api-key?
Thomas Luong
@luongthomas
Mar 25 2016 00:16
Yes I have an api key
I used the Advanced rest client to send a custom header with my key, and it works
jhches21
@jhches21
Mar 25 2016 00:17
Ok.
Thomas Luong
@luongthomas
Mar 25 2016 00:17
but I'm not sure how to incorporate that into my javascript/jquery calls
jhches21
@jhches21
Mar 25 2016 00:17
Ah I see.
explain get json
CamperBot
@camperbot
Mar 25 2016 00:17

:point_right: challenge get json with the jquery getjson method [wiki]

Get JSON with the jQuery getJSON Method

Application Programming Interfaces - are tools that computers use to communicate with one another.

Most web APIs transfer data in a format called JSON. JSON stands for JavaScript Object Notation. JSON is nothing more than object properties and their current values, sandwiched between a { and a }.

These properties and their values are often referred to as "key-value pairs".

Here is a sample of what it looks like.

$.getJSON("/json/cats.json", function(json) {

   $(".message").html(JSON.stringify(json));

 });

:pencil: read more about challenge get json with the jquery getjson method on the FCC Wiki

jhches21
@jhches21
Mar 25 2016 00:18
This should get you started! :-)
Thomas Luong
@luongthomas
Mar 25 2016 00:18
Oh yes, I finished that challenge, it was the one prior to the project
The only thing I'm unsure of, is how I would put my api key in the getJSON call
jhches21
@jhches21
Mar 25 2016 00:19
hmmm
Jeff
@meankraken
Mar 25 2016 00:19
@luongthomas I would really recommend you learn using $.ajax
jhches21
@jhches21
Mar 25 2016 00:19
Well, if you need to use api key, then use $.ajax
@meankraken is correct
Thomas Luong
@luongthomas
Mar 25 2016 00:20
I understand now
jhches21
@jhches21
Mar 25 2016 00:20
explain ajax
CamperBot
@camperbot
Mar 25 2016 00:20
no wiki entry for: ajax
jhches21
@jhches21
Mar 25 2016 00:20
I guess FCC doesn’t have anything on ajax….
Thomas Luong
@luongthomas
Mar 25 2016 00:20
There are fields for where I would put keyvalue pairs (for my api keys)
correct?
jhches21
@jhches21
Mar 25 2016 00:20
Yes.
Or, you still can use json I think.
"The URL to the API. You can get this in the API page of the API you intend to consume"
Actually nvm. I see the comment -
xhr.setRequestHeader("X-Mashape-Authorization", "YOUR-MASHAPE-KEY"); // Enter here your Mashape key
That is part of the ajax call that you’ll need to use.
Thomas Luong
@luongthomas
Mar 25 2016 00:21
ohhhh
jhches21
@jhches21
Mar 25 2016 00:21
Do you see it in the document?
Thomas Luong
@luongthomas
Mar 25 2016 00:21
yes I see it
Eduard Zubrik
@EZubrik
Mar 25 2016 00:21
Hey guys!
Thomas Luong
@luongthomas
Mar 25 2016 00:22
thank you @jhches21 @meankraken
CamperBot
@camperbot
Mar 25 2016 00:22
luongthomas sends brownie points to @jhches21 and @meankraken :sparkles: :thumbsup: :sparkles:
:star: 122 | @jhches21 | http://www.freecodecamp.com/jhches21
:star: 336 | @meankraken | http://www.freecodecamp.com/meankraken
Thomas Luong
@luongthomas
Mar 25 2016 00:22
I was stuck for the longest time
jhches21
@jhches21
Mar 25 2016 00:22
Heh, usually when you use services, they usually have docs.
Eduard Zubrik
@EZubrik
Mar 25 2016 00:22
How do I set the zoom size to 100 % on a mac?
Josh Szwarga
@jdszwarga
Mar 25 2016 00:22
How do I add a background color to a form element with CSS?
jhches21
@jhches21
Mar 25 2016 00:22
Should at least have a document explaining how to use their api.
@EZubrik you mean browser zoom?
Eduard Zubrik
@EZubrik
Mar 25 2016 00:22
yes
jhches21
@jhches21
Mar 25 2016 00:23
CMD + + or CMD + -
or CMD + 0 will set it to 100%
Oh. Form element?
explain background color css
CamperBot
@camperbot
Mar 25 2016 00:23
no wiki entry for: background color css
jhches21
@jhches21
Mar 25 2016 00:24
Okay, so basically @jdszwarga you just set css like this...
<style>
  input {
    background-color: yellow;
  }
</style>
That’s basically the gist of it.
Josh Szwarga
@jdszwarga
Mar 25 2016 00:26
@jhches21 And how do I connect my <style> to the element?
jhches21
@jhches21
Mar 25 2016 00:27
it depends on your element...
you can connect it by using element, class, or id name.
explain css selectors
CamperBot
@camperbot
Mar 25 2016 00:29
no wiki entry for: css selectors style
Murat
@muratkh
Mar 25 2016 00:29
http://codepen.io/muratkh/full/jqmxMG/ just completed the tribute page check it out guys
@muratkh very nice!
Josh Szwarga
@jdszwarga
Mar 25 2016 00:30
Thanks @jhches21 I got it!
CamperBot
@camperbot
Mar 25 2016 00:30
jdszwarga sends brownie points to @jhches21 :sparkles: :thumbsup: :sparkles:
jhches21
@jhches21
Mar 25 2016 00:30
@muratkh maybe make that background image fill the width.
CamperBot
@camperbot
Mar 25 2016 00:30
:star: 123 | @jhches21 | http://www.freecodecamp.com/jhches21
Murat
@muratkh
Mar 25 2016 00:30
@jdszwarga thank you! i'm good at css although i ran into one issue. I'm not sure if anoyone is good at bootstrap here
CamperBot
@camperbot
Mar 25 2016 00:30
muratkh sends brownie points to @jdszwarga :sparkles: :thumbsup: :sparkles:
:star: 45 | @jdszwarga | http://www.freecodecamp.com/jdszwarga
jhches21
@jhches21
Mar 25 2016 00:30
@muratkh what seems to be the issue?
Murat
@muratkh
Mar 25 2016 00:31
okay when you run it full page those 3 columns how do it align them perfectly although images are different size (i'm using img-responsive)
i tried clearfix but no luck
jhches21
@jhches21
Mar 25 2016 00:32
You want them to be same height?
Murat
@muratkh
Mar 25 2016 00:32
yes
jhches21
@jhches21
Mar 25 2016 00:32
Ah, that’s challenging problem that is usually done by javascript.
Murat
@muratkh
Mar 25 2016 00:32
yea figured
ok gimme the code for fill width
maiamigliaro
@maiamigliaro
Mar 25 2016 00:33
@xeoneux Thanks!!
CamperBot
@camperbot
Mar 25 2016 00:33
maiamigliaro sends brownie points to @xeoneux :sparkles: :thumbsup: :sparkles:
Murat
@muratkh
Mar 25 2016 00:33
i know what you're talking about, its jumbotron background right
CamperBot
@camperbot
Mar 25 2016 00:33
:star: 376 | @xeoneux | http://www.freecodecamp.com/xeoneux
jhches21
@jhches21
Mar 25 2016 00:33
@muratkh Ah, you need to use background-size: cover;
Murat
@muratkh
Mar 25 2016 00:33
yes! you're right how did i forget that
jhches21
@jhches21
Mar 25 2016 00:33
By the way if you want to see the height challenge, you can do it with CSS as well.
Murat
@muratkh
Mar 25 2016 00:33
thanks man
Murat
@muratkh
Mar 25 2016 00:35
eh too much work
page looks awesome tho
JD Gonzalez
@dgonz001
Mar 25 2016 00:36
Hi everyone has anyone else noticed the links for the Twitchtv JSON API don't load?
I am working on that project right now and if I click a link from my project it doesn't load properly.
jhches21
@jhches21
Mar 25 2016 00:37
Hmm.
I have no idea.
JD Gonzalez
@dgonz001
Mar 25 2016 00:38
yeah me either I just think it's odd.
Brian
@sludge256
Mar 25 2016 00:39
works for me
or are you talking about Twitch not loading?
JD Gonzalez
@dgonz001
Mar 25 2016 00:39
the page will load but the content won't ever load
jhches21
@jhches21
Mar 25 2016 00:39
Hmm. It’s your side.
All of the pages load just fine for me.
jhches21
@jhches21
Mar 25 2016 00:40
Maybe they’re still having some problem in some area.
JD Gonzalez
@dgonz001
Mar 25 2016 00:41
@sludge256 That make sense! thanks for that.
CamperBot
@camperbot
Mar 25 2016 00:41
dgonz001 sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1960 | @sludge256 | http://www.freecodecamp.com/sludge256
buckshot307
@buckshot307
Mar 25 2016 00:46
hey guys
I'm working on my portfolio page and was wondering where I should look for images to use as a background.
Jia "Jay" Tan
@j7an
Mar 25 2016 00:47
This message was deleted
Francisco Franco
@frenktico
Mar 25 2016 00:47
@buckshot307 I have a link here I will send it to you, one minute.
Leonardo Galante
@lndgalante
Mar 25 2016 00:47
Can I link one pen to other through a tag ?
Jean Louis Salbego
@jlouiss
Mar 25 2016 00:48
@jhches21 thanks again, i was desperate, here's the way i fixed it :) http://codepen.io/JLouisS/pen/jqmBpx
CamperBot
@camperbot
Mar 25 2016 00:48
jlouiss sends brownie points to @jhches21 :sparkles: :thumbsup: :sparkles:
:warning: jlouiss already gave jhches21 points
Francisco Franco
@frenktico
Mar 25 2016 00:48
@buckshot307 check thi one https://blog.hootsuite.com/20-free-stock-photo-sites-social-media-images/ it has 20 other sites that you can use as reference. ;) Hope it helps!
Jia "Jay" Tan
@j7an
Mar 25 2016 00:49
@mattr47 I guess two separate replace() methods would suffice. The first to replace the first char in the string and the second to replace the first char after each space in the string.
buckshot307
@buckshot307
Mar 25 2016 00:49
sweet. thanks!
Francisco Franco
@frenktico
Mar 25 2016 00:49
You're welcome
jhches21
@jhches21
Mar 25 2016 00:50
@buckshot307 https://unsplash.com is my favorite!
@jlouiss nice! I see you used span… good idea.
buckshot307
@buckshot307
Mar 25 2016 00:50
cool thanks, I'll check that out as well.
jhches21
@jhches21
Mar 25 2016 00:51
@jlouiss and better css too. Awesome job.
Candice
@smrtsmrf
Mar 25 2016 01:01
question about buttons/links. I want to keep the feature of highlighting the button on hovering, but after the button is clicked, I want it to not be highlighted anymore. Tips/tricks/help? https://codepen.io/smrtsmrf/pen/jqBrpw
jhches21
@jhches21
Mar 25 2016 01:09
I think it have to do with :focus attribute
When you click on something
it will get :focus on it.
So you just need to do
element:focus {
  default style here
}
Make sense?
But that will mess up accessiblity, because you can’t press tab anymore.
So, instead -
Good luck!
@smrtsmrf see my messages up above
Candice
@smrtsmrf
Mar 25 2016 01:14
@jhches21 hmm. I tried the blur() jquery method, but no luck
jhches21
@jhches21
Mar 25 2016 01:15
you need to apply it to the element that use hover attribute can you show me the jquery code you used?
Actually, never mind, i”ll look at your codepen
Ohhhhh.
Okay that one is tricky.
The mouseup event isn’t even applied to any of those buttons.
You know why? Because the buttons doesn’t exists yet.
Candice
@smrtsmrf
Mar 25 2016 01:18
@jhches21 yeah, I changed it back to click
jhches21
@jhches21
Mar 25 2016 01:19
Well, you see, what happen is that you tried to apply those buttons before they’re even created through $ajax call.
Jonas Lee
@jtlscout
Mar 25 2016 01:19
Any questions
jhches21
@jhches21
Mar 25 2016 01:19
So, you need to wait until ajax call is done, then you can bind the mouseup to those buttons
Candice
@smrtsmrf
Mar 25 2016 01:19
@jhches21 I called getData() right above it though
jhches21
@jhches21
Mar 25 2016 01:19
Yes, but ajax is still running in background.
javascript is faster than ajax… ajax is asynchronous.
Candice
@smrtsmrf
Mar 25 2016 01:20
@jhches21 Ok, so how do I tell it to wait until ajax is done?
jhches21
@jhches21
Mar 25 2016 01:20
Right.
MuhammadRe
@MuhammadRe
Mar 25 2016 01:20
how to upload a page from codepen to knownly
jhches21
@jhches21
Mar 25 2016 01:21
you can do something like this
MuhammadRe
@MuhammadRe
Mar 25 2016 01:22
how
jhches21
@jhches21
Mar 25 2016 01:22
@smrtsmrf just put that binding action in ajax call after all those functions of adding buttons.
@MuhammadRe I’m sorry I was talking to smrtsmrf, I’m not sure what your question is.
Candice
@smrtsmrf
Mar 25 2016 01:23
@jhches21 aha, that worked. thanks
CamperBot
@camperbot
Mar 25 2016 01:23
smrtsmrf sends brownie points to @jhches21 :sparkles: :thumbsup: :sparkles:
:star: 124 | @jhches21 | http://www.freecodecamp.com/jhches21
Rahul Gosain
@rgosain25
Mar 25 2016 01:37
anyone?
MuhammadRe
@MuhammadRe
Mar 25 2016 01:37
yes
Jonas Lee
@jtlscout
Mar 25 2016 01:38
Y
L Rogers
@lrogers74
Mar 25 2016 01:38
Ok, so thiurt. s adding a secong class to the image. It says we can use class , etc. Is this in addition the the width one already added
William Flippo
@Yersinia-pestis1346
Mar 25 2016 01:38

Good Evening From Florida, I have seem to run into a road block on where to start. Can anyone help me? Thank you. function queue(arr, item) {
// Your code here

return item; // Change this line
}

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

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

islq
@islq
Mar 25 2016 01:38
is the * marked challenge have to be done before you can claim the Certificate?
Rahul Gosain
@rgosain25
Mar 25 2016 01:39
in freecodecamp bootstrap tutorials, they include a link in first set, but after that it dissapears in the rest of the sets. Why so?
John
@jpls93
Mar 25 2016 01:39
function update(id, prop, value) {
  if (value !== undefined || value !== "") {         //If value is defined or not-blank
    if (prop !== "tracks") {                           //And if prop is not tracks
      collection[id][prop] = value;                      //Then set value for prop 
    } else {
      collection[id].tracks.push(value);
    }                         
  } else {
    delete collection[id][prop];
  }
  return collection;
}

update(2548, "tracks", "");
I don't get it. Since "" is the argument passed to the value parameter, shouldn't the function go straight to the delete collection[id][prop]; statement?
Rahul Gosain
@rgosain25
Mar 25 2016 01:39
the link is a bootstrap hyperlink
MuhammadRe
@MuhammadRe
Mar 25 2016 01:40
@rgosain25 what link you need
John
@jpls93
Mar 25 2016 01:40
@Yersinia-pestis1346 what is the requirement
@Yersinia-pestis1346 which part is confusing?
William Flippo
@Yersinia-pestis1346
Mar 25 2016 01:41
Sorry to have omitted that part, Write a function queue which takes an array (arr) and a number (item) as arguments. Add the number to the end of the array, then remove the first element of array. The queue function should then return the element that was removed.
Rahul Gosain
@rgosain25
Mar 25 2016 01:41
@MuhammadRe, just asking where does that link vanish in further slides? in bootstrap we have to have that link all the times right? the link which enables bootstrap
MuhammadRe
@MuhammadRe
Mar 25 2016 01:41
@islq yes of course
jhches21
@jhches21
Mar 25 2016 01:41
@johnsalcedonetwork no.
islq
@islq
Mar 25 2016 01:41
@MuhammadRe i see, thank u
CamperBot
@camperbot
Mar 25 2016 01:41
islq sends brownie points to @muhammadre :sparkles: :thumbsup: :sparkles:
:star: 269 | @muhammadre | http://www.freecodecamp.com/muhammadre
jhches21
@jhches21
Mar 25 2016 01:42
your if statement have || which mean it can be either this or that.
MuhammadRe
@MuhammadRe
Mar 25 2016 01:42
Challenges required for certifications are marked with a *
John
@jpls93
Mar 25 2016 01:42
@Yersinia-pestis1346 Okay. Remember the syntax of a function:
function myFunction(myParameter1, myParametern) {
   statement;
}
@Yersinia-pestis1346 start with the requirement "Write a function queue which takes an array (arr) and a number (item) as arguments."
William Flippo
@Yersinia-pestis1346
Mar 25 2016 01:42
Yes
jhches21
@jhches21
Mar 25 2016 01:42
@johnsalcedonetwork Because ”” is not undefined (or in another word ‘is defined’), it is able to pass the if statement.
John
@jpls93
Mar 25 2016 01:43
@Yersinia-pestis1346 Give it 10-20 minutes then ask again if something confuses you :smiley_cat:
William Flippo
@Yersinia-pestis1346
Mar 25 2016 01:43
Ok thank you
John
@jpls93
Mar 25 2016 01:44
@jhches21 give me a minute to digest this..
MuhammadRe
@MuhammadRe
Mar 25 2016 01:44
@rgosain25 because it depends on which kind of things you want to do
jhches21
@jhches21
Mar 25 2016 01:44
@johnsalcedonetwork Yeah, here’s a different way to think.
MuhammadRe
@MuhammadRe
Mar 25 2016 01:44
if you want to change the icons you have link
and for another u have
John
@jpls93
Mar 25 2016 01:45
@jhches21 Ahhhhh it passed the "" is not undefined
@jhches21 Got it :smile:
jhches21
@jhches21
Mar 25 2016 01:46
Right.
I was going to type out very complex way of thinking, but you figured it out.
John
@jpls93
Mar 25 2016 01:46
will have to rewrite my code :smile:
jhches21
@jhches21
Mar 25 2016 01:47
"" is actually defined in first place.
that’s just the most simplest way to see it.
islq
@islq
Mar 25 2016 01:47
Is there any best solution or pretty solution can I check out? I finished some challenges, but my code looks ugly :)
Rahul Gosain
@rgosain25
Mar 25 2016 01:47
ohh okayy! Thanks @MuhammadRe
CamperBot
@camperbot
Mar 25 2016 01:47
rgosain25 sends brownie points to @muhammadre :sparkles: :thumbsup: :sparkles:
jhches21
@jhches21
Mar 25 2016 01:47
Hmm. I think FCC wiki have it.
CamperBot
@camperbot
Mar 25 2016 01:47
:star: 270 | @muhammadre | http://www.freecodecamp.com/muhammadre
MuhammadRe
@MuhammadRe
Mar 25 2016 01:48
@islq you work on FCC or not
because it has a browser to see the results
why ur code looks bad
islq
@islq
Mar 25 2016 01:50
@MuhammadRe yes, the results check passed on FCC, but i think my code is too long , or used many 'for' , 'if' , maybe not the js type ?
jhches21
@jhches21
Mar 25 2016 01:51
Paste the code here. I can look at it quickly.
Give you advice.
@islq
islq
@islq
Mar 25 2016 01:52

function pairwise(arr, arg) {
var used = {};
var out = 0;
for(var i=0;i<arr.length;i++) {
if (used.hasOwnProperty(i)) continue;
for(var k=0;k<arr.length;k++) {
if (i===k) continue;
if (used.hasOwnProperty(k)) continue;
if (arr[i] + arr[k] === arg) {
used[i] = 1;
used[k] = 1;
out = out + i + k;
break;
}
}
}
return out;
}

//pairwise([1,4,2,3,0,5], 7);
pairwise([1, 3, 2, 4], 7);

B. Garber
@TheBGar
Mar 25 2016 01:52
@islq check out the wikis
explain wiki
CamperBot
@camperbot
Mar 25 2016 01:52

:point_right: how to contribute to the wiki [wiki]

How To Contribute To The Wiki

This is a step-by-step guide, aimed at people new to Git, which covers how to use GitHub Desktop as well as the Git command line

As such there might be 2 sets of directions: GitHub Desktop first, then command line version

GitHub Desktop is a GUI interface, but there are benefits to learning the command line way too (speed, shortcuts, more powerful commands, and being able to talk to people who are old school). It might be beneficial to you to try the Command Line way after you get more comfortable with GitHub

Table Of Contents

:pencil: read more about how to contribute to the wiki on the FCC Wiki

B. Garber
@TheBGar
Mar 25 2016 01:52
@islq PS, here's how to use markdown in the chat to display your code :point_down:
explain format
CamperBot
@camperbot
Mar 25 2016 01:52

:point_right: code formatting [wiki]

Multi line Code

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

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

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

Single line Code

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

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

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

semeiote
@semeiote
Mar 25 2016 01:53
ctrl+alt+m gives markdown
MuhammadRe
@MuhammadRe
Mar 25 2016 01:55

```<head>
<title>Unlimited Solutions</title>
</head>

<body>
<nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Muhammad Reffaai</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#home">Home</a>
</li>
<li>
<a href="#about">About</a>
</li>
<li>
<a href="#portfolio">Portfolio</a>
</li>
<li>
<a href="#contact">Contact</a>
</li>
</ul>
</div>
</div>
</nav>

<div class="container-fluid" id="section1">
<div class="row">
<div class="col-xs-12">
<h1 class="pre">Unlimited Solutions</h1>
<h3 class="sec"><em><b>The Solution of whatever you desire</b></em></h3>
<hr class="thi">
<div class="center">
<ul class="list-inline web">
<li><a href="https://www.facebook.com/muhammad.refae" target="_blank" class="btn btn-default btn-lg"><img src="https://www.facebookbrand.com/img/fb-art.jpg"><i class="fa fa-facebook fa-fw"></i>
</a></li>
<li><a href="https://github.com/MuhammadRe" target="_blank" class="btn btn-default btn-lg"><img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Mark.png"><i class="fa fa-github fa-fw"></i>
</a></li>
<li><a href="https://www.linkedin.com/home?trk=nav_responsive_tab_home" target="_blank" class="btn btn-default btn-lg"><img src="http://www.eurocorps.org/images/LinkedIn_logo.png"><i class="fa fa-linkedin fa-fw"></i>
</a></li>
<li><a href="https://twitter.com/Refae123" target="_blank" class="btn btn-default btn-lg"><img src="https://cdn1.iconfinder.com/data/icons/logotypes/32/twitter-128.png" id="twitter"><i class="fa fa-twitter fa-fw"></i>
</a></li>
<li><a href="https://plus.google.com/u/0/106083573292362901810/posts" target="_blank" class="btn btn-default btn-lg"><img src="http://www.bls.it/images/template/google-plus-logo.png" id="google+"><i class="fa fa fa-google-plus-square fa-fw"></i>
</a></li>
<li><a href="https://www.instagram.com/muhammad19852013/" target="_blank" class="btn btn-default btn-lg"><img src="http://3835642c2693476aa717-d4b78efce91b9730bcca725cf9bb0b37.r51.cf1.rackcdn.com/Multi-Color_Logo_thumbnail200.png" id="instagram"><i class="fa fa-instagram fa-fw"></i>
</a><li>
</ul></div>
<br><br><br><br><br><br><br><br><br><br><br><br<br><br><br>
<div class="row" id="section2">
<div class="col-xs-6">
<div class="redbox">
<h1 class="text-center">Unlimited Solutions.</h1>
<p>I am an Informatics engineer specialized in networking and programming
(IT master diploma) graduated from University of Damascus in 2008, i was working in an office called<b><em> (SIMPLY SOFT)</b></em> in the meantime when i was studying, i used to program on the following languages:
<ul>
<li>C++</li>
<li>C#</li>
<li>Java</li>
</ul>
also i have learned how to manage databases through SQL and ORACLE.
I found programming in the beginning just a chemical equalization, i couldn't understand how to make the system do what i ever want, i told myself

B. Garber
@TheBGar
Mar 25 2016 01:55
@MuhammadRe don't forget the return after the backticks :wink:
islq
@islq
Mar 25 2016 01:55
should I paste code, and press " shift + enter" to send formated code?
jhches21
@jhches21
Mar 25 2016 01:56
You should type out ``` first then press enter, it will format code for you.
B. Garber
@TheBGar
Mar 25 2016 01:56
@islq read this :point_down:
explain format
CamperBot
@camperbot
Mar 25 2016 01:56

:point_right: code formatting [wiki]

Multi line Code

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

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

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

Single line Code

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

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

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

jhches21
@jhches21
Mar 25 2016 01:56
function pairwise(arr, arg) {
  var used = {};
  var out = 0;
  for (var i = 0; i < arr.length; i++) {
    if (used.hasOwnProperty(i)) continue;
    for (var k = 0; k < arr.length; k++) {
      if (i === k) continue;
      if (used.hasOwnProperty(k)) continue;
      if (arr[i] + arr[k] === arg) {
        used[i] = 1;
        used[k] = 1;
        out = out + i + k;
        break;
      }
    }
  }
  return out;
}
//pairwise([1,4,2,3,0,5], 7);
pairwise([1, 3, 2, 4], 7);
Anyway @islq to answer your question - you could use Array.reduce()
John
@jpls93
Mar 25 2016 01:56
Step 1. Press `` Step 2. PressCTRL+ENTERStep 3. Paste your code (CTRL+V`)
jhches21
@jhches21
Mar 25 2016 01:56
It’ll help you a lot.
MuhammadRe
@MuhammadRe
Mar 25 2016 01:56
<head>
  <title>Unlimited Solutions</title>
</head>
<body>
  <nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Muhammad Reffaai</a>
    </div>
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li>
              <a href="#home">Home</a>
                    </li>
                    <li>
              <a href="#about">About</a>
                    </li>
                    <li>
              <a href="#portfolio">Portfolio</a>
                    </li>
                   <li>
              <a href="#contact">Contact</a>
                   </li>
                </ul>
            </div>
        </div>
    </nav>
<div class="container-fluid" id="section1">
    <div class="row">
      <div class="col-xs-12">
        <h1 class="pre">Unlimited Solutions</h1>
        <h3 class="sec"><em><b>The Solution of whatever you desire</b></em></h3>
        <hr class="thi">
        <div class="center">
          <ul class="list-inline web">
                <li><a href="https://www.facebook.com/muhammad.refae" target="_blank" class="btn btn-default btn-lg"><img src="https://www.facebookbrand.com/img/fb-art.jpg"><i class="fa fa-facebook fa-fw"></i>
                </a></li>
                <li><a href="https://github.com/MuhammadRe" target="_blank" class="btn btn-default btn-lg"><img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Mark.png"><i class="fa fa-github fa-fw"></i>
                </a></li>
                <li><a href="https://www.linkedin.com/home?trk=nav_responsive_tab_home" target="_blank" class="btn btn-default btn-lg"><img src="http://www.eurocorps.org/images/LinkedIn_logo.png"><i class="fa fa-linkedin fa-fw"></i>
                </a></li>
                <li><a href="https://twitter.com/Refae123" target="_blank" class="btn btn-default btn-lg"><img src="https://cdn1.iconfinder.com/data/icons/logotypes/32/twitter-128.png" id="twitter"><i class="fa fa-twitter fa-fw"></i>
                </a></li>
                <li><a href="https://plus.google.com/u/0/106083573292362901810/posts" target="_blank" class="btn btn-default btn-lg"><img src="http://www.bls.it/images/template/google-plus-logo.png" id="google+"><i class="fa fa fa-google-plus-square fa-fw"></i>
                </a></li>
                <li><a href="https://www.instagram.com/muhammad19852013/" target="_blank" class="btn btn-default btn-lg"><img src="http://3835642c2693476aa717-d4b78efce91b9730bcca725cf9bb0b37.r51.cf1.rackcdn.com/Multi-Color_Logo_thumbnail200.png" id="instagram"><i class="fa fa-instagram fa-fw"></i>
                </a><li>
          </ul></div>
        <br><br><br><br><br><br><br><br><br><br><br><br<br><br><br>
          <div class="row" id="section2">
            <div class="col-xs-6">
              <div class="redbox">
              <h1 class="text-center">Unlimited Solutions.</h1>
              <p>I am an Informatics engineer specialized in networking and programming
              (IT master diploma) graduated from University of Damascus in 2008, i was working in an office called<b><em> (SIMPLY SOFT)</b></em> in the meantime when i was studying, i used to program on the following languages: 
                <ul>
                  <li>C++</li>
                  <li>C#</li>
                  <li>Java</li>
                </ul>
                also i have learned how to manage databases through SQL and ORACLE.
                I found programming in the beginning just a chemical equalization, i couldn't understand how to make the system do what i ever want, i told
lazerfire15
@lazerfire15
Mar 25 2016 01:57
<html>
<style>
.red-text {
font: 16px;
}
</style>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
</p>
</html>
MuhammadRe
@MuhammadRe
Mar 25 2016 01:57
nice
islq
@islq
Mar 25 2016 01:57
function pairwise(arr, arg) {
  var used = {};
  var out = 0;
  for(var i=0;i<arr.length;i++) {
    if (used.hasOwnProperty(i)) continue;
    for(var k=0;k<arr.length;k++) {
      if (i===k) continue;
      if (used.hasOwnProperty(k)) continue;
      if (arr[i] + arr[k] === arg) {
        used[i] = 1;
        used[k] = 1;
        out = out + i + k;
        break;
      }
    }
  }
  return out;
}

//pairwise([1,4,2,3,0,5], 7);
pairwise([1, 3, 2, 4], 7);
i got it ,thanks all
B. Garber
@TheBGar
Mar 25 2016 01:58
@islq nice!
Kiltreiser
@Kiltreiser
Mar 25 2016 01:59
Dumb question before I start - how do I copy and paste my code like islq did above?
lazerfire15
@lazerfire15
Mar 25 2016 01:59
@islq nice logic
B. Garber
@TheBGar
Mar 25 2016 01:59
explain format
@Kiltreiser check this out :point_down:
CamperBot
@camperbot
Mar 25 2016 01:59

:point_right: code formatting [wiki]

Multi line Code

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

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

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

Single line Code

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

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

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

MuhammadRe
@MuhammadRe
Mar 25 2016 02:00
first press ``` then shift + enter then paste the code
Kiltreiser
@Kiltreiser
Mar 25 2016 02:00
Thanks
MuhammadRe
@MuhammadRe
Mar 25 2016 02:01
@islq your code looks great
it works
lazerfire15
@lazerfire15
Mar 25 2016 02:01
'''
CamperBot
@camperbot
Mar 25 2016 02:01
:bulb: to format code use backticks! ``` more info
islq
@islq
Mar 25 2016 02:01
@lazerfire15 i don't know how to do that with Array.reduce @MuhammadRe
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:01
Hey bout to start my perosnal port folio any tips before i start?
MuhammadRe
@MuhammadRe
Mar 25 2016 02:01
@lazerfire15 not quotation the button in the corner
lazerfire15
@lazerfire15
Mar 25 2016 02:02
found it, lol
MuhammadRe
@MuhammadRe
Mar 25 2016 02:02
@ZctrapCoding just go ahead it is easy
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:02
k
the first project was easy too...
B. Garber
@TheBGar
Mar 25 2016 02:02
@ZctrapCoding I'll say, don't shoot for perfection at first...you'll have many iterations along the way...and with more knowledge of webdev, you'll implement new things.
Kiltreiser
@Kiltreiser
Mar 25 2016 02:02

I have a problem with the Check For Palindromes assignment. I can tick all the boxes, except the last one for recognising "0_0 (: /-\ :) 0-0" as True. I've tried a lot of different options so far, this is the code I have.

function palindrome(str) {
  // Good luck!
  forStr = str.toLowerCase().replace(/[^\w]/g,'').split('');
  revStr = forStr.toString().split('').reverse().join('');
  if (revStr == forStr) {
  return true;
  }
  else {
    return false;
  }  
}

palindrome("eye");

Any hints as to what I'm missing? I think it's the underscore and hyphen that are tripping me up but I've had no success dealing with it.

ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:02
Alright thx
islq
@islq
Mar 25 2016 02:03
@MuhammadRe the helpful link for that challenge is Array.reduce, but i can't figure out how.
MuhammadRe
@MuhammadRe
Mar 25 2016 02:03
@islq let's see
B. Garber
@TheBGar
Mar 25 2016 02:03
@ZctrapCoding who are you talking to? :smile:
lazerfire15
@lazerfire15
Mar 25 2016 02:04
@islq im looking at your code now, i have little experience with javascript syntax (arduino c++ backround) but i will see if there is anything bugging
MuhammadRe
@MuhammadRe
Mar 25 2016 02:04

@Kiltreiser ```
function palindrome(str) {

var strippedStr = str.toLowerCase().replace(/\W|_/g, '');
var reversedStr = strippedStr.split('').reverse().join('');

if(reversedStr === strippedStr) {
return true;
} else {
return false;
}
}
```

lazerfire15
@lazerfire15
Mar 25 2016 02:06
@islq Im sorry, but i do not think I can help you yet, happy coding
<style>
  .red-text {
    font-size: 16px;
  }
</style>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">
  Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
</p>
islq
@islq
Mar 25 2016 02:06
@lazerfire15 My code works, but it is not the 'Array.reduce' type, i'm try to figure out how to do that work with Array.reduce.
B. Garber
@TheBGar
Mar 25 2016 02:06
@MuhammadRe make sure you return after your mention name
MuhammadRe
@MuhammadRe
Mar 25 2016 02:06
@Kiltreiser remove [ ] and ^ put_
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:07
im talking to you
:D
jhches21
@jhches21
Mar 25 2016 02:08
Array reduce is basically a way to reduce an array into one number.
Kiltreiser
@Kiltreiser
Mar 25 2016 02:08
@MuhammadRe THat's still not working for me, causes more problems
MuhammadRe
@MuhammadRe
Mar 25 2016 02:09
@islq for what you want to use array.reduce
@Kiltreiser copy my code understand it then execute it
the problem is just with symbols after remove
Kiltreiser
@Kiltreiser
Mar 25 2016 02:10
@MuhammadRe Hey, it works now. Just a typo on my part. I didn't want to just copy-paste someone else's code, wanted to understand what I was doping before putting it in :)
@MuhammadRe Thanks!
CamperBot
@camperbot
Mar 25 2016 02:10
kiltreiser sends brownie points to @muhammadre :sparkles: :thumbsup: :sparkles:
:star: 271 | @muhammadre | http://www.freecodecamp.com/muhammadre
B. Garber
@TheBGar
Mar 25 2016 02:11
@Kiltreiser rock on. typos seems to always be something that comes up, even for veterans :wink2: Keep it up!
jhches21
@jhches21
Mar 25 2016 02:11
@islq you’ll have to play around with Array.reduce to really understand how it work. It’s pretty advance, but super powerful.
MuhammadRe
@MuhammadRe
Mar 25 2016 02:13

@islq ```
function pairwise(arr, arg) {
// hold the indexes that add up to arg
var indexes = [];

// iterate over each element in the original array
arr.forEach(function (curVal, index, array) {
    var outerIndex = index;

    // compare to each element in the original array
    array.forEach(function (val, indx, ar) {
        var innerIndex = indx;

        // if you are comparing the same index of the original array
        // then don't take any action
        if (outerIndex === innerIndex) {
            // do nothing
        }

        // if the values adds up:
        else if (curVal + val === arg) {
            // pus the indexes of the values to the indexes array if that index is not already there
            if (indexes.indexOf(outerIndex) === -1) {
                indexes.push(outerIndex);
            }

            if (indexes.indexOf(innerIndex) === -1) {
                indexes.push(innerIndex);
            }
        }
    });
});

// sum up the values
return indexes.reduce(function(previousValue, currentValue) {
    return previousValue + currentValue;

}, 0);

}
```

islq
@islq
Mar 25 2016 02:14
@jhches21 @MuhammadRe the reduce() only used for calc total sum?
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:14
On the list it says a navigator i know the HTML element <nav> could do it but how do i use it?
Zinurayn Mohammad
@ZINURAYN
Mar 25 2016 02:15
exercise 36 "Add a submit button to the form"
setting attribute type to submit
i typed
<form action="/submit-cat-photo">
<input type="text" placeholder="cat photo URL"><button type="Submit">submit </button>
</form>
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:16
Any help?
MuhammadRe
@MuhammadRe
Mar 25 2016 02:17
@ZINURAYN what the prob.
Dylan
@dhcodes
Mar 25 2016 02:18
@ZINURAYN you want a button with the type of submit
B. Garber
@TheBGar
Mar 25 2016 02:18
@ZINURAYN should your input element be wrapped inside your button tags?
Dylan
@dhcodes
Mar 25 2016 02:18
@ZctrapCoding what challenge? or are you just asking what a nav tag does?
@ZctrapCoding in HTML5 it just separates a sites navigation from the rest of the divs. It's helpful for accessibility, screen readers, and unifying site design
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:19
Im doing the build your personal portfolio and one of the requirments is to have a navigator
MuhammadRe
@MuhammadRe
Mar 25 2016 02:19
@ZctrapCoding USE <NAV>
AND READ ABOUT IT ON GOOGLE
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:20
oh yeah thx muhammadeRe
B. Garber
@TheBGar
Mar 25 2016 02:20
@ZctrapCoding <nav> is an html element, as in navbar....bootstrap is a great tool for your portfolio
MuhammadRe
@MuhammadRe
Mar 25 2016 02:20
U CAN USE SOMEONE'S STYLE
Dylan
@dhcodes
Mar 25 2016 02:20
@MuhammadRe easy on the all-caps lol
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:20
ik i feel like hes yelling at me...
@TheBGar thx
CamperBot
@camperbot
Mar 25 2016 02:21
zctrapcoding sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles:
:star: 369 | @thebgar | http://www.freecodecamp.com/thebgar
islq
@islq
Mar 25 2016 02:21
@jhches21 @MuhammadRe I thought I can used Array.reduce to find the index in that challenge.thanks for help
CamperBot
@camperbot
Mar 25 2016 02:21
islq sends brownie points to @jhches21 and @muhammadre :sparkles: :thumbsup: :sparkles:
:warning: islq already gave muhammadre points
:star: 127 | @jhches21 | http://www.freecodecamp.com/jhches21
MuhammadRe
@MuhammadRe
Mar 25 2016 02:21
@islq NOT NECESSARY
jhches21
@jhches21
Mar 25 2016 02:22
It give cleaner code though.
If done correctly.
MuhammadRe
@MuhammadRe
Mar 25 2016 02:22
@dhcodes IT'S SPECIAL WHEN U WRITE CAPS
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:23
AND I UNDERSTAND <NAV NOW>
Creater2036
@Creater2036
Mar 25 2016 02:23
Nice to hear
Dylan
@dhcodes
Mar 25 2016 02:23
@MuhammadRe @ZctrapCoding LOL <nav now> that will be in HTML6
MuhammadRe
@MuhammadRe
Mar 25 2016 02:23
@ZctrapCoding U STARTED TO WRITE CAPS
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:23
IK AND YES IM SPECIAL
MuhammadRe
@MuhammadRe
Mar 25 2016 02:23
@ZctrapCoding <NAV> NOW
islq
@islq
Mar 25 2016 02:23
@jhches21 how can i find your solution's link?
MuhammadRe
@MuhammadRe
Mar 25 2016 02:24
@ZctrapCoding ARE YOU FROM NETHERLANDS BECAUSE U SAY IK
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:25
NAH I DONT LIKE TO RIGHT I KNOW EVERYTIME
WOW SO MUCH ERRORS
I MEANT WRITE
XD
MuhammadRe
@MuhammadRe
Mar 25 2016 02:26
@ZctrapCoding HOW OLD ARE YOU ?
:shipit:
:fire: FIRE:FIRE:FIRE
islq
@islq
Mar 25 2016 02:27
@jhches21 mis-understand, i got it know, thank you
CamperBot
@camperbot
Mar 25 2016 02:27
islq sends brownie points to @jhches21 :sparkles: :thumbsup: :sparkles:
:warning: islq already gave jhches21 points
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:29
LETS JUST SAY IM YOUNG...
This message was deleted
MuhammadRe
@MuhammadRe
Mar 25 2016 02:30
@ZctrapCoding I SEE
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:30
LETS JUST SAY IM YOUNG
Jeff
@meankraken
Mar 25 2016 02:30
@ZctrapCoding would you say you're young?
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:30
OH WOW INTERNET YOU LOVE SCREWING ME OVER
YES
okay i feel like a insane person in caps...
Mike Singh
@mikesingh7987
Mar 25 2016 02:32
Hi, Could you help me in this?
<style>
h2{color:blue;} <h2> CatPhotoApp</h2>
</style>
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:32
the <h2> CatPhotoApp</h2> shouldnt be in <style>
Mike Singh
@mikesingh7987
Mar 25 2016 02:33
ok
i changed that
but it still says that the element should be in blue
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:34
is this what you have? <style> h2 {color: blue;} </style>?
Mike Singh
@mikesingh7987
Mar 25 2016 02:35
<style>
h2 {color:blue;}
</style>
ZctrapCoding
@ZctrapCoding
Mar 25 2016 02:36
what challenge?
Keyan
@CapnMcStuffin
Mar 25 2016 02:36
Does it say anything about .blue-text?
Blake Harris
@bharris62
Mar 25 2016 02:36
howdy howdy
Mike Singh
@mikesingh7987
Mar 25 2016 02:36
Use CSS Selectors to Style Elements
yes capnMc it says it is not in blue
ermias777
@ermias777
Mar 25 2016 02:37
i'm having problem with the same challenge
Pawan
@pawan92
Mar 25 2016 02:37
@mikesingh7987 style="color:blue;"
ermias777
@ermias777
Mar 25 2016 02:37
this is the challenge "Override Styles in Subsequent CSS"

.blue-text {
color: blue;
}

</style>

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

BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:38
just finished that one
Keyan
@CapnMcStuffin
Mar 25 2016 02:38
Isn't the h2 element suppose to be the one that's changed, ermias?
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:38
so what you need help on that?
ermias777
@ermias777
Mar 25 2016 02:39
what do you mean? @CapnMcStuffin
Dylan
@dhcodes
Mar 25 2016 02:39
@ermias777 no it's h1 @CapnMcStuffin
ermias777
@ermias777
Mar 25 2016 02:39
i can't get it to change the color to blue
Dylan
@dhcodes
Mar 25 2016 02:39
@ermias777 you need to make the CSS for pink-text
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:39
@ermias777 one class only
Mike Singh
@mikesingh7987
Mar 25 2016 02:39

Instructions are Inside that style element, you can create a CSS selector for all h2 elements. For example, if you wanted all h2 elements to be red, your style element would look like this:

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

ermias777
@ermias777
Mar 25 2016 02:39
@BrewCoffeeSplash
Mike Singh
@mikesingh7987
Mar 25 2016 02:39
@pawan92 yes tried this
ermias777
@ermias777
Mar 25 2016 02:40
i have @dhcodes
Dylan
@dhcodes
Mar 25 2016 02:40
@ermias777 you are on the right track just put both classes in the same class=" "
with a space between them
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:40
@ermias777 go down the list of what you need done.
ermias777
@ermias777
Mar 25 2016 02:40
i did that but then the colors revert back to green? @dhcodes
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:41
@ermias777 what's your code look like now?
Dylan
@dhcodes
Mar 25 2016 02:41
@ermias777 what'd you put? can you paste the code
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:41
did you make a blue-text class?
ermias777
@ermias777
Mar 25 2016 02:42
I need to change the color to blue, keep the class in one h1 element and have both pink-text and blue-text @BrewCoffeeSplash
yes i did both @BrewCoffeeSplash
Dylan
@dhcodes
Mar 25 2016 02:42
@ermias777 paste you latest code
ermias777
@ermias777
Mar 25 2016 02:42

.pink-text {
color: pink;
}

.blue-text {
color: blue;
}

</style>

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

Keyan
@CapnMcStuffin
Mar 25 2016 02:42
In regards to the the href and the hash symbol, do I just remove the href and use the #?
ermias777
@ermias777
Mar 25 2016 02:42
@dhcodes
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:42
use one class only
Dylan
@dhcodes
Mar 25 2016 02:42
@ermias777 you need to combine them in the same class as I said
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:42

Applying multiple class attributes to a HTML element is done with a space between them like this:

class="class1 class2"

Pawan
@pawan92
Mar 25 2016 02:43
@mikesingh7987 which challenge is that
Dylan
@dhcodes
Mar 25 2016 02:43
high-five @BrewCoffeeSplash
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:43
Override Styles in Subsequent CSS
always re-read the instructions
ask yourself what exactly does it want
ermias777
@ermias777
Mar 25 2016 02:43
Okay when i do that i still get no change @BrewCoffeeSplash @dhcodes
Dylan
@dhcodes
Mar 25 2016 02:43
paste the new code
oh, also @ermias777 do you have an opening <style> tag?
in your code you only have closing </style>
Chris Humphreys
@ChrisCHumphreys
Mar 25 2016 02:44
hey everyone, i just finished the Seek and Destroy javascript challenge after like 3 hours. my code works but is ugly. is there an example of a more elegant way to do this out there.
Mike Singh
@mikesingh7987
Mar 25 2016 02:44
@pawan92 Use CSS Selectors to Style Elements
Dylan
@dhcodes
Mar 25 2016 02:45
@geochris35 don't overuse it but if you look on the FCC github you can see other solutions
ermias777
@ermias777
Mar 25 2016 02:45
<h1 class="pink-text" "blue-text">Hello World
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:45
no ""
Chris Humphreys
@ChrisCHumphreys
Mar 25 2016 02:45
@dhcodes thanks. it is obvious from my code that i didn't copy. I appreciate it.
CamperBot
@camperbot
Mar 25 2016 02:45
geochris35 sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
ermias777
@ermias777
Mar 25 2016 02:45
i do have one it's at the top @dhcodes
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:45
put "both colors"
CamperBot
@camperbot
Mar 25 2016 02:45
:star: 473 | @dhcodes | http://www.freecodecamp.com/dhcodes
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:46
@ermias777 both colors in "......"
ermias777
@ermias777
Mar 25 2016 02:46
oh in one " "
@BrewCoffeeSplash
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:46
yeah

Applying multiple class attributes to a HTML element is done with a space between them like this:

class="class1 class2"

ermias777
@ermias777
Mar 25 2016 02:46
got you
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:46
the small things will always get you
ermias777
@ermias777
Mar 25 2016 02:46
i read that, but i don't know what i was thinking and yes they will
thanks @BrewCoffeeSplash
CamperBot
@camperbot
Mar 25 2016 02:46
ermias777 sends brownie points to @brewcoffeesplash :sparkles: :thumbsup: :sparkles:
:star: 82 | @brewcoffeesplash | http://www.freecodecamp.com/brewcoffeesplash
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:47
no prob
hooray @ermias777
ermias777
@ermias777
Mar 25 2016 02:48
@dhcodes thanks for your help to
CamperBot
@camperbot
Mar 25 2016 02:48
ermias777 sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star: 474 | @dhcodes | http://www.freecodecamp.com/dhcodes
Mike Singh
@mikesingh7987
Mar 25 2016 02:48

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

<h2>CAtPhotoApp</h2>

ermias777
@ermias777
Mar 25 2016 02:48
too*
Keyan
@CapnMcStuffin
Mar 25 2016 02:50
So, anyone knows how ti make the href a dead link using #?
Dylan
@dhcodes
Mar 25 2016 02:50
a href="#"
<a href="#"> </a>
there @CapnMcStuffin the second one lol
Keyan
@CapnMcStuffin
Mar 25 2016 02:50
Thanks. :D
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:51
think of it as a placeholder
Keyan
@CapnMcStuffin
Mar 25 2016 02:51
I kept removing the href and using <a #=
Wyndom Westcott
@WyndomlWestcott
Mar 25 2016 02:51
hey guys, could someone help me with this section Im finishing the Html section but I cant figure out what this wont work?
<form action="/submit-cat-photo"></form>
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:51
the/ before submit
@WyndomlWestcott
Wyndom Westcott
@WyndomlWestcott
Mar 25 2016 02:52
@BrewCoffeeSplash thanks buddy
CamperBot
@camperbot
Mar 25 2016 02:52
wyndomlwestcott sends brownie points to @brewcoffeesplash :sparkles: :thumbsup: :sparkles:
:star: 83 | @brewcoffeesplash | http://www.freecodecamp.com/brewcoffeesplash
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:52
i'm just kinda good at syntax. i'm newbin hard atm
Kiltreiser
@Kiltreiser
Mar 25 2016 02:53
Was just about to ask for help, checked my code one more time... what a difference a missing space makes!
CalebAllard
@CalebAllard
Mar 25 2016 02:55
Please check out my tribute page http://codepen.io/CalebAllard/full/vGmbYg/
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 02:57
@CalebAllard It looks simple and elegant. Bit too much empty space on the sides for my taste
cannelflow
@cannelflow
Mar 25 2016 02:57
@CalebAllard :+1:
CalebAllard
@CalebAllard
Mar 25 2016 02:58
@BrewCoffeeSplash thank you for you feedback @cannelflow thank you
CamperBot
@camperbot
Mar 25 2016 02:58
caleballard sends brownie points to @brewcoffeesplash and @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 1008 | @cannelflow | http://www.freecodecamp.com/cannelflow
:star: 84 | @brewcoffeesplash | http://www.freecodecamp.com/brewcoffeesplash
Dylan
@dhcodes
Mar 25 2016 03:01
@CalebAllard I have to look close to find something to hark on, but it's usually not recommended to use pre-phrases like "Click here" with your links because it's somewhat unnecessary with traditional link styling and is not in line with accessibility guidelines
@CalebAllard good work overall!
Keyan
@CapnMcStuffin
Mar 25 2016 03:02
@dhcodes What would you prefer using rather than Click here?
Wyndom Westcott
@WyndomlWestcott
Mar 25 2016 03:03
@BrewCoffeeSplash Im not sure how to make it work "Nest your text input element within a form element."
Dylan
@dhcodes
Mar 25 2016 03:03
@CapnMcStuffin just something like "Read about Mahatma Ghandi" or something
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 03:04
@WyndomlWestcott which challenge?
Dylan
@dhcodes
Mar 25 2016 03:05
@CapnMcStuffin from WebAIM
Links should make sense out of context. Phrases such as "click here," "more," "click for details," and so on are ambiguous when read out of context. At the same time, it would be overkill to ensure that every detail about a link destination is discernible by listening to the link context. Users wouldn't want to hear "Products page on which a list of all of our products are presented, including software products and training products, with a list of prices and availability by region (this page uses the same navigation template as the page you are now on)." Perhaps a better alternative would be a link that simply says "Products."
lazerfire15
@lazerfire15
Mar 25 2016 03:05
<style>
  .red-text {
    color: red;
    font-size: 16px;
  }
</style>

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

<p> Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
i cant seem to get this to go through on change the font size of an element
V Bhargav Chowdary
@bhargav4
Mar 25 2016 03:06
http://codepen.io/bhargav14/pen/MyKxyN
Image not in the middle of the div in my twitch api project.
I couldn't figure out whats changing the position of img.
Though it can be fixed with position:relative i want to know whats misplacing the image
Dylan
@dhcodes
Mar 25 2016 03:07
@lazerfire15 read the instructions carefully. You need to give p class the font-size attribute
Keyan
@CapnMcStuffin
Mar 25 2016 03:07
@dhcodes I see, I'll keep that in mind for future references. Thanks.
CamperBot
@camperbot
Mar 25 2016 03:07
capnmcstuffin sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star: 477 | @dhcodes | http://www.freecodecamp.com/dhcodes
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 03:07
@lazerfire15 you need p details in <style> defined
lazerfire15
@lazerfire15
Mar 25 2016 03:08
how do i send brownie points?
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 03:08
@lazerfire15 its asks that you make a p element in <style> that defines the text size
say thanks and their name
do @ or click their name
Keyan
@CapnMcStuffin
Mar 25 2016 03:08
Both works.
lazerfire15
@lazerfire15
Mar 25 2016 03:08
thanks @BrewCoffeeSplash
CamperBot
@camperbot
Mar 25 2016 03:08
lazerfire15 sends brownie points to @brewcoffeesplash :sparkles: :thumbsup: :sparkles:
:star: 85 | @brewcoffeesplash | http://www.freecodecamp.com/brewcoffeesplash
lazerfire15
@lazerfire15
Mar 25 2016 03:10
what do you do to make a p element, in style?
im a c++ programmer, this is kinda new
Dylan
@dhcodes
Mar 25 2016 03:10
@bhargav4 you need to add css to your img tag
@lazerfire15 p {
font-size: 16px;
}
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 03:10
@lazerfire15 p {stuff and things ;}
lazerfire15
@lazerfire15
Mar 25 2016 03:11
<style>
  p {
  .red-text{
    color: red;
    font-size: 16px;
  }
  }
V Bhargav Chowdary
@bhargav4
Mar 25 2016 03:11
@dhcodes You mean position?
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 03:12
.red-text should be by itself i think
Dilson E. Fernandes
@DilsonDev
Mar 25 2016 03:12
hi guys
Keyan
@CapnMcStuffin
Mar 25 2016 03:12
Hey.
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 03:13
.red-text {stuff and things;}
p {other stuff;}
Dylan
@dhcodes
Mar 25 2016 03:13
@bhargav4 do you just want the image centered horizontally or vertically? or both?
lazerfire15
@lazerfire15
Mar 25 2016 03:13
thanks @BrewCoffeeSplash
CamperBot
@camperbot
Mar 25 2016 03:13
lazerfire15 sends brownie points to @brewcoffeesplash :sparkles: :thumbsup: :sparkles:
:warning: lazerfire15 already gave brewcoffeesplash points
V Bhargav Chowdary
@bhargav4
Mar 25 2016 03:13
@dhcodes Vertical
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 03:14
it's cuz you're defining what the class .red-text is. dont think you can do a definition while defining what goes in <P>
lazerfire15
@lazerfire15
Mar 25 2016 03:18
thank you i got through, and learned alot
dkennell
@dkennell
Mar 25 2016 03:20
@lazerfire15 Yeah, whenever you see a dot in front of something in the <style> tags, you're making a class. You're basically making a rule for how everything with that class is going to look from now on. When you use the <p> tag inside of the <style> tags, you're specifying how everything with the <p> tag is going to look from now on.
Cully
@CTGC415
Mar 25 2016 03:20
Hi can anyone help me make my Nav Bar in code pen active?
Dylan
@dhcodes
Mar 25 2016 03:22
@bhargav4 well this will fix it but it's not elegant
img {
margin-top: -12px;
}
lol
sorry I gotta go and that's the best I got @bhargav4
V Bhargav Chowdary
@bhargav4
Mar 25 2016 03:23
@dhcodes No prob
Thanks for the help
CamperBot
@camperbot
Mar 25 2016 03:23
bhargav4 sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star: 478 | @dhcodes | http://www.freecodecamp.com/dhcodes
V Bhargav Chowdary
@bhargav4
Mar 25 2016 03:23
@CTGC415 paste link to your codepen here
Esterling Accime Youtube
@accimeesterlin
Mar 25 2016 03:25
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"
}
};
V Bhargav Chowdary
@bhargav4
Mar 25 2016 03:25
@dhcodes I figured out the problem.
I have used line-heightto align the text to the middle of the div. That was causing the preoblem
Esterling Accime Youtube
@accimeesterlin
Mar 25 2016 03:26
Anybody know how to properties to this object
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"
}
};
ZctrapCoding
@ZctrapCoding
Mar 25 2016 03:28
I made my nav finnaly! :D
what do you think of it? http://codepen.io/Zctrap/pen/PNmMgm
Cornelius Gee Ywe Chung
@cgyc6688
Mar 25 2016 03:34
looking good
ZctrapCoding
@ZctrapCoding
Mar 25 2016 03:34
thx
took me about 2 hours but was worth it!
it was
Cully
@CTGC415
Mar 25 2016 03:35
@bhargav4
'''
CamperBot
@camperbot
Mar 25 2016 03:36
:bulb: to format code use backticks! ``` more info
Cully
@CTGC415
Mar 25 2016 03:39

@bhargav4
'''

<body data-spy="scroll" data-target=".navbar" data-offset="50">
<!--Navigation Bar; with data scroll spy-->

<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header navbar-right">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Cully Curwen</a>
</div>
<div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div>
</div>
</div>
</nav>

<div id="home" class ="page container-fluid" style="background-color: red;">
<p>2 THE TAMING OF A SHREW

And darksome night o'crshadcs the crystal heavens,

Here break we off our hunting for to-night:

Couple up the hounds and let us hie us home,

And bid the huntsmen see them meated well, 1 6
</p>

</div>

<div id="about" class="page container-fluid" style="background-color: blue;">
<p>2 THE TAMING OF A SHREW

And darksome night o'crshadcs the crystal heavens,

Here break we off our hunting for to-night:

Couple up the hounds and let us hie us home,

And bid the huntsmen see them meated well, 1 6

For they have all deserved it well to-day.
</p>
</div>

<div id="portfolio" class="page container-fluid" style="background-color: yellow;">
<p>2 THE TAMING OF A SHREW

And darksome night o'crshadcs the crystal heavens,

Here break we off our hunting for to-night:

Couple up the hounds and let us hie us home,
</p>
</div>

<div id="contact" class="page container-fluid" style="background-color: green;">
<p>2 THE TAMING OF A SHREW

And darksome night o'crshadcs the crystal heavens,

Here break we off our hunting for to-night:

Couple up the hounds and let us hie us home,
</p>
</div>
</body>
'''

CamperBot
@camperbot
Mar 25 2016 03:39
:bulb: to format code use backticks! ``` more info
Cully
@CTGC415
Mar 25 2016 03:41
@bhargav4 , third time lucky!
<body data-spy="scroll" data-target=".navbar" data-offset="50">
<!--Navigation Bar; with data scroll spy-->
<nav class="navbar navbar-inverse navbar-fixed-top">
  <div class="container-fluid">
    <div class="navbar-header navbar-right">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Cully Curwen</a>
    </div>
    <div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav">
      <li><a href="#home">Home</a></li>
      <li><a href="#about">About</a></li>
      <li><a href="#portfolio">Portfolio</a></li>
      <li><a href="#contact">Contact</a></li>
    </ul>
    </div>
    </div>
  </div>
</nav>


  <div id="home" class ="page container-fluid" style="background-color: red;">
    <p>2 THE TAMING OF A SHREW 

And darksome night o'crshadcs the crystal heavens, 

Here break we off our hunting for to-night: 

Couple up the hounds and let us hie us home, 

And bid the huntsmen see them meated well, 1 6 
</p>

  </div>

  <div id="about" class="page container-fluid" style="background-color: blue;">
    <p>2 THE TAMING OF A SHREW 

And darksome night o'crshadcs the crystal heavens, 

Here break we off our hunting for to-night: 

Couple up the hounds and let us hie us home, 

And bid the huntsmen see them meated well, 1 6 

For they have all deserved it well to-day. 
</p>
  </div>

  <div id="portfolio" class="page container-fluid" style="background-color: yellow;">
    <p>2 THE TAMING OF A SHREW 

And darksome night o'crshadcs the crystal heavens, 

Here break we off our hunting for to-night: 

Couple up the hounds and let us hie us home, 
</p>
  </div>

  <div id="contact" class="page container-fluid" style="background-color: green;">
    <p>2 THE TAMING OF A SHREW 

And darksome night o'crshadcs the crystal heavens, 

Here break we off our hunting for to-night: 

Couple up the hounds and let us hie us home, 
</p>
  </div>
</body>
V Bhargav Chowdary
@bhargav4
Mar 25 2016 03:42
@CTGC415 It would be easier for me if you could link the codepen itself.
BrewCoffeeSplash
@BrewCoffeeSplash
Mar 25 2016 03:55
@CTGC415 interesting color choices....
@CTGC415 Tad bit difficult to read at all
M
@Morasthite
Mar 25 2016 03:56
hi, Would some one mind helping me with selectors ?
DJ
@qualitymanifest
Mar 25 2016 03:56
@Morasthite just ask
M
@Morasthite
Mar 25 2016 03:56
This message was deleted
<div class="dialogGameoverButtons">
<input id="dialog_gameover_newgame_button_15802" type="button" class="button-submit" value="New 1 Min">
<input id="dialog_gameover_rematch_button_15802" type="button" class="button-cancel" value="Rematch">
<input id="dialog_gameover_close_button_15802" type="button" class="button-cancel" value="Close">
</div>
V Bhargav Chowdary
@bhargav4
Mar 25 2016 03:57
@CTGC415 You forgot to add bootstrap.js
DJ
@qualitymanifest
Mar 25 2016 03:57
@Morasthite target the ID.
Cully
@CTGC415
Mar 25 2016 03:57
@BrewCoffeeSplash
just meant to be temporary, to help see the use of the nav bar
M
@Morasthite
Mar 25 2016 03:57
Can not use JS only CSS
DJ
@qualitymanifest
Mar 25 2016 03:57
@Morasthite yeah i missed that part
still, target the ID
Cully
@CTGC415
Mar 25 2016 03:57
@bhargav4 ah thank you
CamperBot
@camperbot
Mar 25 2016 03:57
ctgc415 sends brownie points to @bhargav4 :sparkles: :thumbsup: :sparkles:
:star: 345 | @bhargav4 | http://www.freecodecamp.com/bhargav4
DJ
@qualitymanifest
Mar 25 2016 03:58
#idGoesHere {

}
M
@Morasthite
Mar 25 2016 03:58
I can not target the id, the second button will Also be picked up
<div class="dialogGameoverButtons">
<input id="dialog_gameover_newgame_button_15802" type="button" class="button-submit" value="New 1 Min">
<input id="dialog_gameover_rematch_button_15802" type="button" class="button-cancel" value="Rematch">
<input id="dialog_gameover_close_button_15802" type="button" class="button-cancel" value="Close">
</div>
DJ
@qualitymanifest
Mar 25 2016 03:58
@Morasthite no it won't... the second and third classes are the same, but the IDs are unique, as they should be
M
@Morasthite
Mar 25 2016 04:00
oh forgive me, I forgot, I can not use id because the number 15802 changes with new instances or refresh of the page
Cully
@CTGC415
Mar 25 2016 04:00
@bhargav4 have now applied bootstrap.js
still do not get active display on nav bar
DJ
@qualitymanifest
Mar 25 2016 04:01
This message was deleted
M
@Morasthite
Mar 25 2016 04:01
I am thinking nth child selector should work here, but i am not using it correctly, how would you use nth child selector to pick out the third input element?
in this case attribute is value and value is Close
input[value=Close]
M
@Morasthite
Mar 25 2016 04:03
Awesome, let me try that out. thanks
DJ
@qualitymanifest
Mar 25 2016 04:03
never used that selector but it sounds like it should work
V Bhargav Chowdary
@bhargav4
Mar 25 2016 04:04
@CTGC415 That's Strange
have you added both jquery and bootstrap.js
Moving jquery above bootstrap.js in the settings
Cully
@CTGC415
Mar 25 2016 04:08
@bhargav4 Brilliant, Thank you that has done the Job!
CamperBot
@camperbot
Mar 25 2016 04:08
ctgc415 sends brownie points to @bhargav4 :sparkles: :thumbsup: :sparkles:
:warning: ctgc415 already gave bhargav4 points
Frank XC
@tenkdayz
Mar 25 2016 04:12
having trouble with the wehre art thou challenge.. I've given it a while before asking for help
Thomas Luong
@luongthomas
Mar 25 2016 05:14
Hello guys
I was having a bit of trouble adding a twitter button to my quote application
It only captures and tweets the first quote that is generated
adityac0620
@adityac0620
Mar 25 2016 05:30
'<style>
body {
background-color: rgb(225,165,0);
}
</style>
'
is it right
for color orange
Clare Dickerson
@claredickerson
Mar 25 2016 05:35
I found a fun header text effect to use and I love it but now I can't make the container responsive without ruining it. :anguished: :anguished: :anguished:
I'm guessing it's because it's set to background-size: cover
Luis Pedro Juarez Aguilar
@Luispegt
Mar 25 2016 05:38
Hola
Coy Sanders
@coymeetsworld
Mar 25 2016 05:38
255-165-0 @adityac0620
hnry
@hnry
Mar 25 2016 05:44
@claredickerson what's it look like?
Adi
@kiniadit
Mar 25 2016 06:07
I'm unable to open the "sum all odd Fibonacci numbers" exercise. Browser tab freezes crashes as soon a I try to open it. Doesn't happen with any other link on freecodecamp
Any reasons why?
anthonygallina1
@anthonygallina1
Mar 25 2016 06:10
@claredickerson can I lookat it please
Aayush Kapoor
@xeoneux
Mar 25 2016 06:13
@kiniadit Try:
Go to the map page.
Right click and choose 'inspect'.
Click on 'resources'.
Click on 'local storage'.
Click on the freecodecamp URL.
Right click the bonfire in the list and click 'delete'.
Adi
@kiniadit
Mar 25 2016 06:16
@xeoneux thanks! That worked perfectly.
CamperBot
@camperbot
Mar 25 2016 06:16
kiniadit sends brownie points to @xeoneux :sparkles: :thumbsup: :sparkles:
:star: 377 | @xeoneux | http://www.freecodecamp.com/xeoneux
huangyunjie
@hyj1993612
Mar 25 2016 06:40
If I use ajax to get a string of strings, but actually it is a section of JavaScript code, how can I perform this code?
hnry
@hnry
Mar 25 2016 06:44
@hyj1993612 what does this string of strings look like?
huangyunjie
@hyj1993612
Mar 25 2016 06:47
I do not know how to say, I just want to achieve not on the basis of the original code, but by way of data transmission, to carry out my data in the code
hnry
@hnry
Mar 25 2016 06:48
@hyj1993612 but i have to know do you actually mean "'string 1', 'string 2'" ? or "function(){}" like what does the string look like?
Aaron Malig
@aamalig
Mar 25 2016 06:50
hi to all
I just noticed that the 'Loving' check box from 'Responsively Style Checkboxes' is not align inside the row.
Justin Steele
@JustinSteele02
Mar 25 2016 06:53
I'm trying to complete exercise 10. Publish Again in the npm tutorials and getting this error when I try to verify
Error: Cannot find module '/home/ubuntu/.config/how-to-npm/registry/tutorial-project/body.json'
i mean check box*
DJ
@qualitymanifest
Mar 25 2016 07:05
@aamalig paste a link to the challenge, so people can see if they have the same issue
Jaren Lynch
@JarenL
Mar 25 2016 07:05
Could somebody help me with my palindrome check code?
DJ
@qualitymanifest
Mar 25 2016 07:05
@Jaren831 dont ask to ask. just ask.
Jaren Lynch
@JarenL
Mar 25 2016 07:06

function palindrome(str) {
// Good luck!
var lower = str.toLowerCase();
var paliArray = lower.split("");
var letters = /[a-z]+$/;
for (var i = 0; i < paliArray.length; i++) {
if (paliArray[i] !== /^[a-z]+$/) {
delete paliArray[i];
}
}
if (paliArray.join("") === paliArray.reverse().join("")) {
return true;
}
return false;

}
palindrome("eye");

Not working?
DJ
@qualitymanifest
Mar 25 2016 07:08
@Jaren831 you can't delete from an array, only an object
@Jaren831 also your regex is off. what are you trying to do with [a-z]+$?
Aaron Malig
@aamalig
Mar 25 2016 07:09
https://www.freecodecamp.com/challenges/responsively-style-checkboxes#?solution=%3Clink%20href%3D%22http%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%0A%3C%2Fstyle%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-8%22%3E%0A%20%20%20%20%20%20%3Ch2%20class%3D%22text-primary%20text-center%22%3ECatPhotoApp%3C%2Fh2%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Ca%20href%3D%22%23%22%3E%3Cimg%20class%3D%22img-responsive%20thick-green-border%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%3C%2Fa%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%20%20%3Cimg%20src%3D%22http%3A%2F%2Fbit.ly%2Ffcc-running-cats%22%20class%3D%22img-responsive%22%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-block%20btn-primary%22%3E%3Ci%20class%3D%22fa%20fa-thumbs-up%22%3E%3C%2Fi%3E%20Like%3C%2Fbutton%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-block%20btn-info%22%3E%3Ci%20class%3D%22fa%20fa-info-circle%22%3E%3C%2Fi%3E%20Info%3C%2Fbutton%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-block%20btn-danger%22%3E%3Ci%20class%3D%22fa%20fa-trash%22%3E%3C%2Fi%3E%20Delete%3C%2Fbutton%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%20%20%3Cp%3EThings%20cats%20%3Cspan%20class%3D%22text-danger%22%3Elove%3A%3C%2Fspan%3E%3C%2Fp%3E%0A%20%20%3Cul%3E%0A%20%20%20%20%3Cli%3Ecat%20nip%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elaser%20pointers%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elasagna%3C%2Fli%3E%0A%20%20%3C%2Ful%3E%0A%20%20%3Cp%3ETop%203%20things%20cats%20hate%3A%3C%2Fp%3E%0A%20%20%3Col%3E%0A%20%20%20%20%3Cli%3Eflea%20treatment%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Ethunder%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Eother%20cats%3C%2Fli%3E%0A%20%20%3C%2Fol%3E%0A%20%20%3Cform%20fccfaa%3D%22%2Fsubmit-cat-photo%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22radio%22%20name%3D%22indoor-outdoor%22%3E%20Indoor%3C%2Flabel%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22radio%22%20name%3D%22indoor-outdoor%22%3E%20Outdoor%3C%2Flabel%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Loving%3C%2Flabel%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Lazy%3C%2Flabel%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Crazy%3C%2Flabel%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cinput%20type%3D%22text%22%20placeholder%3D%22cat%20photo%20URL%22%20required%3E%0A%20%20%20%20%3Cbutton%20type%3D%22submit%22%3ESubmit%3C%2Fbutton%3E%0A%20%20%3C%2Fform%3E%0A%3C%2Fdiv%3E%0A
Thats the link I got
for the challenge. Thanks
Jaren Lynch
@JarenL
Mar 25 2016 07:10
@qualitymanifest Trying to cycle through array and if it's not a letter delete it
Ankit Pandey
@ankitwebs
Mar 25 2016 07:12
Hi....everyone
I am at Level 91 in 3 days.. am i doing good ?
DJ
@qualitymanifest
Mar 25 2016 07:13
@aamalig i get the same issue. it's a very minor issue, but you can submit it as a bug if you want
Aaron Malig
@aamalig
Mar 25 2016 07:14
@qualitymanifest might submit it. but would you know the solution to make it aligned
DJ
@qualitymanifest
Mar 25 2016 07:14
@Jaren831 for starters, look into replace. it's in the "helpful links" for that challenge
Jaren Lynch
@JarenL
Mar 25 2016 07:18
@qualitymanifest I'm not sure how to implement it
DJ
@qualitymanifest
Mar 25 2016 07:20
@Jaren831 pseudocode is:
str = str with non-alphanumerics removed
compare the new str with itself reversed
if it's the same, return true. else, return false
str = str.replace(/non alphanumerics/g, '')
obviously "non alphanumerics" isn't valid regex. you need to figure that part out for yourself. the g flag signifies "global", meaning, you replace every match, not just the first one. and the '' means replace with nothing, A.K.A. delete
dennis-noah
@dennis-noah
Mar 25 2016 07:24
hey guys
can I ask you something?
I am in the most easy challenge ever
but somehow it doesnt work
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
Jaren Lynch
@JarenL
Mar 25 2016 07:25
@qualitymanifest ok i think i understand
dennis-noah
@dennis-noah
Mar 25 2016 07:25
<style>
.red-text {
color: red;
},
p {
font-size: 16px;
}
</style>
thats exactly what I did but it still doesnt work
DJ
@qualitymanifest
Mar 25 2016 07:27
@aamalig TBH i really don't care about that issue but i solved it in a couple of crappy ways just for fun - give the label that contains "loving" an ID and style it with a smaller font-size, or give it display: flex
dennis-noah
@dennis-noah
Mar 25 2016 07:27
ah doesnt matter I found it out
DJ
@qualitymanifest
Mar 25 2016 07:27
@dennis-noah you shouldnt have a comma after the closing semicolon for .red-text
dennis-noah
@dennis-noah
Mar 25 2016 07:27
the , was the mistake
DJ
@qualitymanifest
Mar 25 2016 07:27
yerp
dennis-noah
@dennis-noah
Mar 25 2016 07:28
yees, sorry for that question :panda_face:
Thanks for the help anyway
DJ
@qualitymanifest
Mar 25 2016 07:28
no worries
going to sleep. night everybody.
dennis-noah
@dennis-noah
Mar 25 2016 07:31
night
sleep well
Jaren Lynch
@JarenL
Mar 25 2016 07:49
@qualitymanifest i did it lol
@qualitymanifest
function palindrome(str) {
// Good luck!
str = str.toLowerCase();
str = str.replace(/[^a-z0-9]/g, "");
return str === str.split("").reverse().join("");
}
palindrome("eye");
@qualitymanifest thanks
CamperBot
@camperbot
Mar 25 2016 07:49
jaren831 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1115 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Ryan9491
@Ryan9491
Mar 25 2016 07:55
Hey,
I'm having trouble with the "use responsive design with bootstrap fluid containers"
I don't really know where to put the div element
Justin Steele
@JustinSteele02
Mar 25 2016 07:57
@Ryan9491 The div should go around all of the html that structures content on the page. So around everything after the </style> tag.
@Ryan9491 It will also pass if you just put the div around everything, but it is more correct to put it around the stuff after the style tags.
Ryan9491
@Ryan9491
Mar 25 2016 07:59
Thanks, I had that actually and <div class:"container-fluid"> would be my first div tag?
Justin Steele
@JustinSteele02
Mar 25 2016 08:00
`class="container-fluid"
equals instead of colon
ignore that first ` mark, I goofed
class="container-fluid"
Ryan9491
@Ryan9491
Mar 25 2016 08:01
Sweet! got it, thanks :smile:
Justin Steele
@JustinSteele02
Mar 25 2016 08:01
no problem!
dennis-noah
@dennis-noah
Mar 25 2016 08:03
hey
A question
<p>Click here for <a #>cat photos</a>.</p> am I using the # sign wrong?
cannelflow
@cannelflow
Mar 25 2016 08:03
@dennis-noah <a href="#"></a>
dennis-noah
@dennis-noah
Mar 25 2016 08:04
@cannelflow I see. Thanks!
CamperBot
@camperbot
Mar 25 2016 08:04
dennis-noah sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 1009 | @cannelflow | http://www.freecodecamp.com/cannelflow
Steven Osterwald
@keks411
Mar 25 2016 08:35
Could someone give me a hint on why I cant retrieve my location on this pen
Harsh Khandelwal
@harsh2602
Mar 25 2016 08:59
@keks411 how are you trying to call getLocation()?
Steven Osterwald
@keks411
Mar 25 2016 09:01
@harsh2602 I simply copy pasted code from W3School into a "on click button event"
´´´js

´´´js

function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
x.innerHTML = "Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}´´´js

doesnt work but thats my code here
but even that wont work...and I dont understand why
Manikanth
@manikanth1024
Mar 25 2016 09:02
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){
    if(contacts[i].hasOwnProperty(prop)){
    return contacts[i].prop;
  }
    else 
      return "No such property";

 }
}
  return "No such contact";

// Only change code above this line

}
// Change these values to test your function
lookUp("Akira", "likes");
Harsh Khandelwal
@harsh2602
Mar 25 2016 09:02
@keks411 That I am aware of but there you did not notice <button onclick="getLocation()">Try It</button>
Manikanth
@manikanth1024
Mar 25 2016 09:02
what's wrong w/the above code?
Harsh Khandelwal
@harsh2602
Mar 25 2016 09:02
@keks411 the onclick calls getLocation()
Malin Sundin
@MaoMaolin
Mar 25 2016 09:04
good morning! :coffee:
Steven Osterwald
@keks411
Mar 25 2016 09:04
@harsh2602 ...yes overlooked that...Thank you. Easy fix again.
CamperBot
@camperbot
Mar 25 2016 09:04
keks411 sends brownie points to @harsh2602 :sparkles: :thumbsup: :sparkles:
:star: 281 | @harsh2602 | http://www.freecodecamp.com/harsh2602
Harsh Khandelwal
@harsh2602
Mar 25 2016 09:04
@keks411 it's better you try the ip-api which uses IP address to fetch longitude and latitude..
Steven Osterwald
@keks411
Mar 25 2016 09:05
@harsh2602 I know...I wanted to try first if it works at all before I do anything with the API.
Markus Kiili
@Masd925
Mar 25 2016 09:06
@manikanth1024 When the property key is in a variable, you have to use bracket notation.
Harsh Khandelwal
@harsh2602
Mar 25 2016 09:11
http://codepen.io/harsh2602/pen/oxWdxR Can someone let me know how can I set the footer at the bottom once the list is populated?
Kevin
@KevinBruland
Mar 25 2016 09:14
Does anyone by chance know of an easy way to add margins in a bootstrap column?
Lawrence Eagles
@lawrenceagles
Mar 25 2016 09:18
can anyonetell me how to remove all the back slash and replace them using both double and single quotes. var myStr = "<a href=\"http://www.example.com\" target= '_blank'>Link</a>"; I find this exercise tricky.
Kelvin
@loweehahn
Mar 25 2016 09:26
Referring to the challenge "Create a Class to Target with jQuery Selectors", can anyone please tell me what's the meaning of target class?
João Castanho
@joaocastanho
Mar 25 2016 09:27
have anyone gotten a job through free code camp?
Kelvin
@loweehahn
Mar 25 2016 09:27
I would like to know too.
PhuTaliban
@PhuTaliban
Mar 25 2016 09:30
i have problem "Your a element should be a dead link with a href attribute set to "#"". Can anyone help me
João Castanho
@joaocastanho
Mar 25 2016 09:31
@PhyTaliban <a href="#"></a>
PhuTaliban
@PhuTaliban
Mar 25 2016 09:32
thank you
João Castanho
@joaocastanho
Mar 25 2016 09:32
no problem. ;)
Kelvin
@loweehahn
Mar 25 2016 09:32
@joaocastanho Referring to the challenge "Create a Class to Target with jQuery Selectors", can you please tell me what's the meaning of target class?
Prashant Madhukar
@pmadhukar99
Mar 25 2016 09:33
can anyone check my answer?
https://www.freecodecamp.com/challenges/give-a-background-color-to-a-div-element#?solution=%3Clink%20href%3D%22https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%20%20.grey-background%20%7Bbackground-color%3A%20grey%3B%7D%0A%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%0A%20%20.smaller-image%20%7B%0A%20%20%20%20width%3A%20100px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%3Cp%3EClick%20here%20for%20%3Ca%20href%3D%22%23%22%3Ecat%20photos%3C%2Fa%3E.%3C%2Fp%3E%0A%0A%3Ca%20href%3D%22%23%22%3E%3Cimg%20class%3D%22smaller-image%20thick-green-border%22%20alt%3D%22A%20cute%20orange%20cat%20lying%20on%20its%20back%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%3C%2Fa%3E%0A%0A%3Cdiv%20class%3D%22grey-background%22%3E%0A%20%20%3Cp%3EThings%20cats%20love%3A%3C%2Fp%3E%0A%20%20%3Cul%3E%0A%20%20%20%20%3Cli%3Ecat%20nip%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elaser%20pointers%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elasagna%3C%2Fli%3E%0A%20%20%3C%2Ful%3E%0A%20%20%3Cp%3ETop%203%20things%20cats%20hate%3A%3C%2Fp%3E%0A%20%20%3Col%3E%0A%20%20%20%20%3Cli%3Eflea%20treatment%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Ethunder%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Eother%20cats%3C%2Fli%3E%0A%20%20%3C%2Fol%3E%0A%3C%2Fdiv%3E%0A%0A%3Cform%20fccfaa%3D%22%2Fsubmit-cat-photo%22%3E%0A%20%20%3Clabel%3E%3Cinput%20type%3D%22radio%22%20name%3D%22indoor-outdoor%22%20checked%3E%20Indoor%3C%2Flabel%3E%0A%20%20%3Clabel%3E%3Cinput%20type%3D%22radio%22%20name%3D%22indoor-outdoor%22%3E%20Outdoor%3C%2Flabel%3E%0A%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%20checked%3E%20Loving%3C%2Flabel%3E%0A%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Lazy%3C%2Flabel%3E%0A%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Energetic%3C%2Flabel%3E%0A%20%20%3Cinput%20type%3D%22text%22%20placeholder%3D%22cat%20photo%20URL%22%20required%3E%0A%20%20%3Cbutton%20type%3D%22submit%22%3ESubmit%3C%2Fbutton%3E%0A%3C%2Fform%3E%0A
dont know whats the error
Niko Salonen
@nikosalonen
Mar 25 2016 09:35
@pmadhukar99 typo in class name
Kelvin
@loweehahn
Mar 25 2016 09:36
@pmadhukar99 Should be gray not grey
Prashant Madhukar
@pmadhukar99
Mar 25 2016 09:37
thanks @nikosalonen @loweehahn
CamperBot
@camperbot
Mar 25 2016 09:37
pmadhukar99 sends brownie points to @nikosalonen and @loweehahn :sparkles: :thumbsup: :sparkles:
:star: 356 | @nikosalonen | http://www.freecodecamp.com/nikosalonen
:star: 101 | @loweehahn | http://www.freecodecamp.com/loweehahn
João Castanho
@joaocastanho
Mar 25 2016 09:42
@loweehahn it's supposed to be a class that you can use to do something else
for example
.btn
you can $(".btn").click();
Kelvin
@loweehahn
Mar 25 2016 09:44
@joaocastanho So in order for me to use jQuery I first need to put this target class?
João Castanho
@joaocastanho
Mar 25 2016 09:44
yes
just like class="targetname"
Kelvin
@loweehahn
Mar 25 2016 09:45
@joaocastanho Got it. Thanks!
CamperBot
@camperbot
Mar 25 2016 09:45
loweehahn sends brownie points to @joaocastanho :sparkles: :thumbsup: :sparkles:
:star: 289 | @joaocastanho | http://www.freecodecamp.com/joaocastanho
João Castanho
@joaocastanho
Mar 25 2016 09:45
No problem @loweehahn ;)
Kevin
@KevinBruland
Mar 25 2016 09:54
I am struggling a bit with responsive design elements, if someone is familiar with them and has a minute
Haroon Ghawsi
@HaroonGhawsi
Mar 25 2016 09:54
Hi All, I am trying to call the json api for my Random Quote Machine project. but I am not able to get response. can someone help me please. below is my code.
$(document).ready(function(x){
    $.getJSON("quotesondesign.com/api/3.0/api-3.0.json", function(data){
        $("#qt").html(JSON.stringify(data));
    });
I have tried this one also but not able to get any response.
$(document).ready(function(jd){
    $("#btn").click(function(event){
      alert("Clicked");
        $.getJSON("quotesondesign.com/api/3.0/api-3.0.json", function(data){
                $("#qt").html(JSON.stringify(data));

            var content = {};
            content = data;
            document.write(content);
            $("#qt").text(content);
            //$("#auth").text(content.contents.quotes[0].author);
        });
    });
});
adityac0620
@adityac0620
Mar 25 2016 09:58
thanks @coymeetsworld
CamperBot
@camperbot
Mar 25 2016 09:58
adityac0620 sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star: 385 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld
Natalia
@NIcie
Mar 25 2016 09:58
@hnry thanks a lot, I thought I'd done this
CamperBot
@camperbot
Mar 25 2016 09:58
nicie sends brownie points to @hnry :sparkles: :thumbsup: :sparkles:
:star: 195 | @hnry | http://www.freecodecamp.com/hnry
how to align all of my pictures
Felix
@Felix020
Mar 25 2016 10:19
How do you make those black code spaces?
Steven Osterwald
@keks411
Mar 25 2016 10:19
@sennator You can throw them into a separate <div> and use grid to move them around on your page. http://www.w3schools.com/bootstrap/bootstrap_grid_examples.asp
For the div use align:center or text-align:center
Niko Salonen
@nikosalonen
Mar 25 2016 10:20
@sennator it breaks because the pics aren't all same size
Danilo
@sennator
Mar 25 2016 10:20
@keks411 thanks brother
CamperBot
@camperbot
Mar 25 2016 10:20
sennator sends brownie points to @keks411 :sparkles: :thumbsup: :sparkles:
:star: 289 | @keks411 | http://www.freecodecamp.com/keks411
Niko Salonen
@nikosalonen
Mar 25 2016 10:20
@Felix020 put your code inside
```
Felix
@Felix020
Mar 25 2016 10:21
@nikosalonen Thanks bro
CamperBot
@camperbot
Mar 25 2016 10:21
felix020 sends brownie points to @nikosalonen :sparkles: :thumbsup: :sparkles:
:star: 357 | @nikosalonen | http://www.freecodecamp.com/nikosalonen
Danilo
@sennator
Mar 25 2016 10:21
@nikosalonen do you think if i make them equal in photoshop they would align in code?
Steven Osterwald
@keks411
Mar 25 2016 10:21
@sennator Oh sorry...I see you are using grids already. But as mentioned, get them all into same size.
Danilo
@sennator
Mar 25 2016 10:22
@keks411 @nikosalonen thanks a lot guys
CamperBot
@camperbot
Mar 25 2016 10:22
sennator sends brownie points to @keks411 and @nikosalonen :sparkles: :thumbsup: :sparkles:
:warning: sennator already gave keks411 points
:star: 358 | @nikosalonen | http://www.freecodecamp.com/nikosalonen
Niko Salonen
@nikosalonen
Mar 25 2016 10:22
@sennator or at least the wrapper div same height
Steven Osterwald
@keks411
Mar 25 2016 10:22
use width= and height= in your <img>
Dhrubo Hasan
@dhrubo55
Mar 25 2016 10:23
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
what does this mean
cant seem to understand the problem
can anybody help me?
Steven Osterwald
@keks411
Mar 25 2016 10:25
@dhrubo55 style="font-size:16px"
add that to your p-tag
Dhrubo Hasan
@dhrubo55
Mar 25 2016 10:25
inline?
Steven Osterwald
@keks411
Mar 25 2016 10:26
You can do it in html inside the p-tag <p class="something" style="font-size:16px">blabla
Felix
@Felix020
Mar 25 2016 10:26

I have this code for my portfolio page navbar:

<nav class="navbar navbar-default navbar-fixed-top navbar-inverse">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">Felix</a>
    <a class="navbar-right navtext" href="#portfolio">Portfolio</a>
    <a class="nav2text navbar-right" href="#about">About me</a>
  </div>
</nav>

I want my name on the left, and my buttons on the right, which they currently are because of .navbar-right but while they are on the right, they have no space inbetween, and I can't get that away with margin-right. what do I do?

Dhrubo Hasan
@dhrubo55
Mar 25 2016 10:26
thank you @keks411
CamperBot
@camperbot
Mar 25 2016 10:26
dhrubo55 sends brownie points to @keks411 :sparkles: :thumbsup: :sparkles:
:star: 290 | @keks411 | http://www.freecodecamp.com/keks411
Danilo
@sennator
Mar 25 2016 10:30
it works :D thanks @keks411 @nikosalonen
CamperBot
@camperbot
Mar 25 2016 10:30
sennator sends brownie points to @keks411 and @nikosalonen :sparkles: :thumbsup: :sparkles:
:warning: sennator already gave keks411 points
:warning: sennator already gave nikosalonen points
Niko Salonen
@nikosalonen
Mar 25 2016 10:30
@sennator :+1:
Steven Osterwald
@keks411
Mar 25 2016 10:36
@Felix020 I am not too sure but I am guessing you are using an extra class for those buttons on the right? If so, then I think those values get overwritten by the navbar-class itself. Try to use an id or declare it important. But again, not sure if thats the problem
Ravi Yadav
@raviayadav
Mar 25 2016 10:41
I have a question. I am not able to understand how nth-child targetting works in jquery. Now I dont even have a class "target" still the code works when I put in "$(".target:nth-child(2)") but it doesnt work when I put in the actual class that is ".well" instead of target. Is ".target" some in-built class ? This question is related to exercise in jquery"Target a specific child of an element using jquery"
Ravi Yadav
@raviayadav
Mar 25 2016 10:49
This message was deleted
Michael Kelly
@Keydose
Mar 25 2016 10:57
@ravi1806 What is the entire code that you have currently?
Danilo
@sennator
Mar 25 2016 11:00
http://codepen.io/sennator/pen/zqwJbQ how to put facebook logo inside the button at the bottom?
Michael Kelly
@Keydose
Mar 25 2016 11:03
@sennator Have you tried using the background-image property?
background-image: url(image-location);
Would probably want a background-repeat: no-repeat; aswell
Steven Osterwald
@keks411
Mar 25 2016 11:04
@sennator I am too slow....keydose got it already ;)
Danilo
@sennator
Mar 25 2016 11:04
@Keydose thanks man i will try it
CamperBot
@camperbot
Mar 25 2016 11:04
sennator sends brownie points to @keydose :sparkles: :thumbsup: :sparkles:
:star: 183 | @keydose | http://www.freecodecamp.com/keydose
Danilo
@sennator
Mar 25 2016 11:04
:D
Steven Osterwald
@keks411
Mar 25 2016 11:06
Somebody here who completed the Weather App already? I do have a JSON and want to get the weather (cloudy etc.), temperature (simple number) and the country out of it. It works fine for the weather but shows nothing for the temperature...
Danilo
@sennator
Mar 25 2016 11:11
@Keydose i do this in css?
Michael Kelly
@Keydose
Mar 25 2016 11:11
@sennator Yeah
@sennator You could give the buttons unique IDs depending on which logo is going to be in them
@sennator So like facebook-button
Danilo
@sennator
Mar 25 2016 11:12
@Keydose thanks :)
CamperBot
@camperbot
Mar 25 2016 11:12
sennator sends brownie points to @keydose :sparkles: :thumbsup: :sparkles:
:warning: sennator already gave keydose points
Aayush Kapoor
@xeoneux
Mar 25 2016 11:12
@keks411 json.main[0].temp should be json.main.temp as main is an Object and not an Array
Rose
@missstubborn
Mar 25 2016 11:14
how do i change the colour of text in a bootstrap button? it changed to blue when i added a link
Steven Osterwald
@keks411
Mar 25 2016 11:14
@xeoneux Damn...so easy..Thanks a lot :)
CamperBot
@camperbot
Mar 25 2016 11:14
keks411 sends brownie points to @xeoneux :sparkles: :thumbsup: :sparkles:
:star: 378 | @xeoneux | http://www.freecodecamp.com/xeoneux
Michael Kelly
@Keydose
Mar 25 2016 11:15
@missstubborn What's the current code for the button?
Miguel
@MigZyy
Mar 25 2016 11:15
hello everyone , im working trough the material in codecamp , currently doing jquery section ... stuck on this its asking me to italicize the text with the id of target 4 ... however the text that was previously there cannot change .... i was doing this $("#target4").html("<i></i>"); but that just clears it .... if i just do this $("#target4").html("<i>#target 4</i>"); and replace the text with what was in it b4 still dosent accept .. need help please :S
Rose
@missstubborn
Mar 25 2016 11:16
This message was deleted
@Keydose <button type="btn" class="primary btn">Read More about Oprah Winfrey and her career</button>
Michael Kelly
@Keydose
Mar 25 2016 11:17
@missstubborn Try changing the class to btn-primary
@missstubborn Or changing the type to btn btn-primary
@missstubborn btn-default is also a thing
Miguel
@MigZyy
Mar 25 2016 11:17
any1 ? is this just a bug ?
Danilo
@sennator
Mar 25 2016 11:18
@Keydose it puts a picture inside button but it stretches it so it is only white? any tip?
Michael Kelly
@Keydose
Mar 25 2016 11:18
@MigZyy Try this: $("#target4").html("<i>" + jQuery("#target4").text() + "</i>");
Miguel
@MigZyy
Mar 25 2016 11:19
thank you :) trying now
Michael Kelly
@Keydose
Mar 25 2016 11:19
@MigZyy If that doesn't work, try changing .text() to .html()
Rose
@missstubborn
Mar 25 2016 11:20
@Keydose it works thank you
CamperBot
@camperbot
Mar 25 2016 11:20
missstubborn sends brownie points to @keydose :sparkles: :thumbsup: :sparkles:
:star: 184 | @keydose | http://www.freecodecamp.com/keydose
Miguel
@MigZyy
Mar 25 2016 11:20
that did the trick thank you soo much @Keydose
CamperBot
@camperbot
Mar 25 2016 11:20
migzyy sends brownie points to @keydose :sparkles: :thumbsup: :sparkles:
:star: 185 | @keydose | http://www.freecodecamp.com/keydose
Michael Kelly
@Keydose
Mar 25 2016 11:21
@sennator Try adding background-size: cover; maybe
@missstubborn No problem :)
@MigZyy You're welcome
Rose
@missstubborn
Mar 25 2016 11:22
How do you change the background colour of the button? this is soon hard
Danilo
@sennator
Mar 25 2016 11:22
@Keydose you are a fricking magician :D
Michael Kelly
@Keydose
Mar 25 2016 11:23
@missstubborn Try background-color: colorhere !important;
For example, background-color: #ecf0f1 !important;
Rose
@missstubborn
Mar 25 2016 11:24
@Keydose do i put it in the css or the html?
Michael Kelly
@Keydose
Mar 25 2016 11:24
@missstubborn CSS for the button
Rose
@missstubborn
Mar 25 2016 11:25
btn.btn-primary {
background-color: #000000 !important;
}
got it to work! thank you
Mert Akcakaya
@makcakaya
Mar 25 2016 11:27
http://codepen.io/FreeCodeCamp/full/wMQrXV In the link the image and the text below it is contained in a container with some padding and background color of white. How to achieve that? If I put the image and text in a div and make the background color white, then the whole row gets white.
Aayush Kapoor
@xeoneux
Mar 25 2016 11:31
@makcakaya It's the thumbnail class
Mert Akcakaya
@makcakaya
Mar 25 2016 11:36
@xeoneux , Thanks! I applied img-thumbnail to the image but how to display the text at the bottom of the image with white background?
CamperBot
@camperbot
Mar 25 2016 11:36
makcakaya sends brownie points to @xeoneux :sparkles: :thumbsup: :sparkles:
:star: 379 | @xeoneux | http://www.freecodecamp.com/xeoneux
Aayush Kapoor
@xeoneux
Mar 25 2016 11:38
@makcakaya That's a caption. There's a caption class that can be put inside the thumbnail class...
Danilo
@sennator
Mar 25 2016 11:42
one last question....why doesnt my button send me to external link?
Malin Sundin
@MaoMaolin
Mar 25 2016 11:58
it cant be shown in a frame it says
so i guess you need to redirect to a new tab in your browser
Jasmine Marie Bouges
@jbouges
Mar 25 2016 12:03
hey so I've been having issues setting up a nav bar in codepen for the personal portfolio challenge over the past few days. I've tried three separate tutorials online of how to do it, but codepen doesn't seem to be responding correctly even though I followed the three different examples exactly. I thought it was something on my end and I'm still not sure because I tried pasting the exact code I had in codepen into freecodecamp just to check what the issue was (whether I'm missing a library or something) and it works in freecodecamp, so I'm really confused and not sure what I should do..
Thomas Thompson
@7ountor
Mar 25 2016 12:08
@doctorworm i tried pasting what I did into your codes and it worked. You could probably copy and paste it from my portfolio page http://codepen.io/7ountor/pen/ZWedJy
Jasmine Marie Bouges
@jbouges
Mar 25 2016 12:10
Okay. I'll try that. Thank you.
@7ountor
Thomas Thompson
@7ountor
Mar 25 2016 12:11
@doctorworm You're welcome.
公子小白
@uniquexiaobai
Mar 25 2016 12:11
Hello Wrold !
Thomas Thompson
@7ountor
Mar 25 2016 12:12
Hello @uniquexiaobai
公子小白
@uniquexiaobai
Mar 25 2016 12:16
@7ountor Hello !
Vincent
@vjtvalero
Mar 25 2016 12:17
Hello World!
CamperBot
@camperbot
Mar 25 2016 12:17

welcome to FreeCodeCamp @vjtvalero!

Thomas Thompson
@7ountor
Mar 25 2016 12:18
This message was deleted
amife
@aminatfe
Mar 25 2016 12:38
Hello campers
Arsalan Savand
@ArsalanSavand
Mar 25 2016 12:53
@aminatfe Hi
@NotSoV Great umm good luck anything I can do or advice just let me know.
mattcharlesh
@mattcharlesh
Mar 25 2016 13:01
how to get started with... "Build a Personal Portfolio Webpage"
Manish Giri
@Manish-Giri
Mar 25 2016 13:03
@mattcharlesh find a person to write about, get a nice picture(img), get a timeline history(ul li), and put it together
Jahmia Gallimore
@Progamers780
Mar 25 2016 13:10
Hello World!
CamperBot
@camperbot
Mar 25 2016 13:10

welcome to FreeCodeCamp @Progamers780!

Bartosz
@Barczi
Mar 25 2016 13:14
Hello
Alexander Køpke
@alexanderkopke
Mar 25 2016 13:21
@mattcharlesh start at the top with the navbar. Go to bootstrap page, I think its under components and just copy their code and alter the links to whichever suits you. Then make the navbar fixed. Then find a background image, then use image-size:cover; on it, Then add h1 with some text like <h1>Welcome to Matt's web dev portfolio page</h1> then make <h3> or <p> or with text: 'The place you can't afford to miss' or similar. Then alter both in css, possibly find a google font you like, center the text..
Brandon Wozniewicz
@brandonwoz
Mar 25 2016 13:21
When using a CSS preprocessor for example less, do you need any special software or do you just create a LESS style sheet and link to it in the head of your HTML?
Like you do with plain CSS.
Mengwa Victor
@Iphymengwa
Mar 25 2016 13:25
Good day y'all. please how can I produce these escape characters: var myStr = "\"\ \t \t;\r \n"; // Change this line
Blake Harris
@bharris62
Mar 25 2016 13:31
@alexanderkopke the hardest part about making portfolio is all the tiny details, like color, font and placements. If you are like me the code isn't that difficult
Angelika
@Angelika-Kachur
Mar 25 2016 13:33
hello
Jacob Sommerville
@JellyKid
Mar 25 2016 13:39
@Iphymengwa Escape is typically \ followed by whatever character you are escaping. Though \t, \r, and \n are keyboard input typically tab, return, newline respectively. What are you escaping for, regex?
Alexander Køpke
@alexanderkopke
Mar 25 2016 13:41
@bharris62 I agree. Making it look good is a valuable skill.
Pranav M
@soto94
Mar 25 2016 13:42

In the slasher flick challenge, these codes are giving different outputs. Can anyone tell me why?

function slasher(arr, howMany) {
 temp = arr.splice(0,howMany);
  return temp;
}

and

function slasher(arr, howMany) {
 arr.splice(0,howMany);
return arr;
}
Jacob Sommerville
@JellyKid
Mar 25 2016 13:43
@soto94 the second function shouldn't return anything.
João Alves
@JADSN
Mar 25 2016 13:44
how i add codepen image in my thumbnail?
Jacob Sommerville
@JellyKid
Mar 25 2016 13:44
@soto splice doesn't modify the original array but it returns a new array which you can then do whatever you want with
Pranav M
@soto94
Mar 25 2016 13:45
@JellyKid Sorry I corrected the code. Even now...
João Alves
@JADSN
Mar 25 2016 13:45
 <div class="row">
  <div class="col-sm-6 col-md-4">
    <div class="thumbnail">
      <img src="http://codepen.io/aurer/pen/jEGbA" alt="TestPhoto">
      <div class="caption">
        <h3>Thumbnail label</h3>
        <p>...</p>
        <p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
      </div>
    </div>
  </div>
Pranav M
@soto94
Mar 25 2016 13:45
The 2nd code is accepted by FCC. Not the first
Jacob Sommerville
@JellyKid
Mar 25 2016 13:46
@soto94 ok, so my second comment applies here. Splice doesn't actually change the original array it returns a new array.
So in the second function all you are doing is returning the original array
chiaracalanca
@chiaracalanca
Mar 25 2016 13:47
This message was deleted
Jacob Sommerville
@JellyKid
Mar 25 2016 13:47
@soto94 If you want it all on one line you can
function slasher(arr, howMany) {
return  arr.splice(0,howMany);
}
Arpan
@sahooarpan
Mar 25 2016 13:48
How to make inline style of h1
??
Murat
@muratkh
Mar 25 2016 13:49
@JADSN use .img-thumbnail class
then create height and width
João Alves
@JADSN
Mar 25 2016 13:50
can you give me html example code ?
chiaracalanca
@chiaracalanca
Mar 25 2016 13:50
Hi everyone ! I'm new, is it the right place to ask for help? Because I think I'm doing such a mess with the code.
Murat
@muratkh
Mar 25 2016 13:50
<img src="cinqueterre.jpg" class="img-thumbnail" alt="Cinque Terre" width="304" height="236">
Alexander Køpke
@alexanderkopke
Mar 25 2016 13:50
@chiaracalanca yes this is the place
João Alves
@JADSN
Mar 25 2016 13:50
@muratkh thanks
CamperBot
@camperbot
Mar 25 2016 13:50
jadsn sends brownie points to @muratkh :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for muratkh
Jacob Sommerville
@JellyKid
Mar 25 2016 13:50
@soto94 ok, nevermind I just realized you are using splice instead of slice. With splice you need to specify the elements to be removed.
Murat
@muratkh
Mar 25 2016 13:51
no problem i suggest you use another div class before your row class
Pranav M
@soto94
Mar 25 2016 13:51
@JellyKid Yup. I think it might be a bug
Arpan
@sahooarpan
Mar 25 2016 13:51
??
Murat
@muratkh
Mar 25 2016 13:51
that way it will be much better to organize play around with and not get into complication when you're setting different background colors
@JADSN
don't forget to close it tho
João Alves
@JADSN
Mar 25 2016 13:52
@muratkh how i get img src of codepen ?
Murat
@muratkh
Mar 25 2016 13:52
right click on image and choose copy image address
Alexander Køpke
@alexanderkopke
Mar 25 2016 13:52
@chiaracalanca so how can we help?
Murat
@muratkh
Mar 25 2016 13:53
codepen might be using a text instead of image so you might not be able to do it. instead google use google images and search for a logo @JADSN
Arpan
@sahooarpan
Mar 25 2016 13:53
How to make inline style of h1
??
Murat
@muratkh
Mar 25 2016 13:53
@sahooarpan can you be more clear?
Arpan
@sahooarpan
Mar 25 2016 13:54

Override Class Declarations with Inline Styles

So we've proven that id declarations override class declarations, regardless of where they are declared in your style element CSS.

There are other ways that you can override CSS. Do you remember inline styles?

Use an in-line style to try to make our h1 element white. Remember, in line styles look like this:

<h1 style="color: green">

Leave the blue-text and pink-text classes on your h1 element.

Murat
@muratkh
Mar 25 2016 13:54
<h1 style="color:green;">
try this
chiaracalanca
@chiaracalanca
Mar 25 2016 13:54
@alexanderkopke thank you alex ! I need to resize an image and I put the class .smaller-image inside the <style> ........</style> but my image still the same dimension. What I am doing wrong?
CamperBot
@camperbot
Mar 25 2016 13:54
chiaracalanca sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 536 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Murat
@muratkh
Mar 25 2016 13:55
of course change color to white tho
Jacob Sommerville
@JellyKid
Mar 25 2016 13:55

@soto94 No, not a bug splice actually modifies the original array. It returns the items removed from the array, so if you

function slasher(arr, howMany) {
return arr.splice(0,howMany);
}

it will return any items removed from the array rather than returning the modified array.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice

Murat
@muratkh
Mar 25 2016 13:56
gotta go guys see you later
Alexander Køpke
@alexanderkopke
Mar 25 2016 13:57
@chiaracalanca you probably just have to add the class to the image like this: <img class="smaller-image"
chiaracalanca
@chiaracalanca
Mar 25 2016 13:57
@alexanderkopke I'll try it. Let you know
Pranav M
@soto94
Mar 25 2016 13:58
@JellyKid Oh! I just got it. Thought it was returning the modified array...Thanks!
CamperBot
@camperbot
Mar 25 2016 13:58
soto94 sends brownie points to @jellykid :sparkles: :thumbsup: :sparkles:
:star: 195 | @jellykid | http://www.freecodecamp.com/jellykid
chiaracalanca
@chiaracalanca
Mar 25 2016 14:00
@alexanderkopke It works !! :smile: :sparkles: :clap: :+1:
Alexander Køpke
@alexanderkopke
Mar 25 2016 14:00
well done :) @chiaracalanca
Rose
@missstubborn
Mar 25 2016 14:18
Can I ask what other sites you use to learn code?
John
@jpls93
Mar 25 2016 14:18
Is it possible to create a for loop function that goes through all the elements or sub elements for any of these arguments?:
[[1,2],[3,4],[5,6],[7,8]]
[[1,2,3,4],[5,6,7,8]]
[[1,2],[3,4,5],[6,7,8,9]]
@missstubborn stackoverflow
Rose
@missstubborn
Mar 25 2016 14:20
Let me have a thorough look at it now @johnsalcedonetwork
John
@jpls93
Mar 25 2016 14:20
it's more like a forum to clarify your logic
you can ask questions but you have to show them you did your homework or else your question gets downvoted (frowned upon) by the community and you will be penalized
Rose
@missstubborn
Mar 25 2016 14:21
Hmmm I think I've decided I definitely have to review the way I think when it comes to coding
Jacob Sommerville
@JellyKid
Mar 25 2016 14:25
@missstubborn http://eloquentjavascript.net/ is a great free resource. If you can get through the whole book you will have a firm grasp on JS.
V Bhargav Chowdary
@bhargav4
Mar 25 2016 14:27
@johnsalcedonetwork you could use two for loops , one nested within the other
for(var i=0;i<arr.length;i++){
    for(var j=0;j<arr[i].length;j++){
       console.log(arr[i][j]);
}
}
@johnsalcedonetwork I've complted editing. check it now
mattcharlesh
@mattcharlesh
Mar 25 2016 14:31
@alexanderkopke Thanks Alex, that is a big help!
CamperBot
@camperbot
Mar 25 2016 14:31
mattcharlesh sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
Saidah Benion
@saidahb
Mar 25 2016 14:31
I am stuck on a challenge where I have to nest an anchor within the paragraph...I think I'm right from what I saw in the forum but it will not accept my input
CamperBot
@camperbot
Mar 25 2016 14:32
:star: 537 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Rose
@missstubborn
Mar 25 2016 14:34
@JellyKid thank you
CamperBot
@camperbot
Mar 25 2016 14:34
missstubborn sends brownie points to @jellykid :sparkles: :thumbsup: :sparkles:
:star: 196 | @jellykid | http://www.freecodecamp.com/jellykid
Manish Giri
@Manish-Giri
Mar 25 2016 14:42
@saidahb can you show your code
sammie-r7
@sammie-r7
Mar 25 2016 14:45
Hi i was wondering whether someone can help me with my nav bar in my portfolio
Moe A-M
@Moe96
Mar 25 2016 14:46
hey im new to this, can someone tell me how to add an attribute and how to make it point to something?
inayatullah
@inayatullah-khan
Mar 25 2016 14:46
@Moe96 add your code
Moe A-M
@Moe96
Mar 25 2016 14:47
ohh thanks :D
i should really read shit better
sammie-r7
@sammie-r7
Mar 25 2016 14:48

This is the code for it:

<div id="navbar" class="collapse navbar-collapse">
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#home">Home</a></li>
        <li><a href="#about">About</a></li>
        <li><a href="#portfolio">Portfolio</a></li>
        <li><a href="#contact">Contact</a></li>
      </ul>
    </div>

The contact button doesn't work, when you click on it it doesn't do anything.

Manish Giri
@Manish-Giri
Mar 25 2016 14:49
@Moe96 <a href="www.google.com">Google</a>
href is an attribute that points to a resouce(web link)
inayatullah
@inayatullah-khan
Mar 25 2016 14:49
@sammie-r7 what the problem
sammie-r7
@sammie-r7
Mar 25 2016 14:49

This is the code for it:

<div id="navbar" class="collapse navbar-collapse">
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#home">Home</a></li>
        <li><a href="#about">About</a></li>
        <li><a href="#portfolio">Portfolio</a></li>
        <li><a href="#contact">Contact</a></li>
      </ul>
    </div>

The contact button doesn't work, when you click on it it doesn't do anything.

@inayatullah-khan my last post
Moe A-M
@Moe96
Mar 25 2016 14:50
thanks @Manish-Giri
CamperBot
@camperbot
Mar 25 2016 14:50
moe96 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 812 | @manish-giri | http://www.freecodecamp.com/manish-giri
Moe A-M
@Moe96
Mar 25 2016 14:51
i just added a picture of a cat.. my life is complete!
inayatullah
@inayatullah-khan
Mar 25 2016 14:54
@sammie-r7 because you not add any event to any li there fore no one can respons you
sammie-r7
@sammie-r7
Mar 25 2016 14:54
@inayatullah-khan what does that mean?
@inayatullah-khan The other links work just the contact one doesn't
Manish Giri
@Manish-Giri
Mar 25 2016 14:56
@sammie-r7 do you have a div with the id contact elsewhere in your code?
inayatullah
@inayatullah-khan
Mar 25 2016 14:56
@sammie-r7 i mean that you want to respons you from your code from menue list item by selecting it like drop down is i right?
tommy
@tommygebru
Mar 25 2016 14:57
offered a free pass to udacity looking for recommended courses
Manish Giri
@Manish-Giri
Mar 25 2016 14:57
@inayatullah-khan I think what he intends to do is - when clicked on the contact list item, it should take you to the contact section on the page
@tommygebru hey! nice to see you again!
sammie-r7
@sammie-r7
Mar 25 2016 14:58
@Manish-Giri Yes!! thats what i want to happen, all the others do it and it works fine, apart from contact
tommy
@tommygebru
Mar 25 2016 14:59
@Manish-Giri hello :smile:
Manish Giri
@Manish-Giri
Mar 25 2016 14:59
@sammie-r7 can you post your complete code or codepen link?
tommy
@tommygebru
Mar 25 2016 15:00
is udacity known for any? good courses?
sammie-r7
@sammie-r7
Mar 25 2016 15:00
yes @Manish-Giri here is the codepen link - it is not finished yet. http://codepen.io/sammie-r-7-0/pen/qZRVmg
Reuben Sebastian
@reubensebastian8
Mar 25 2016 15:01
Good morning guys I'm having trouble creating a second p elemt
Manish Giri
@Manish-Giri
Mar 25 2016 15:02
@sammie-r7 it works now, had some extra spacing issues
<div class="jumbotron text-center" id="contact">
sammie-r7
@sammie-r7
Mar 25 2016 15:03
@Manish-Giri so do i need to edit the code or anything?
Manish Giri
@Manish-Giri
Mar 25 2016 15:03
@sammie-r7 yeah, either remove the extra spaces, or cut and paste what I wrote here instead of that line
PS: I'm not sure if codepen saves my changes in your code
nemonemo33
@nemonemo33
Mar 25 2016 15:04
Can someone help me troubleshoot this code or tell me why it isnt showing the data from the weather api?

``` var lat;
var long;
navigator.geolocation.getCurrentPosition(function(position) {
long = position.coords.longitude
lat = position.coords.latitude
$("#long").html(long);
$("#lat").html(lat);

});
$.getJSON("api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon="+ long + "&appid=32a059766d07b062c9a96d0b4973a108", function(json) {
$("#data").html(JSON.stringify(json));
}); ```

var lat;
var long;
navigator.geolocation.getCurrentPosition(function(position) {
  long = position.coords.longitude
  lat =  position.coords.latitude
  $("#long").html(long);
  $("#lat").html(lat);

});
$.getJSON("api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon="+ long + "&appid=32a059766d07b062c9a96d0b4973a108", function(json) {
  $("#data").html(JSON.stringify(json));
});
sammie-r7
@sammie-r7
Mar 25 2016 15:04
@Manish-Giri I honestly cannot see where i should add that
@Manish-Giri I think i have confused myself
Manish Giri
@Manish-Giri
Mar 25 2016 15:05
@sammie-r7 line 116 , remove what is there, and put what I gave
sammie-r7
@sammie-r7
Mar 25 2016 15:06
@Manish-Giri sorry yep, just found it.
@Manish-Giri my bad.
Manish Giri
@Manish-Giri
Mar 25 2016 15:07
@sammie-r7 guess it worked?
sammie-r7
@sammie-r7
Mar 25 2016 15:07
@Manish-Giri you would happen to know how to add thumbnails for my past projects?
@Manish-Giri yes it worked. thank you
CamperBot
@camperbot
Mar 25 2016 15:07
sammie-r7 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 813 | @manish-giri | http://www.freecodecamp.com/manish-giri
sammie-r7
@sammie-r7
Mar 25 2016 15:07
@Manish-Giri The thumbnails that i have look awful]
Manish Giri
@Manish-Giri
Mar 25 2016 15:08
@sammie-r7 I never tried that, but I guess one way would be - put codepen in "full page" mode, take a screenshot, crop it in paint, and put it as a thumbnail
@nemonemo33 do you have it on codepen?
nemonemo33
@nemonemo33
Mar 25 2016 15:14
@Manish-Giri Yep i do
Manish Giri
@Manish-Giri
Mar 25 2016 15:15
Capture.PNG
@nemonemo33 it works for me, perhaps try a different browser?
nemonemo33
@nemonemo33
Mar 25 2016 15:16
@Manish-Giri Wait. You are getting JSON back or just the coords?
Manish Giri
@Manish-Giri
Mar 25 2016 15:17
@nemonemo33 I didn't check the JSON, I thought you said your coords werent showing up
nemonemo33
@nemonemo33
Mar 25 2016 15:18
@Manish-Giri No. I am not getting back data from the call to the weather API
Manish Giri
@Manish-Giri
Mar 25 2016 15:18
@nemonemo33 see that lat and lon are not getting set correctly in the request
nemonemo33
@nemonemo33
Mar 25 2016 15:19
Ahhh
Jalon Dodson
@JEDodson
Mar 25 2016 15:20
Just finished basic algorithm scripting
How difficult is the jump from basic to intermediate
nemonemo33
@nemonemo33
Mar 25 2016 15:21
@Manish-Giri DO you know why that might be?
Soham
@appfobia
Mar 25 2016 15:23
@JEDodson Frankly is it a big leap . If this was a school or a university , basic and intermediate would have been taught in different semesters. So, you can imagine the wide gap. However if you are already familiar to programming, then this leap would not be so difficult for you.
TanYiXun
@TanYiXun
Mar 25 2016 15:24
Thanks
Manish Giri
@Manish-Giri
Mar 25 2016 15:24
@nemonemo33 here's an idea - try preparing the URL before sending the request in the .getJSON() function, that should work.
I mean - the stuff about concatenating with lat and long and appID, do that before sending in the request
nemonemo33
@nemonemo33
Mar 25 2016 15:24
Ahhh okay! Thank you @Manish-Giri I will give it a try
CamperBot
@camperbot
Mar 25 2016 15:24
nemonemo33 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 814 | @manish-giri | http://www.freecodecamp.com/manish-giri
Pascal T.
@omegga
Mar 25 2016 15:26
@JEDodson some are tough, but the gap between interm and advanced is bigger in my opinion
nemonemo33
@nemonemo33
Mar 25 2016 15:27
@Manish-Giri oh DUH i figured out why it isnt working. Technically when i redefine the lat/long it is held with in a function so later on when I call it it is pulling the prior undefined parts rather than the defined ones out of its scope
Manish Giri
@Manish-Giri
Mar 25 2016 15:27
@nemonemo33 yep, looks that way
Kevin Brown
@kevindewbrown
Mar 25 2016 15:38
Can someone help me with this solution? https://www.freecodecamp.com/challenges/use-appendto-to-move-elements-with-jquery#?solution=fccss%0A%20%20%24(document).ready(function()%20%7B%0A%20%20%20%20%24(%22%23target1%22).css(%22color%22%2C%20%22red%22)%3B%0A%20%20%20%20%24(%22%23target1%22).prop(%22disabled%22%2C%20true)%3B%0A%20%20%20%20%24(%22%23target4%22).remove()%3B%0A%0A%20%20%7D)%3B%0Afcces%0A%0A%3C!--%20Only%20change%20code%20above%20this%20line.%20--%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Ch3%20class%3D%22text-primary%20text-center%22%3EjQuery%20Playground%3C%2Fh3%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23left-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22left-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target1%22%3E%23target1%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target2%20%24(%22%23target4%22).appendTo(%22%23right-well%22)%3B%22%7D)%3B%3E%23target2%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target3%22%3E%23target3%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23right-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22right-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target4%22%3E%23target4%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target5%22%3E%23target5%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target6%22%3E%23target6%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A
cannelflow
@cannelflow
Mar 25 2016 15:40
help formaT
CamperBot
@camperbot
Mar 25 2016 15:40

:point_right: code formatting [wiki]

Multi line Code

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

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

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

Single line Code

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

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

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

cannelflow
@cannelflow
Mar 25 2016 15:40
@kevindewbrown :point_up: March 25, 2016 9:10 PM

For example, if we wanted to move target4 from our right well to our left well, we would use:

$("#target4").appendTo("#left-well");
@kevindewbrown
Kevin Brown
@kevindewbrown
Mar 25 2016 15:42
@cannelflow I used $("#target4").appendTo("#right-well");
cannelflow
@cannelflow
Mar 25 2016 15:43
INSTRUCTION IS # Move your target2 element from your left-well to your right-well.
@kevindewbrown
Kevin Brown
@kevindewbrown
Mar 25 2016 15:45
@cannelflow It's moved, but it's not inside of the right-well
cannelflow
@cannelflow
Mar 25 2016 15:46
@kevindewbrown show your code
Kevin Brown
@kevindewbrown
Mar 25 2016 15:47
$("#target2").appendTo("#right-well");
cannelflow
@cannelflow
Mar 25 2016 15:49
code is fine 
$("#target2").appendTo("#right-well");
@kevindewbrown
Kevin Brown
@kevindewbrown
Mar 25 2016 15:51
@cannelflow Is it inside of the right-well
cannelflow
@cannelflow
Mar 25 2016 15:52
@kevindewbrown yes #target2 moved from right -well to left-well
Kevin Brown
@kevindewbrown
Mar 25 2016 15:54
I don't get why the code isn't working
Manish Giri
@Manish-Giri
Mar 25 2016 15:55
@kevindewbrown follow these 2 steps
  1. Reset the current code using "reset" on the left
  2. Type in just one line as shown here
<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well"); //just add in this line

  });
</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>
cannelflow
@cannelflow
Mar 25 2016 15:55
@kevindewbrown try refreshing page
Kevin Brown
@kevindewbrown
Mar 25 2016 15:58
@cannelflow Thanks, but for some reason it's not working I'm thinking I'm missing some type of error
CamperBot
@camperbot
Mar 25 2016 15:58
kevindewbrown sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
zzzorgo
@zzzorgo
Mar 25 2016 15:58
@CodaGirl i am adding images by copy/paste
CamperBot
@camperbot
Mar 25 2016 15:59
:star: 1010 | @cannelflow | http://www.freecodecamp.com/cannelflow
cannelflow
@cannelflow
Mar 25 2016 15:59
@kevindewbrown you can reset the code and try again
Ketan Ramteke
@TheKetan2
Mar 25 2016 16:00
Greetings Everyone...
zzzorgo
@zzzorgo
Mar 25 2016 16:00
Hello
Ketan Ramteke
@TheKetan2
Mar 25 2016 16:01
M i late for party :D
adityac0620
@adityac0620
Mar 25 2016 16:01

'''

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendto("#left-well");
});
</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>
'''

CamperBot
@camperbot
Mar 25 2016 16:01
:bulb: to format code use