These are chat archives for FreeCodeCamp/Help

6th
May 2016
Sascha Bratton
@saschabratton
May 06 2016 00:00
@tuliodnw you can select `data.query.pages[1083183]` is that what you mean?
Tulio Natale
@tuliodnw
May 06 2016 00:01
yes @saschabratton but they change after every search so i dot know how to call them
Sascha Bratton
@saschabratton
May 06 2016 00:01
Otherwise, if you want to select the properties like in an array, you'd have to something like `data.query.pages[Object.keys(data.query.pages)[0]]`
if you want to get all of them, it makes more sense to iterate over the object
Look at `for..in` loop
Tulio Natale
@tuliodnw
May 06 2016 00:04
@saschabratton hey thanks i didnt know about object.keys, your right loop is the better way
CamperBot
@camperbot
May 06 2016 00:04
tuliodnw sends brownie points to @saschabratton :sparkles: :thumbsup: :sparkles:
:cookie: 133 | @saschabratton |http://www.freecodecamp.com/saschabratton
Sascha Bratton
@saschabratton
May 06 2016 00:05
:thumbsup:
pinklady1221
@pinklady1221
May 06 2016 00:17
Anybody here from chicago
Jod
@jod29
May 06 2016 00:19
hi need help. i get all but 3 requirements on bonfire: mutations.
``````
function mutation(arr) {
var x = arr[0].toLowerCase();
var y = arr[1].toLowerCase().split;
for (var i=0; i < x.length; i++){
var w = x.indexOf(y);
if (w !== -1)
return false;
else
return true;
}
}

mutation(["hello", "hey"]);``````
Dylan
@dhcodes
May 06 2016 00:21
help mutations
CamperBot
@camperbot
May 06 2016 00:21

Problem Explanation:

• Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array..
:pencil: read more about algorithm mutations on the FCC Wiki
UtkarshShukla7
@UtkarshShukla7
May 06 2016 00:21
@jod29 because you are returning in the loop on the first iteration itself
Jod
@jod29
May 06 2016 00:22
so i need to let the iteration finish before returning?
UtkarshShukla7
@UtkarshShukla7
May 06 2016 00:22
@jod29 yes
DJ Pelland
@dna113p
May 06 2016 00:22
``````\$('document').ready(function() {
\$('#search').on('submit', function() {
initSearch(\$('#search-input').val())
})
});

function initSearch(terms){
\$.ajax({
url: '//en.wikipedia.org/w/api.php',
data: {
action: 'query',
list: 'search',
srsearch: 'Elon Musk',
format: 'json'
},
dataType: 'jsonp',
success: function(x) {
displayResults(x.query.search);
}
});``````
Having a problem with the wikipedia seach project. I cannot figure out why this jquery ajax call won't run the success function when inside of my initSearch function... but it works perfectly fine if I remove it from the function and just let it run . I'm guessing it has something to do with scope but I can't figure it out.
Jod
@jod29
May 06 2016 00:23
@UtkarshShukla7 thanks. it gets really confusing all the time. :)
CamperBot
@camperbot
May 06 2016 00:23
jod29 sends brownie points to @utkarshshukla7 :sparkles: :thumbsup: :sparkles:
:cookie: 436 | @utkarshshukla7 |http://www.freecodecamp.com/utkarshshukla7
UtkarshShukla7
@UtkarshShukla7
May 06 2016 00:23
@jod29 np ,you'll get the hang of it
Jod
@jod29
May 06 2016 00:24
@UtkarshShukla7 it is confusing but im loving learning to code. cheers!
GitResumeCoding
@GitResumeCoding
May 06 2016 00:24
I have a JSON object and I created this to add. but it isn't working. console says it's not a function. is that bc push only works on arrays and this is a json object? or am I simply writing the code incorrectly?
`jsonObj.city.push("goop");`
Sascha Bratton
@saschabratton
May 06 2016 00:25
yes `push` method is part of the `Array` prototype
So if `jsonObj.city` is not an array, you don't have that method
GitResumeCoding
@GitResumeCoding
May 06 2016 00:26
hi again @saschabratton is there a way to add a while new record? no I reallyhope my code ISN'T an array, i worked hard at learning to differentiate them ;)
@saschabratton after you helped me I created a codepen to play with JSON objects. http://codepen.io/chihealthdev/pen/XdoBjO?editors=0010
Dylan
@dhcodes
May 06 2016 00:27
@dna113p do you have a codepen?
Sascha Bratton
@saschabratton
May 06 2016 00:27
``````let jsonObj = { city: [] };
jsonObj.city.push('goop');

// jsonObj looks like:
// { city: [ 'goop' ] }``````
DJ Pelland
@dna113p
May 06 2016 00:27
Sascha Bratton
@saschabratton
May 06 2016 00:28
It's not actually json though unless you `jsonObj = JSON.stringify(jsonObj);`
GitResumeCoding
@GitResumeCoding
May 06 2016 00:28
@saschabratton but...I though you just said that push won't work on a json obj
Sascha Bratton
@saschabratton
May 06 2016 00:28
@GitResumeCoding I'm not sure what you mean "while new record"
GitResumeCoding
@GitResumeCoding
May 06 2016 00:29
whole new record. say I my json is encoding things like the record collection challenge, and I wanted to add a new ID with information for a music artist and their records, year, etc
Sascha Bratton
@saschabratton
May 06 2016 00:29
JSON just means javascript object notation
If you turn an object into a string, it's JSON. That's so you can use it outside of JavaScript, normally in HTTP requests
GitResumeCoding
@GitResumeCoding
May 06 2016 00:30
so in my codepen what was I encoding at the top?
Sascha Bratton
@saschabratton
May 06 2016 00:30
let me look
It's a javascript object
DJ Pelland
@dna113p
May 06 2016 00:31
@dhcodes Hmmm somehow i just broke it completely before i sent to you
GitResumeCoding
@GitResumeCoding
May 06 2016 00:31
hmm....
Sascha Bratton
@saschabratton
May 06 2016 00:31
The javascript object is an abstract concept, so you can't "write" the object to the browser
You have to turn it into a string first
The way you represent a javascript object in a string is call JavaScript Object Notation
or JSON
GitResumeCoding
@GitResumeCoding
May 06 2016 00:32
but I was able to pull disparate items out and change things inside that object, then wrote them to the screen
Sascha Bratton
@saschabratton
May 06 2016 00:32
You wrote them to the console, which is a javascript environment
Oh, nevermind I see
Where you are writing the object to the browser, you are stringifying the object
GitResumeCoding
@GitResumeCoding
May 06 2016 00:33
oooh that document.write() was stringefying it in the background
Sascha Bratton
@saschabratton
May 06 2016 00:33
So you are using JSON to write the object to a string
No, `JSON.stringify` was stringifying it
Dylan
@dhcodes
May 06 2016 00:34
@dna113p it's okay, you just forgot to close a tag
Sascha Bratton
@saschabratton
May 06 2016 00:35
You only wrote the object to the screen without stringifying when you logged it to the console, which like I said is javascript environment
Dylan
@dhcodes
May 06 2016 00:35
idk why it's not working though. it seems to be an issue with the order
GitResumeCoding
@GitResumeCoding
May 06 2016 00:35
ok, so going back...if I wanted to add a "record" to the javascript object at the top, what would be the most appropiate (the thing you write originally?)
Dylan
@dhcodes
May 06 2016 00:35
@dna113p it works if you rapidly enter search terms into the box lol
Sascha Bratton
@saschabratton
May 06 2016 00:35
No if you want to add a property, you just assign it
Dylan
@dhcodes
May 06 2016 00:35
i think your html function may need to be part of success @dna113p
nope
that didn't fix it
Cacious Siamunyanga
@cacious7
May 06 2016 00:36
http://codepen.io/cacious7/pen/VaXamx hey guys. a having a problem displaying the links in my navbar when the screen gets smaller and they collapse
how do i make them show in a smaller scree?
GitResumeCoding
@GitResumeCoding
May 06 2016 00:38
@saschabratton I tried it and it overwrote the whole things? javascriptObj = "supposedToBeANewValueAdded"
Dylan
@dhcodes
May 06 2016 00:38
@dna113p yes, appears to be an issue with order
Sascha Bratton
@saschabratton
May 06 2016 00:38
You need to do like `javascriptObj.newValue = 'supposedToBeANewValueAdded';`
Dylan
@dhcodes
May 06 2016 00:39
as if i add this to your success function, I get the correct entry title on the log
console.log(x.query.search[0].title);
@dna113p
Sascha Bratton
@saschabratton
May 06 2016 00:39
The `javascriptObj` needs to already exist
Dylan
@dhcodes
May 06 2016 00:39
@dna113p start there and see if you can write you other functions using that data within success
GitResumeCoding
@GitResumeCoding
May 06 2016 00:40
oops meant jsonObj but let me try jsonObj.newValue = 'supposedToBeANewValueAdded';
UtkarshShukla7
@UtkarshShukla7
May 06 2016 00:41
@cacious7 add first Jquery and then bootstrap.js
Sascha Bratton
@saschabratton
May 06 2016 00:41
@GitResumeCoding :thumbsup:
DJ Pelland
@dna113p
May 06 2016 00:41
@dhcodes thanks :) i'll keep trying
CamperBot
@camperbot
May 06 2016 00:41
dna113p sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 747 | @dhcodes |http://www.freecodecamp.com/dhcodes
GitResumeCoding
@GitResumeCoding
May 06 2016 00:43
@saschabratton Object {city: "Chicago", hobbies: Object, married: "false"}
city:"Windy"
hobbies:Object
married:"false"
newValue:"supposedToBeANewValueAdded"
worked! ok I think I am getting the differences and then understanding how to get them to the screen. Getting away from the challenges and onto a blank codepen really helped. but, man was JSON, javascript objects, and arrays all mixed up.
Sascha Bratton
@saschabratton
May 06 2016 00:44
JSON is just a way to represent JavaScript Object outside of a JavaScript environment
GitResumeCoding
@GitResumeCoding
May 06 2016 00:45
yup. but the challenges flowed from javascript objects right into json and somewhere along the way i got all mixed up.
James
@AntimonyWhite
May 06 2016 00:47
Create a script element making sure it is valid and has a closing tag
<script \$(document).ready(function(){ });></script>
thats what i've got, whats wrong with it?
GitResumeCoding
@GitResumeCoding
May 06 2016 00:47
what are some good terms to look up that best represent what I was trying to do. I'd like to see a bunch of common manipulators for the things I was doing. simply javascript object (adding, accesing, deleting properties, etc)
Sascha Bratton
@saschabratton
May 06 2016 00:47
@AntimonyWhite your \$(document).ready() function is inside the opening script tag
It needs to be closed (`<script>`) then put your code
James
@AntimonyWhite
May 06 2016 00:48
@saschabratton thanks a bunch
CamperBot
@camperbot
May 06 2016 00:48
antimonywhite sends brownie points to @saschabratton :sparkles: :thumbsup: :sparkles:
:cookie: 164 | @saschabratton |http://www.freecodecamp.com/saschabratton
Justin G
@JG7321
May 06 2016 00:48
Hi guys, names Justin! Nice to meet you all. I'm having a bit of an issue with 82, it says I have to nest my buttons with <div class="col-xs-4">, issue is, I'm having an issue with nesting all 3 of the buttons. Not sure what I'm doing incorrectly. Anyone able to help?
Sascha Bratton
@saschabratton
May 06 2016 00:48
GitResumeCoding
@GitResumeCoding
May 06 2016 00:49
@saschabratton sweet! thx!
CamperBot
@camperbot
May 06 2016 00:49
:cookie: 165 | @saschabratton |http://www.freecodecamp.com/saschabratton
gitresumecoding sends brownie points to @saschabratton :sparkles: :thumbsup: :sparkles:
jdownhower
@jdownhower
May 06 2016 00:50
@GitResumeCoding try "javascript data structures"
GitResumeCoding
@GitResumeCoding
May 06 2016 00:50
@JG7321 the xs buttons want to all fit into 12, so if your button multiples arents that they will be shoved to the next line or do other funky things
UtkarshShukla7
@UtkarshShukla7
May 06 2016 00:51
@JG7321
``````<div class="col-xs-4">button1</div>
<div class="col-xs-4">button2</div>
<div class="col-xs-4">button3</div>``````
Justin G
@JG7321
May 06 2016 00:51
Ah I see, yeah its just for one of the challenges I'm stuck on. It wants me to create the Row, which I did (i believe), but when it comes to using the div for the 3 lines I keep getting an X on "Each of your Bootstrap...
AH!
@UtkarshShukla7 thank you so much!
CamperBot
@camperbot
May 06 2016 00:52
jg7321 sends brownie points to @utkarshshukla7 :sparkles: :thumbsup: :sparkles:
:cookie: 437 | @utkarshshukla7 |http://www.freecodecamp.com/utkarshshukla7
UtkarshShukla7
@UtkarshShukla7
May 06 2016 00:53
@JG7321
``````<div class="row">
<div class="col-xs-4">button1</div>
<div class="col-xs-4">button2</div>
<div class="col-xs-4">button3</div>``````
is your challenge passed ?
Sascha Bratton
@saschabratton
May 06 2016 01:03
is your past challenged?
RyukRoth
@RyukRoth
May 06 2016 01:05
hey guys, just joining already for my future problems ;)
UtkarshShukla7
@UtkarshShukla7
May 06 2016 01:09
@saschabratton were you asking me?
Sascha Bratton
@saschabratton
May 06 2016 01:17
rhetorical
Clem
@jamrocx
May 06 2016 01:17

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

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

what am I doing wrong?
Sascha Bratton
@saschabratton
May 06 2016 01:18
You have `CatPhotoApp` randomly in your style
Clem
@jamrocx
May 06 2016 01:19
please explain a little further
Sascha Bratton
@saschabratton
May 06 2016 01:19
You can't just have a word there
CSS has to take a form like `selector { property: value; }`
So `h2 {color: blue;}` is fine, but `CatPhotoApp` doesn't fit the syntax
chudnoteka
@chudnoteka
May 06 2016 01:42

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

<h2 style="color: red">CatPhotoApp</h2>

Gym Chao
@gymchao
May 06 2016 01:42
hi, i'm stuck here, anyone can help?

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

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

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

chudnoteka
@chudnoteka
May 06 2016 01:42
What is wrong with this code
Wisdomhuang
@Wisdomhuang
May 06 2016 01:45
Hi guys please help me!

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

<label>
<inout type="radio" name="indoor-outdoor" >Outdoor
</label>
what's wrong with my code?

UtkarshShukla7
@UtkarshShukla7
May 06 2016 01:45
@saschabratton my english is poor so sometimes it changes the meaning of what I want to convey or ask
@chudnoteka which color do you want h2 to be in
@Wisdomhuang typo input
Wisdomhuang
@Wisdomhuang
May 06 2016 01:46
I need to add a pair of radio buttons to my form
UtkarshShukla7
@UtkarshShukla7
May 06 2016 01:46
@gymchao second p doesn't have class red-text
Wisdomhuang
@Wisdomhuang
May 06 2016 01:47
okay got it
KVilage1
@KVilage1
May 06 2016 01:47
hey can someone help me out with the footer of my page- why are icons showing twice? http://codepen.io/KabbalisticVillage/pen/dMzZyW
Gym Chao
@gymchao
May 06 2016 01:47
@UtkarshShukla7 oh..yes...thanks
KVilage1
@KVilage1
May 06 2016 01:49
anybody out there?
James
@AntimonyWhite
May 06 2016 01:49
@KVilage1 i'd help, but i just started 3 days ago
KVilage1
@KVilage1
May 06 2016 01:50
its all good man
good luck
UtkarshShukla7
@UtkarshShukla7
May 06 2016 01:51
@gymchao np
@KVilage1 looking at it
KVilage1
@KVilage1
May 06 2016 01:53
k
Brad Turnau
@BradleyTurnauDR
May 06 2016 01:54
anyone online?
jdownhower
@jdownhower
May 06 2016 01:54
@KVilage1 I think I got it!
KVilage1
@KVilage1
May 06 2016 01:55
hey. what do you think it is?
jdownhower
@jdownhower
May 06 2016 01:55
you need to close your "i" tags
UtkarshShukla7
@UtkarshShukla7
May 06 2016 01:55
@KVilage1 you have not closed <i> properly
jdownhower
@jdownhower
May 06 2016 01:55
@KVilage1 so instead of <i class="fa fa-youtube"</i> make sure it is <i class="fa fa-youtube"></i> Basically you are missing a >
KVilage1
@KVilage1
May 06 2016 01:56
oh wow
wow that worked thanks guys!
and girls!
jdownhower
@jdownhower
May 06 2016 01:56
@KVilage1 you should also put in the </ul> and </div> 's at the end, but I don't think that is causing the duplicates. It is just the "i" tags.
Brad Turnau
@BradleyTurnauDR
May 06 2016 01:56
Can someone give me a hand please?
jdownhower
@jdownhower
May 06 2016 01:56
@BradleyTurnauDR what kind of help do you need?
Brad Turnau
@BradleyTurnauDR
May 06 2016 01:57

Customizing the Integration File
This part of the installation will require PHP knowledge. If you cannot figure this out, please consider our professional installation service.

First, open the arrowchat/includes/integration.php file. This file must be customized to fit your specific website. You may also find that opening the arrowchat/includes/config.php file will be helpful.

get_user_id() Function

The first and most important function to setup is the get_user_id() function. This function will simply return the user's ID or NULL if no user is logged in. The two most common ways to setup this function are by cookie and session.

Using a Session example:

function get_user_id()
{
\$userid = NULL;

``````if (!empty(\$_SESSION['userid']))
{
\$userid = \$_SESSION['userid'];
}

return \$userid;``````

}

KVilage1
@KVilage1
May 06 2016 01:57
k i got it. someone help brad
stargazehaze
@stargazehaze
May 06 2016 01:57
Hi everyone. Total beginner here. I am trying to create a CSS class to resize an image, but I am really confused about where the code goes.
Wisdomhuang
@Wisdomhuang
May 06 2016 01:57
@UtkarshShukla7 Thank you so much. I need to double check my code from now on.
CamperBot
@camperbot
May 06 2016 01:57
wisdomhuang sends brownie points to @utkarshshukla7 :sparkles: :thumbsup: :sparkles:
:cookie: 438 | @utkarshshukla7 |http://www.freecodecamp.com/utkarshshukla7
UtkarshShukla7
@UtkarshShukla7
May 06 2016 01:58
@Wisdomhuang np
Brad Turnau
@BradleyTurnauDR
May 06 2016 01:58
Anyone have any idea what that means lol -_-
Islam Ibakaev
@dagman
May 06 2016 01:59
@KVilage1 footer icons fixed http://codepen.io/dagman/pen/vGvvPz
Wisdomhuang
@Wisdomhuang
May 06 2016 01:59
@stargazehaze I think u need to check it from the map
UtkarshShukla7
@UtkarshShukla7
May 06 2016 02:00
@stargazehaze you can give class to your image and style in your styles tag
Jacob Bogers
@jacobbogers
May 06 2016 02:00
tadaaaaa
UtkarshShukla7
@UtkarshShukla7
May 06 2016 02:02
@jacobbogers nice !!
Islam Ibakaev
@dagman
May 06 2016 02:02
@jacobbogers nice :smile:
Wisdomhuang
@Wisdomhuang
May 06 2016 02:03
@stargazehaze <style>
.larger-image {
width: 500px;
}
</style>
Jason
@JasonDeving
May 06 2016 02:04
percents also work
stargazehaze
@stargazehaze
May 06 2016 02:05
Thank you @Wisdomhuang and @JasonDeving I guess what I am confused about is if I have to retype <style> or if I can put it within the existing tab.
CamperBot
@camperbot
May 06 2016 02:05
:cookie: 41 | @wisdomhuang |http://www.freecodecamp.com/wisdomhuang
:cookie: 331 | @jasondeving |http://www.freecodecamp.com/jasondeving
stargazehaze sends brownie points to @wisdomhuang and @jasondeving :sparkles: :thumbsup: :sparkles:
stargazehaze
@stargazehaze
May 06 2016 02:11
<style>
.smaller-image {
width: 100px;
}
</style>

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Sascha Bratton
@saschabratton
May 06 2016 02:11
@stargazehaze you can put it inside the existing `<style> </style>`
stargazehaze
@stargazehaze
May 06 2016 02:11
Wow I should have screenshot. Sorry.
Thank you @saschabratton
CamperBot
@camperbot
May 06 2016 02:12
stargazehaze sends brownie points to @saschabratton :sparkles: :thumbsup: :sparkles:
:cookie: 234 | @saschabratton |http://www.freecodecamp.com/saschabratton
Jamesowens
@Jamesowens
May 06 2016 02:16
ok guys im pretty new to this coding stuff but i need some help on one of these challenges
3jM310
@3jM310
May 06 2016 02:17
what i need to here? The finished input element should have valid syntax. i got this ---><input type="text" placeholder= "cat photo url">
Jamesowens
@Jamesowens
May 06 2016 02:17
how do i do a closing angle bracket?
Richie Vowels
@drv0684
May 06 2016 02:18
good night everyone.
Felix Rodriguez
@felixrodriguez12
May 06 2016 02:27

It says I haven't disabled 'target1' button. This is part of my code: <script>
\$(document).ready(function() {
\$("#target1").css("color", "red");
\$("#target1").prop("disable",true);

});
</script>

chudnoteka
@chudnoteka
May 06 2016 02:27
@saschabratton i got it, thank you
CamperBot
@camperbot
May 06 2016 02:27
chudnoteka sends brownie points to @saschabratton :sparkles: :thumbsup: :sparkles:
:cookie: 242 | @saschabratton |http://www.freecodecamp.com/saschabratton
Sergey
@altvec
May 06 2016 02:29
@felixrodriguez12 try ‘disabled’ instead of ‘disable'
Nik Vy
@Lolz1243
May 06 2016 02:29

Hi guys my task was to nest my existing a element within a new p element so that the surrounding paragraph says "View more cat photos," but where only "cat photos" is a link and the rest of the text is plain text. Also, the p element should have the text "View more " (with a space after it.)

Code:

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

I'm not exactly sure what I'm doing wrong

Brian
@sludge256
May 06 2016 02:32
Does putting the code one line line help?
Asif Norzai
@Pashtunzoy
May 06 2016 02:32
Hi, Did anyone do the Url shortener Microservice? If yes then could you help out with this problem I have? http://stackoverflow.com/questions/37063181/mongodb-in-nodejs-find-method-calls-once
Weskendel
@Weskendel
May 06 2016 02:32
Nik Vy
@Lolz1243
May 06 2016 02:33
@sludge256 nope
Weskendel
@Weskendel
May 06 2016 02:34
which number is this
I will go back
and see what I did
Nik Vy
@Lolz1243
May 06 2016 02:34
thanks
its number 27 i think
heartofstone
@heartofstone
May 06 2016 02:36
Hi can anyone help me out on the first jquery lesson please? I dont know what I am trying to achieve here
Sergey
@altvec
May 06 2016 02:36
@Lolz1243 i’ve done that:
This message was deleted
heartofstone
@heartofstone
May 06 2016 02:36
I need to do
Use the jQuery addClass() function to give the classes animated and bounce to your button elements.
Nik Vy
@Lolz1243
May 06 2016 02:37
@altvec i don't think that's the right one
Weskendel
@Weskendel
May 06 2016 02:37
``````<p> view more
<a href="http://www.freecatphotoapp.com">cat photos</a>
</p>``````
Sergey
@altvec
May 06 2016 02:37
oops: <p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
Weskendel
@Weskendel
May 06 2016 02:38
this is what I got @Lolz1243
Nik Vy
@Lolz1243
May 06 2016 02:39
@Weskendel for some reason it still doesn't work
Sergey
@altvec
May 06 2016 02:40
@Lolz1243 see above) i’ve accidently copied wrong part of the code :) What browser do you use btw?
Jod
@jod29
May 06 2016 02:40
@Lolz1243 you should move `</a>` right after the `<a href> so that the text "cat photos" is not part of the link
heartofstone
@heartofstone
May 06 2016 02:40
I hate it when the code was sort of correct, and a spelling error on a part you didnt even need to think causes confusion over how the code worked.....
Nik Vy
@Lolz1243
May 06 2016 02:41
@jod29 but if i do that then doesn't "cat photos" become plain text?
chudnoteka
@chudnoteka
May 06 2016 02:41

Inside your style element, change the h2 selector to .red-text and update the color's value from blue to red.

Give your h2 element the class attribute with a value of 'red-text'.

How to do this with this code: <style>
h2 {
color: blue;
}
</style>

<h2>CatPhotoApp</h2>

Jod
@jod29
May 06 2016 02:42
@Lolz1243 isn't that what's being required? only the photo becomes a link, but not the text?
Nik Vy
@Lolz1243
May 06 2016 02:42
<h2 class="red-text"> CatPhotoApp</h2> @chudnoteka
@jod29 nope, the cat photos has to be linked
Brian
@sludge256
May 06 2016 02:44
@Lolz1243 Are you modifying the existing anchor element or are you creating a new one somewhere?
chudnoteka
@chudnoteka
May 06 2016 02:44
@Lolz1243 true for HTML element, not for CSS
Nik Vy
@Lolz1243
May 06 2016 02:45
@chudnoteka my bad
@sludge256 I was modifying the existing anchor element
Brian
@sludge256
May 06 2016 02:49
@chudnoteka modify the CSS to have a red-text class instead of selecting the h2 element
@Lolz1243 Mind pasting all your code?
Nik Vy
@Lolz1243
May 06 2016 02:50

@sludge256 here it is:

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

<p> view more
<a href="http://www.freecatphotoapp.com">cat photos</a>
</p>
<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

UtkarshShukla7
@UtkarshShukla7
May 06 2016 02:53
@Lolz1243 don't press enter after view more just use space
Brian
@sludge256
May 06 2016 02:54
@Lolz1243 It passes for me but instead of a new line try inserting a space.
Nik Vy
@Lolz1243
May 06 2016 02:54
@UtkarshShukla7 @sludge256 i don't know why but it still doesn't work either way
Brian
@sludge256
May 06 2016 02:55
Reset the challenge or refresh the page.
Nik Vy
@Lolz1243
May 06 2016 02:55
already did
Brian
@sludge256
May 06 2016 02:56
Are you doing this on a computer or mobile?
UtkarshShukla7
@UtkarshShukla7
May 06 2016 02:56
@Lolz1243 copy and paste this code and check
``````<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>``````
Jod
@jod29
May 06 2016 02:57
what is asked?
Brian
@sludge256
May 06 2016 02:57
They have the correct code.
Nik Vy
@Lolz1243
May 06 2016 02:57
@UtkarshShukla7 wow it worked! What did I do wrong?
Brian
@sludge256
May 06 2016 02:58
@Lolz1243 Which test was failing?
UtkarshShukla7
@UtkarshShukla7
May 06 2016 02:58
@Lolz1243 I don't exactly know but there were some issues with the character encoding
Brian
@sludge256
May 06 2016 02:59
Yea that seems to be an issue for some mobile users.
Nik Vy
@Lolz1243
May 06 2016 03:00
@sludge256 First, I'm using a computer, Second, It said I wasn't nesting the a element inside a p element
Brian
@sludge256
May 06 2016 03:00
It was still nested.
That's why I asked to try putting it all in one line at first.
You said that didn't work though.
Nik Vy
@Lolz1243
May 06 2016 03:01
I know
I'm not exactly sure what happened
UtkarshShukla7
@UtkarshShukla7
May 06 2016 03:02
@Lolz1243 I copy-pasted your code earlier and it worked for me.
Nik Vy
@Lolz1243
May 06 2016 03:02
@UtkarshShukla7 maybe my computer is just being sketchy
Weskendel
@Weskendel
May 06 2016 03:02
weird
Nik Vy
@Lolz1243
May 06 2016 03:02
:P
Weskendel
@Weskendel
May 06 2016 03:02
weird
UtkarshShukla7
@UtkarshShukla7
May 06 2016 03:02
@Lolz1243 :smile:
Brian
@sludge256
May 06 2016 03:03
I think if you copy and pasted your own code that you posted it might pass also.
Nik Vy
@Lolz1243
May 06 2016 03:03
I'll try that if I ever get into any of these situations again
Thanks again for the help!
UtkarshShukla7
@UtkarshShukla7
May 06 2016 03:04
@Lolz1243 np
MuhammadRe
@MuhammadRe
May 06 2016 03:08
@sludge256 how are you ?
ready for some Angular
Brian
@sludge256
May 06 2016 03:09
Good luck :+1:
MuhammadRe
@MuhammadRe
May 06 2016 03:09
i want ur help
Reach4dstars
@endencia
May 06 2016 03:09
@MuhammadRe what do u need?
MuhammadRe
@MuhammadRe
May 06 2016 03:10
i'm trying to get some json from my own computer but it deosn't work
``````{
world:{
news_title_world: "Gang jailed over pensioner phone scam",
news_brief_world:"Eight men from London have been jailed for a phone scam that defrauded UK pensioners out of more than £1m.",
news_full_world:"Eight men from London have been jailed for a phone scam that defrauded UK pensioners out of more than £1m.
Police say some of the money funded travel from the UK to Syria. There are fears some of those who travelled had links to so-called Islamic State.
Gang leader Makzhumi Abukar was jailed for seven years and four months, alongside accomplices including former X Factor contestant Nathan Fagan-Gayle.
Some of the victims - the oldest of whom was 94 - lost as much as £130,000.
Passing sentence at the Old Bailey, Judge Anuja Dhir said that none of the convicted men had shown any genuine remorse.
She told the men their crimes would have a devastating and lasting impact on the victims, whose average age was 83.
Phone scam victim: 'My fears my savings went to Syria'
She praised detectives from Scotland Yard's counter terrorism command who brought the men to justice.
Speaking about the victims, the judge added: I was struck by their dignity and their courage when giving evidence about a matter that was so obviously painful for them to relive.",
news_img_world: "http://ichef-1.bbci.co.uk/news/624/cpsprodpb/15CB5/production/_89596298_composite1copy.jpg"
},
sport: {
news_title_sport:"Leicester City win Premier League: What next for the champions?",
news_brief_sport: "The fairytale is complete. The movie has its perfect Hollywood ending. Now, what about that sequel?",
news_full_sport: "The fairytale is complete. The movie has its perfect Hollywood ending. Now, what about that sequel?

Will it be Leicester: Back with a Vengeance or The Premier League Strikes Back?

The bookies - still reeling from the eye-watering financial gut-punch of a Leicester title win - are hedging their bets.

The Foxes are 33-1 to be champions again, 5-1 to finish in the top four, 15-8 to finish in the bottom half, and 25-1 to be relegated. When it comes to Leicester's fortunes next season, it seems no scenario can be ruled out.

And then there's the Champions League. Costly continental distraction, or new frontier to be conquered?

Here, BBC Sport examines what next season might hold for Leicester.",
news_img_sport: "http://ichef.bbci.co.uk/onesport/cps/800/cpsprodpb/94F0/production/_89582183_morgan_goal_getty.jpg"
},
health: {
news_title_health: "15-year-old loses 100 pounds to reach bodybuilding dream",
news_brief_health: "At 15, MacKenzie Walker has accomplished more than most people twice her age.",
news_full_health: "At 15, MacKenzie Walker has accomplished more than most people twice her age. She's written a book. She's started a business, training and coaching clients online. She's amassed nearly 60,000 Instagram followers.

And perhaps most impressive, MacKenzie has lost -- and kept off -- 100 pounds.
She never misses the gym, her dad, Scott Walker, said. If I say, 'I want ice cream,' she said, 'Dad, I don't have the (macronutrients) for that.' She won't cheat on her diet.
MacKenzie dreams of being Ms. Olympia, the world's best female bodybuilder. Envisioning her in that role is a bit of a stretch for strangers looking at her tiny 5-foot-5-inch frame. But those who know what she's already done to reach her goals have no trouble imagining it.",
news_img_health:"http://i2.cdn.turner.com/cnnnext/dam/assets/150924074414-mackenzie-walker-before-after-split-large-169.jpg"
}
}``````
here is the json objects
``````
var app = angular.module('part', [])
app.controller('myCtrl', function (worldNews) {
var vm = this;
worldNews.getNews().then(function(wN){
vm.news_title_world = wN.news_title_world;
vm.news_brief_world = wN.news_brief_world;
vm.news_full_world = wN.news_full_world;
vm.news_img_world = wN.news_img_world;
vm.news_title_sport = wN.news_title_sport;
vm.news_brief_sport = wN.news_brief_sport;
vm.news_full_sport = wN.news_full_sport;
vm.news_img_sport = wN.news_img_sport;
vm.news_title_health = wN.news_title_health;
vm.news_brief_health = wN.news_brief_health;
vm.news_full_health = wN.news_full_health;
vm.news_img_health = wN.news_img_health
});

});

app.service('worldNews', function(\$http){
this.getNews = function(){
return \$http.get('news.json')
.then(function(response){
return {
news_title_world : response.data.world.news_title_world,
news_brief_world : response.data.world.news_brief_world,
news_full_world : response.data.world.news_full_world,
news_img_world : response.data.world.news_img_world,
news_title_sport : response.data.sport.news_title_sport,
news_brief_sport : response.data.sport.news_brief_sport,
news_full_sport : response.data.sport.news_full_sport,
news_img_sport : response.data.sport.news_img_sport,
news_title_health : response.data.news_title_health,
news_brief_healt : response.data.news_brief_health,
news_full_health : response.data.news_full_health,
news_img_health : response.data.news_img_health
};
});
};
});``````
and here is my angular module
and there is also the html page where i want to display the json
but it doesn't work
MuhammadRe
@MuhammadRe
May 06 2016 03:15
what's guys nobody knows what is the prob ?
Alex Triece
@atrieceeph289
May 06 2016 03:16
Nik Vy
@Lolz1243
May 06 2016 03:17

I have a slightly easier question...

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

What is the valid syntax that I need to use for the input element?

MuhammadRe
@MuhammadRe
May 06 2016 03:17
if you want a text box use text
if you want another thing just change it
Alex Triece
@atrieceeph289
May 06 2016 03:18
Hey guys, Im looking for some tips on how to emulate some of the elements in this page. Anyone know what is the best way to get the body to look this way? also, id like the nav bar to scroll with the page
MuhammadRe
@MuhammadRe
May 06 2016 03:19
type="submit" for button
there is also type="checkbox"
and radio
Nik Vy
@Lolz1243
May 06 2016 03:23
my computer is actually malfunctioning. I guess I'm going to have to use this copy + paste thing for a while. :smile: @UtkarshShukla7 @sludge256
Gym Chao
@gymchao
May 06 2016 03:25

hi, may i ask if anything wrong here? }

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

Nik Vy
@Lolz1243
May 06 2016 03:25
solid
not soild
Gym Chao
@gymchao
May 06 2016 03:26
@Lolz1243 oh.....tks
Nik Vy
@Lolz1243
May 06 2016 03:26
np
Will Ruzvidzo
@WilliamRuz
May 06 2016 03:28
Hi all. I'm completely stuck with this challenge: "Set remainder equal to the remainder of 11 divided by 3 using the remainder (%) operator." Not sure what I'm supposed to do and the examples aren't clear to me.
MuhammadRe
@MuhammadRe
May 06 2016 03:33
@WilliamRuz 11%3
RyukRoth
@RyukRoth
May 06 2016 03:35
hello, I created the class .pink-test {
color: pink;
}
philipsiu
@philipsiu
May 06 2016 03:35
Hi. I just got to the Build a Random Quote Generator project but I don't know where to start
Can anybody provide some direction
RyukRoth
@RyukRoth
May 06 2016 03:35
and gave the heading <h1 class="pink-test">Hello World!</h1> the class but the challenge won't accept it?
MuhammadRe
@MuhammadRe
May 06 2016 03:36
@RyukRoth what do you suppose to do
@philthyfill start to build an array of objects each object contains author and quote
RyukRoth
@RyukRoth
May 06 2016 03:37
create a pink class and give the h1 the class to override the body elements color
MuhammadRe
@MuhammadRe
May 06 2016 03:38
@RyukRoth the name of the challenge
RyukRoth
@RyukRoth
May 06 2016 03:38
@MuhammadRe the name is Prioritize One Style Over Another
Alicia
@aliciamshelton
May 06 2016 03:39

Can you tell me what I'm doing wrong here... trying to apply multiple jQuery selectors...

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

});
</script>

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

Will Ruzvidzo
@WilliamRuz
May 06 2016 03:40
@MuhammadRe When I input that, I get this error notification: "TypeError: 3 is not a function"
MuhammadRe
@MuhammadRe
May 06 2016 03:41
@RyukRoth
``````
<style>
body {
background-color: black;
font-family: Monospace;
color: green;
}
.pink-text {
color:pink;
}
</style>
<h1 class="pink-text">Hello World!</h1>``````
be sure to put it after body
Will Ruzvidzo
@WilliamRuz
May 06 2016 03:42
MuhammadRe
@MuhammadRe
May 06 2016 03:43
@WilliamRuz
``var remainder = 11%3;``
it is like this
RyukRoth
@RyukRoth
May 06 2016 03:43
@MuhammadRe I reset my code and just typed it in again, now it worked. thanks
MuhammadRe
@MuhammadRe
May 06 2016 03:43
you have to set the reminder equals to
CamperBot
@camperbot
May 06 2016 03:43
ryukroth sends brownie points to @muhammadre :sparkles: :thumbsup: :sparkles:
:cookie: 320 | @muhammadre |http://www.freecodecamp.com/muhammadre
MuhammadRe
@MuhammadRe
May 06 2016 03:43
@RyukRoth np
Will Ruzvidzo
@WilliamRuz
May 06 2016 03:46
@MuhammadRe Thank you so much!
CamperBot
@camperbot
May 06 2016 03:46
williamruz sends brownie points to @muhammadre :sparkles: :thumbsup: :sparkles:
:cookie: 321 | @muhammadre |http://www.freecodecamp.com/muhammadre
Sean DiSanti
@badc0ded
May 06 2016 03:48
hi all, how goes it
MuhammadRe
@MuhammadRe
May 06 2016 03:48
@badc0ded hello
Kyle Diablo
@KDiablo
May 06 2016 03:49
whew, this tribute page project is slightly overwhelming when there aren't any ibstructions -_-
instructions*
Daniel
@profoundhub
May 06 2016 03:50
Hi everyone! how are you all tonight?
Sean DiSanti
@badc0ded
May 06 2016 03:50
doing great, Daniel, how about yourself?
MuhammadRe
@MuhammadRe
May 06 2016 03:50
it is easy @KDiablo
@badc0ded i am fine thnx
CamperBot
@camperbot
May 06 2016 03:50
muhammadre sends brownie points to @badc0ded :sparkles: :thumbsup: :sparkles:
:cookie: 332 | @badc0ded |http://www.freecodecamp.com/badc0ded
Frederick Mawuli
@fkmawuli
May 06 2016 03:54
please what's wrong with this code <div class="container-fluid">
<div class="row">
<h3 class="text-primary text-center">jQuery Playground</h3>
</div>
</div>
Sean DiSanti
@badc0ded
May 06 2016 03:54
the h3 should be in a column div
doesn't necessarily HAVE to be, but to take full advantage of bootstrap grid
Frederick Mawuli
@fkmawuli
May 06 2016 03:55
explain further
CamperBot
@camperbot
May 06 2016 03:55
no wiki entry for: `further`
Chris Cullen
@123xylem
May 06 2016 03:55
http://codepen.io/123xylem/pen/reoPGp?editors=1100
Can someone tell me why my .machine and <p1> Author</p1> are not aligned like the rest of the page!!?
Sean DiSanti
@badc0ded
May 06 2016 03:55
that's best quick explanation of grid system
MuhammadRe
@MuhammadRe
May 06 2016 03:59
@123xylem because there is no p1 in html just p
<p></p>
Daniel
@profoundhub
May 06 2016 04:00
@123xylem look at my comments in the other chat room.
Chris Cullen
@123xylem
May 06 2016 04:00
@MuhammadRe goodjob thanks
CamperBot
@camperbot
May 06 2016 04:00
123xylem sends brownie points to @muhammadre :sparkles: :thumbsup: :sparkles:
:cookie: 322 | @muhammadre |http://www.freecodecamp.com/muhammadre
Chris Cullen
@123xylem
May 06 2016 04:00
@profoundhub yea thanks am doing and its helping
CamperBot
@camperbot
May 06 2016 04:00
123xylem sends brownie points to @profoundhub :sparkles: :thumbsup: :sparkles:
:cookie: 381 | @profoundhub |http://www.freecodecamp.com/profoundhub
Daniel
@profoundhub
May 06 2016 04:00
@123xylem :+1:
Chris Cullen
@123xylem
May 06 2016 04:02
So that kind of workd... It didnt totally fill out the jumbotron width though... Is that because I have padding on jumbottron or somehting? http://codepen.io/123xylem/pen/reoPGp?editors=1100
Also It looks bad when not at 100% zoom
Sean DiSanti
@badc0ded
May 06 2016 04:03
looks ok on my screen, but i've got narrow window
VultureBetrayer
@VultureBetrayer
May 06 2016 04:04
it's formatting properly on mine in both window and full screen
refresh your page and see if that doesn't fix it
Sean DiSanti
@badc0ded
May 06 2016 04:05
ctrl+shift+r to clear cache too
Chris Cullen
@123xylem
May 06 2016 04:07
Just the wisdom button goes off center when out of zoom
everything else is ok
But the main problem here is the jubotron (white box) is not letting the .machine (brown box) expand in width..
It only lets the brown box expand to the right
DO I have to add style elements to jumbotron to take off a margin or somehing?
Richard Andrews
@Whiplash5057
May 06 2016 04:32
Guys ..I want the weather forcast of the next five days..!! I cannot See the json for it
mangalita
@mangalita
May 06 2016 04:36
Nest all of your radio buttons inside one div with the class row.
Nest each of your radio buttons inside its own div with the class col-xs-6.
Make sure each of your div elements has a closing tag.
MuhammadRe
@MuhammadRe
May 06 2016 04:40
what is the name of challenge @mangalita
Alex Triece
@atrieceeph289
May 06 2016 04:40
hey guys, im struggling to get my portfolio page started. Any tips for the basic structure of the thing?
MuhammadRe
@MuhammadRe
May 06 2016 04:44
@atrieceeph289 just like the example
do the same
nav bar and title some links to ur soical links and many back grounds
Mr. Gone
@meanicecream
May 06 2016 04:48

So I am at the spot where it says "fill in the blank with Placeholder Text"

I plug in the stuff that it tells me to (there is a check mark near the things it wants done) and hit "Run tests" only to have it pop up "shiver me timers!"

The problem is that it doesn't allow me to click the button to continue. It's just greyed out :(

Any suggestions?
wjeanv
@wjeanv
May 06 2016 04:51
I have a question about a challenge called "Nest an Anchor Element within a Paragraph"--It says "Your p element should have the text "View more " (with a space after it)." I have is <p>View more <a href="http://www.freecatphotoapp.com">cat photos</a> </p>
*what I have is; sorry, I am not used to chat rooms
Sean DiSanti
@badc0ded
May 06 2016 04:52
it looks good but looks like you're missing the space after View more
or it just looks that way with the font in here
wjeanv
@wjeanv
May 06 2016 04:53
There is a space there. Now I tried it again with two spaces and it still didn't work.
Chris Cullen
@123xylem
May 06 2016 04:55
Im trying to seperate my nested array into Name and Quote Variables. So I did for loops that look at the sub array 0 and 1 and label them name or quote... Am I anywhere near on this?
``````var arr =[["There is a natural aristocracy among men. The grounds of this are virtue and talents."," Thomas Jefferson (1743-1826)"],["All our words from loose using have lost their edge.",
"Ernest Hemingway (1898-1961)"]
var quote= "";
var newarr=[];
for(i=0;i<arr.length;i++){

for(j=0;j<arr[i].length;j++){var name="";
arr[i][j][0]= quote;
arr[i][j][1]= name;
}}
console.log(name);``````
Sean DiSanti
@badc0ded
May 06 2016 04:55
it looks good to me @wjeanv maybe refresh page and try again?
Ross
@Woodywoodruff3
May 06 2016 04:56

Can someone let me know why my input element doesnt have a valid syntax?

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

wjeanv
@wjeanv
May 06 2016 04:57
Actually it started last night. I've shut down my laptop and come back. I also did a hard refresh before coming in here (after reading the instructions).
Brian
@sludge256
May 06 2016 04:57
@wjeanv Try copying and pasting the code you posted in the last message back into the editor.
mangalita
@mangalita
May 06 2016 04:58
Add a div element with the class well inside each of your div elements with the class "col-xs-6"
Nest both of your div elements with the class "col-xs-6" within your div element with the class "row".
Make sure all your div elements have closing tags. this the questin
This how i have answered it

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

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

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

</div>
</div>

wjeanv
@wjeanv
May 06 2016 05:01
@sludge256 Ok I just tried that and it still didn't work. Darnit.
Chinmay Desai
@cdesai
May 06 2016 05:01
Hi @123xylem , with your code you need console.log in the loop
Brian
@sludge256
May 06 2016 05:02
@Woodywoodruff3 There's a fix on the way but for now put the code on one line.
@wjeanv Try copying and pasting off this:
``<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a> </p>``
@mangalita Is it the extra end div tag?
wjeanv
@wjeanv
May 06 2016 05:04
@Brian It still gives me the same message
Brian
@sludge256
May 06 2016 05:05
@wjeanv Hmmm
Can you paste in the URL at the top?
It may contain some clues
Chinmay Desai
@cdesai
May 06 2016 05:05
You don't need two loops @123xylem
Zhenyu
@A7bert
May 06 2016 05:05
function submitForm(\$form, \$resultElement) {
\$.ajax({
type: "GET",
url: \$form.attr("action"),
data: \$form.serialize(),
cache: false,
dataType: "jsonp"
Sorry...
Ross
@Woodywoodruff3
May 06 2016 05:05
@sludge256 Thanks Brian!
CamperBot
@camperbot
May 06 2016 05:05
:star2: 2479 | @sludge256 |http://www.freecodecamp.com/sludge256
woodywoodruff3 sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
Chris Cullen
@123xylem
May 06 2016 05:06
@cdesai But I want to seperate the element sin each sub array so that 1 is quote and other is name?
Zhenyu
@A7bert
May 06 2016 05:06
What do those type, url, data call for the function?
Chinmay Desai
@cdesai
May 06 2016 05:06
This is two dimensional array so

@123xylem - try this - var arr =[["There is a natural aristocracy among men. The grounds of this are virtue and talents."," Thomas Jefferson (1743-1826)"],["All our words from loose using have lost their edge.",
"Ernest Hemingway (1898-1961)"]];
var quote= "";
var name="";
var newarr=[];
for(i=0;i<arr.length;i++){

``````  quote = arr[i][0];
name = arr[i][1];``````

console.log(quote);
console.log(name);
}

wjeanv
@wjeanv
May 06 2016 05:06
@Brian well it's really long...
Brian
@sludge256
May 06 2016 05:06
I know
Chinmay Desai
@cdesai
May 06 2016 05:07
@123xylem you have to use console.log in the loop so you can print out individual item, the moment you get out of the loop it will only remember last value.
mangalita
@mangalita
May 06 2016 05:07

this the questionBootstrap has a class called well that can create a visual sense of depth for your columns.

Nest one div element with the class well within each of your col-xs-6 div elements.

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

<div class="row">
<div class="well">
<div class="col-xs-6">
</div>
</div>
<div class="well">
<div class="col-xs-6">
</div>
</div>
</div>
</div><!--end of row-->
</div><!--enf of fluid container-->

please help

Brian
@sludge256
May 06 2016 05:08
@wjeanv I see
I had a suspicion that this was the issue.
Delete the extra anchor element you have at the bottom.
Chinmay Desai
@cdesai
May 06 2016 05:08
@123xylem let me know if you need to understand anypart of the code
wjeanv
@wjeanv
May 06 2016 05:09
@sludge256 yaaay!!!! Thank you!!
CamperBot
@camperbot
May 06 2016 05:09
wjeanv sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star2: 2480 | @sludge256 |http://www.freecodecamp.com/sludge256
Chinmay Desai
@cdesai
May 06 2016 05:09
@123xylem not sure why you have got newarr array declared.
@123xylem you shouldn't need that.
Chris Cullen
@123xylem
May 06 2016 05:10
@cdesai good stuff chinmay... Will I be able to call say i[2] like this? I would want to be able to call 1 sub array that holds name and quote value...Im making a quote machine so I would say something like (on click event - console.log quote + name)
Because my array is really like 15 long
not 2
I had newarr earlier from when I pushed arr into it to see how it looked
Chinmay Desai
@cdesai
May 06 2016 05:12
@123xylem remember
Chris Cullen
@123xylem
May 06 2016 05:13
sorry not i[2] I meant like sub array 5 or something... i will always be i but
Brian
@sludge256
May 06 2016 05:14
@mangalita The wells should be inside the col-xs-6 divs
Not the other way around
Chinmay Desai
@cdesai
May 06 2016 05:14
@123xylem In an array you can refer to element by numbers. So the subarray is selected when you do i[0] and then in subarray 0 is quote and 1 is name so when you do i[0][0] - quote 1, i0 - name1, i[1][0] - quote2, i1-name2 and so on
Chinmay Desai
@cdesai
May 06 2016 05:20
@123xylem with code above you should be fine iterating through any number of quotes. Your for loop was correct it's just you need only one of it.
JamesQuillin
@JamesQuillin
May 06 2016 05:22
hi everyone. quick question. Anyone know why += doesn't seem to work on JavaScript strings? When I type:
newStr = newStr.concat(str);
it works fine but
newStr += str;
does not work. Any thoughts? I thought += was defined for strings so i must be using it incorrectly.
Eddie G
@wombat74
May 06 2016 05:22
``````\$("#left-well:nth-child(2)").addClass("animated bounce");
\$("#right-well:nth-child(2)").addClass("animated bounce");``````
Can anyone fill me in on why this isn't working?
MuhammadRe
@MuhammadRe
May 06 2016 05:23
@wombat74 what is the challenge name
Eddie G
@wombat74
May 06 2016 05:23
The whole wells are bouncing..
Target a Specific Child of an Element Using jQuery
Daniel
@profoundhub
May 06 2016 05:24
(newStr += str) === (newStr = newStr + str) @JamesQuillin
Pritesh Gandhi
@prijuly2000
May 06 2016 05:25
@wombat74 you need space between "well :nth"
MuhammadRe
@MuhammadRe
May 06 2016 05:25
@wombat74
\$("#target2").addClass("animated bounce");
Daniel
@profoundhub
May 06 2016 05:26
@JamesQuillin i think concat only works for strings
JamesQuillin
@JamesQuillin
May 06 2016 05:27
@profoundhub I actually tried both of those and in the end it doesn't matter since concat() works fine but I want to figure out why it didn't worl
Pritesh Gandhi
@prijuly2000
May 06 2016 05:27
@wombat74 is it working?
Eddie G
@wombat74
May 06 2016 05:27
Trying now..
JamesQuillin
@JamesQuillin
May 06 2016 05:27
@profoundhub I know concat() is only for strings. The thing was that the += operator didn't concatenate strings correctly, or so it seemed.
Pritesh Gandhi
@prijuly2000
May 06 2016 05:27
ok
JamesQuillin
@JamesQuillin
May 06 2016 05:28
but SO and MDN mention how + and += are defined for string objectrs in Javascript so I'm not sure what the problem was
MuhammadRe
@MuhammadRe
May 06 2016 05:28
@wombat74
``\$(".target:nth-child(2)").addClass("animated bounce");``
Eddie G
@wombat74
May 06 2016 05:29
@prijuly2000 thanks that worked!
CamperBot
@camperbot
May 06 2016 05:29
wombat74 sends brownie points to @prijuly2000 :sparkles: :thumbsup: :sparkles:
:cookie: 17 | @prijuly2000 |http://www.freecodecamp.com/prijuly2000
Pritesh Gandhi
@prijuly2000
May 06 2016 05:29
anytime... :)
ANASS ABDELMUTTALIB AWAD
@alkalas
May 06 2016 05:29
hello everybody
Pritesh Gandhi
@prijuly2000
May 06 2016 05:29
hi
@alkalas
Eddie G
@wombat74
May 06 2016 05:29
@MuhammadRe thanks bud.
CamperBot
@camperbot
May 06 2016 05:29
wombat74 sends brownie points to @muhammadre :sparkles: :thumbsup: :sparkles:
:cookie: 323 | @muhammadre |http://www.freecodecamp.com/muhammadre
Daniel
@profoundhub
May 06 2016 05:30
@JamesQuillin does it add a space in between ?
JamesQuillin
@JamesQuillin
May 06 2016 05:30
@profoundhub thanks for trying to help. FWIW I refreshed the FCC app and + and += work correctly now. Not sure why but I think it was a bug on their end.
CamperBot
@camperbot
May 06 2016 05:30
jamesquillin sends brownie points to @profoundhub :sparkles: :thumbsup: :sparkles:
:cookie: 389 | @profoundhub |http://www.freecodecamp.com/profoundhub
ANASS ABDELMUTTALIB AWAD
@alkalas
May 06 2016 05:31
i have a small problem in <h1><!--Hello World--></h1>
uncomment HTML
MuhammadRe
@MuhammadRe
May 06 2016 05:31
@wombat74 what you did is not correct be sure you havt to animate just the second not the whole
Pritesh Gandhi
@prijuly2000
May 06 2016 05:31
@alkalas remove <!-- -->
Eddie G
@wombat74
May 06 2016 05:32
@MuhammadRe yes, it only animated the 2nd elements of each well. thanks
CamperBot
@camperbot
May 06 2016 05:32
wombat74 sends brownie points to @muhammadre :sparkles: :thumbsup: :sparkles:
:warning: wombat74 already gave muhammadre points
JamesQuillin
@JamesQuillin
May 06 2016 05:32

@alkalas inside the <h> tags should just be text. like

<h1> asdlfkjasdfklhasdlkfjasdklfj </h1>

Daniel
@profoundhub
May 06 2016 05:34
@JamesQuillin which question was that? I am trying to reproduce it on codepen
ANASS ABDELMUTTALIB AWAD
@alkalas
May 06 2016 05:35
@prijuly2000 i removed <!-- --> but it doesn't work
MuhammadRe
@MuhammadRe
May 06 2016 05:36
@alkalas from out side
``// <h1>Hello World</h1>``
Pritesh Gandhi
@prijuly2000
May 06 2016 05:36
you want to print the text of the commented part , right?
do you wanna comment or uncomment?
Make it <!-- <h1>Hello World</h1> --> if you wanna comment it
ANASS ABDELMUTTALIB AWAD
@alkalas
May 06 2016 05:37
thank you
Pritesh Gandhi
@prijuly2000
May 06 2016 05:37
@alkalas
did that work?
ANASS ABDELMUTTALIB AWAD
@alkalas
May 06 2016 05:37
ya
Pritesh Gandhi
@prijuly2000
May 06 2016 05:37
nice
Marihuas!
@BryanVasquez
May 06 2016 05:38
http://prntscr.com/b0ubb4
I did everything from the instructions! What am I doing wrong? :c
MuhammadRe
@MuhammadRe
May 06 2016 05:39
@BryanVasquez because you didn't change blue-text to red-text in css
.red-text {
color:red;
}
they have to be the same name
Marihuas!
@BryanVasquez
May 06 2016 05:40
I did, but the color still doesn't changing
MuhammadRe
@MuhammadRe
May 06 2016 05:41
@BryanVasquez change it above
@BryanVasquez it works my friend the title became red
rphares
@rphares
May 06 2016 05:43
can you link the actual challenge, @BryanVasquez ?
Marihuas!
@BryanVasquez
May 06 2016 05:43
rphares
@rphares
May 06 2016 05:43
that change worked-- could be the 'Style' being capitalised (should be lowercase) but we can play around with the code if you link it...
Marihuas!
@BryanVasquez
May 06 2016 05:44
@MuhammadRe Thanks!!
CamperBot
@camperbot
May 06 2016 05:44
bryanvasquez sends brownie points to @muhammadre :sparkles: :thumbsup: :sparkles:
:cookie: 324 | @muhammadre |http://www.freecodecamp.com/muhammadre
rphares
@rphares
May 06 2016 05:44
ah, working now? @BryanVasquez
Marihuas!
@BryanVasquez
May 06 2016 05:44
yes! thanks guys!
MuhammadRe
@MuhammadRe
May 06 2016 05:45
np .......
elviskouassi
@elviskouassi
May 06 2016 05:45
is somebody could help me and tell me what is wrong here :
Marihuas!
@BryanVasquez
May 06 2016 05:46
here where?
elviskouassi
@elviskouassi
May 06 2016 05:47
in the use of the Use CSS Selectors to Style Elements
Kyle Diablo
@KDiablo
May 06 2016 05:47
Hey there! Another camper brought it to my attention that the image next to the paragraph block is much larger than the paragraph itself, but on my end, it is proportional. Could I get a second opinion?
https://codepen.io/KDiablo/full/wGRNOo/
sajmalyousef
@sajmalyousef
May 06 2016 05:47

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

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

<p>Things cats love:</p>

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

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

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

<input type="text" placeholder="cat photo URL">
The finished input element should have valid syntax.

whats wrong with this?
Kyle Diablo
@KDiablo
May 06 2016 05:49
@sajmalyousef Try resetting your code, then hard refreshing the browser page, and try again.
MuhammadRe
@MuhammadRe
May 06 2016 05:49
<p>Click here for <a href="#">cat photos</a>.</p> remove the dot between
<p>Click here for <a href="#">cat photos</a></p>
did you see it?
elviskouassi
@elviskouassi
May 06 2016 05:53

<style>
h2 {color: blue;}
</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>

esopp
@esopp
May 06 2016 05:53
@KDiablo the spacing looks excellent in the chat window, a bit of a wide margin exists between the coat of arms and the text when I open the page in its own tab, but nothing I would call unreasonable.
MuhammadRe
@MuhammadRe
May 06 2016 05:54
@sajmalyousef close the input </input>
@elviskouassi
``````<style>
.red-text {color: red;}
</style>
<h2 class="red-text">CatPhotoApp</h2>``````
you have to change the class name in both
like this
MikeUIDev
@MikeUIDev
May 06 2016 05:57
dont think input needs a closing tag
does it?
esopp
@esopp
May 06 2016 05:57
Erm, actually. If anyone would be so kind, I believe I have been staring at this exercise too long and have render myself unable to spot semantic/logical errors. The weird thing for me is that right up until the last moment, steamrollArray seems to be working (according to the test statement in the code) but then it returns undefined instead of an array.
``````function steamrollArray(arr) {
// I'm a steamroller, baby
var a = [];
var unpack = function(val) { a.push(val); };

console.log("iterating with", arr);
if (flat(arr)) return arr;

for (var i in arr) {
if (Array.isArray(arr[i])) arr[i].forEach(unpack);
else a.push(arr[i]);
}

steamrollArray(a);

}

function flat(arr) {
for (var i in arr) { if (Array.isArray(arr[i])) return false; }
return true;
}

steamrollArray([1, [2], [3, [[4]]]]);``````
Kyle Diablo
@KDiablo
May 06 2016 05:58
@esopp I see that space you're talking about, thank you!
CamperBot
@camperbot
May 06 2016 05:58
kdiablo sends brownie points to @esopp :sparkles: :thumbsup: :sparkles:
:cookie: 305 | @esopp |http://www.freecodecamp.com/esopp
esopp
@esopp
May 06 2016 06:00
you're quite welcome @KDiablo
elviskouassi
@elviskouassi
May 06 2016 06:00
@MuhammadRe it is the number 15 change the color of the text
your solution doesnt work
MuhammadRe
@MuhammadRe
May 06 2016 06:01
it works
you want to make it red right ?
``````
<style>
.red-text {color: red;}
</style>

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

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>``````
copy this and it will work i promise
elviskouassi
@elviskouassi
May 06 2016 06:04
@MuhammadRe thank you , just make it run. I think it was my internet connection
CamperBot
@camperbot
May 06 2016 06:04
elviskouassi sends brownie points to @muhammadre :sparkles: :thumbsup: :sparkles:
:cookie: 325 | @muhammadre |http://www.freecodecamp.com/muhammadre
MuhammadRe
@MuhammadRe
May 06 2016 06:04
np
upendrahanda
@upendrahanda
May 06 2016 06:16
Hello, I am a newbie on the chat. Where should I head to get general programming help?
MikeUIDev
@MikeUIDev
May 06 2016 06:16
here is fine
nocturnalninja
@nocturnalninja
May 06 2016 06:16
Guys, can I get some help? It's 8 am and I still can't brain. When I want to link this site to my github, I don't get that option unless I go to settings. There I find it but when I click on it, it just loops me back to the instruction page.
upendrahanda
@upendrahanda
May 06 2016 06:17
Hey, thanks Mike. I have programmed in a few languages like C-sharp.NET, PHP and Java. I wanted to revisit my concepts and generalize
esopp
@esopp
May 06 2016 06:18
@nocturnalninja by this page do you mean your profile?
nocturnalninja
@nocturnalninja
May 06 2016 06:18
Yes, sorry I wasn't clear.
esopp
@esopp
May 06 2016 06:19
@nocturnalninja if so, I've noticed you may have to start with http:// and make sure you set target="_blank" in your <a> tag
because codepen seems to have some weird settings that prevent links from working normally
upendrahanda
@upendrahanda
May 06 2016 06:21
@nocturnalninja, yes, you should try to use http:// as I remember an instance from my php dev experience, where not using http:// in the anchor makes it look like a relative url to the interpreter.
esopp
@esopp
May 06 2016 06:21
in other words, <a href="http://URL" target="_blank>clickable text goes here</a>
nocturnalninja
@nocturnalninja
May 06 2016 06:23
Gosh, thank you. Let me try. I only played around with HTML and CSS but not much Javascript.
Wait, @esopp , don't I have to have the link in the HTML somewhere?
@upendrahanda I am trying to use that but it switches to https immdeiately.
esopp
@esopp
May 06 2016 06:26
@nocturnalninja oh, lastly, I should add (though you may already know) that target="_blank" tells the browser to open the link in a new tab or window. But I know that (possibly depending on your settings) links without it don't always work on codepen
upendrahanda
@upendrahanda
May 06 2016 06:26
@nocturnalninja , use https:// instead. Maybe because github works on https:// not http://
And what @esopp said, that too. I haven't coded much on CodePen lately so I'm not aware of the loopholes
esopp
@esopp
May 06 2016 06:27
@nocturnalninja yes, in the href="https://"
so for example
if I wanted to link here I would go:
chudnoteka
@chudnoteka
May 06 2016 06:29
@MuhammadRe how dis copy the exact screen we seen in challenges
esopp
@esopp
May 06 2016 06:29
`<a href="https://gitter.im/FreeCodeCamp/Help" target="_blank">Click Me!</a>`
^^^ @nocturnalninja
MuhammadRe
@MuhammadRe
May 06 2016 06:29
@chudnoteka put ``` before the code
and ``` after the code
nocturnalninja
@nocturnalninja
May 06 2016 06:30
@esopp i am a complete noob here, yet again, and I didn't even get to the codepen part. I am basically just signing in.
Let me try to make a html document.
esopp
@esopp
May 06 2016 06:32
@nocturnalninja Ah, got it! I assumed you were doing one of the early assignments (where you have to make a profile page for yourself)
nocturnalninja
@nocturnalninja
May 06 2016 06:33
No no, I am just signing in! I found this site yesterday and now I am looking around and getting settled.
chudnoteka
@chudnoteka
May 06 2016 06:33
@MuhammadRe after ``` before and after than what?
esopp
@esopp
May 06 2016 06:34
Cool :clap:
welcome, then!
MuhammadRe
@MuhammadRe
May 06 2016 06:34
your code
i mean your code should be between
nocturnalninja
@nocturnalninja
May 06 2016 06:37
Thank you! Sorry I wasn't clear!
chudnoteka
@chudnoteka
May 06 2016 06:38
@MuhammadRe
``````  .red-text {
color: red;
}
p{font-size:16px;}
</style>

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>``````
Nice, thank you!
Do you know what's wrong with this code
upendrahanda
@upendrahanda
May 06 2016 06:40
use <p> in the last statement @chudnoteka
esopp
@esopp
May 06 2016 06:41
@chudnoteka You're fine! It's possible the problem was my reading comprehension, tbh. I am rather sleep-deprived at present.
MuhammadRe
@MuhammadRe
May 06 2016 06:42
@chudnoteka yes no need for the class in <p>
just in h2
esopp
@esopp
May 06 2016 06:44
@chudnoteka also it looks like you open a <p tag and never close it at the beginning of the last line.
upendrahanda
@upendrahanda
May 06 2016 06:45
@chudnoteka I have solved these exercises a few weeks back so you can refer to the solutions if you like to, but I dont know how to link you there.
MuhammadRe
@MuhammadRe
May 06 2016 06:46
@esopp no it is closed just scroll to the right and see
esopp
@esopp
May 06 2016 06:47
AH, yeah I just realized I phrase that badly. I meant the tag itself need a closing >.
upendrahanda
@upendrahanda
May 06 2016 06:47
@MuhammadRe , the opening paragraph tag has no >
RakeshNerkar
@Rakesh18754
May 06 2016 06:47

function clone(obj) {
.....
}
var cloned = clone(o1);
var finalObj = combine(cloned, o2);
function combine(cloned, o2) {
return tempNewObj;

};

I want to write this code in a single function any idea how can i do it?

esopp
@esopp
May 06 2016 06:47
like <p Purr jump eat.... should be <p> Purr jump eat...
@deepakpatil007 so with one function that takes two objects as parameters, clone the two objects and combine those objects into a new object?
esopp
@esopp
May 06 2016 06:53
@deepakpatil007 do you know how to define a function as a variable of a function?

```function combine (obj1, obj2) {
var clone = function (obj) {
//clone obj and return clone from here
};

//make clones by calling clone function and combine
//your clones here. Then return final object
}```

upendrahanda
@upendrahanda
May 06 2016 06:58
function clone(obj1, obj2) {
.....
//dont return the cloned object rather
var cloned = //clonedObject
...//statements of combine function
return tempNewObj;
}
and finally, you write:
var finalObj = clone (o1, o2)
or you can use as @esopp suggested by writing subroutines inside your function.
esopp
@esopp
May 06 2016 07:02
@upendrahanda oh actually I was about to say your answer is probably better, semantically speaking
as in, having clone() be the function called rather than combine()
upendrahanda
@upendrahanda
May 06 2016 07:03
@esopp Thanks. Your approach is also clean in terms of visualizing
CamperBot
@camperbot
May 06 2016 07:03
upendrahanda sends brownie points to @esopp :sparkles: :thumbsup: :sparkles:
:cookie: 306 | @esopp |http://www.freecodecamp.com/esopp
upendrahanda
@upendrahanda
May 06 2016 07:04
I am new to JS but I think it's how I do in general in laguages I know.
Gym Chao
@gymchao
May 06 2016 07:04
hi, i would like to seek help to solve this <form id="cat-photo-element" "cat-photo-form"action="/submit-cat-photo" >
upendrahanda
@upendrahanda
May 06 2016 07:06
@gymchao just choose only one identifier for id, either "cat-photo-element" or "cat-photo-form" and remove the other.
<form id= "cat-photo-form"action="/submit-cat-photo" >
esopp
@esopp
May 06 2016 07:06
thanks @upendrahanda. but yeah, after you posted that, it occurred to me that it makes intuitive sense to have a clone method that returns some sort of cloned object, but that it's not necessarily as obvious that the combine method would return anything cloned... I mean it's a minor thing but shrugs
CamperBot
@camperbot
May 06 2016 07:06
esopp sends brownie points to @upendrahanda :sparkles: :thumbsup: :sparkles:
:cookie: 62 | @upendrahanda |http://www.freecodecamp.com/upendrahanda
Gym Chao
@gymchao
May 06 2016 07:07
@upendrahanda but it requires to have both
@upendrahanda It said "Give your form element the id of cat-photo-form.
Your form element should have the background-color of green.
upendrahanda
@upendrahanda
May 06 2016 07:08
@esopp I see. well, to narrow down all into one object, he can also change the name of the function which is more apt.
@gymchao oops! I think I missed a space after id. Please try, <form id="cat-photo-form" action="/submit-cat-photo" >
@gymchao , challenge number?
Gym Chao
@gymchao
May 06 2016 07:10
44
upendrahanda
@upendrahanda
May 06 2016 07:11
I am sorry. Tell me the heading of challenge please
Gym Chao
@gymchao
May 06 2016 07:11
oh sorry set the ID of an Element
upendrahanda
@upendrahanda
May 06 2016 07:12
how do I link to my solution here, anyone?
Gym Chao
@gymchao
May 06 2016 07:13
@upendrahanda Sorry, should be...Use an ID Attribute to Style an Element
upendrahanda
@upendrahanda
May 06 2016 07:14
I found the solution in my older practices @gymchao , I am not sure if this links you to them but find it here https://www.freecodecamp.com/upendrahanda
Sascha Bratton
@saschabratton
May 06 2016 07:14
@upendrahanda usually if you are helping solve a problem, just try to explain the problem instead of simply showing answer
upendrahanda
@upendrahanda
May 06 2016 07:14
oh ty @saschabratton , I will keep in mind.
CamperBot
@camperbot
May 06 2016 07:14
upendrahanda sends brownie points to @saschabratton :sparkles: :thumbsup: :sparkles:
:cookie: 297 | @saschabratton |http://www.freecodecamp.com/saschabratton
upendrahanda
@upendrahanda
May 06 2016 07:15

well @gym, you can simply define id of a form (or any element) by using like this:

<form id="whatever-you-wanna-call-it">

Gym Chao
@gymchao
May 06 2016 07:15
@upendrahanda many thanks\
CamperBot
@camperbot
May 06 2016 07:15
gymchao sends brownie points to @upendrahanda :sparkles: :thumbsup: :sparkles:
:cookie: 63 | @upendrahanda |http://www.freecodecamp.com/upendrahanda
Steven Cruz
@itsstoiven
May 06 2016 07:15
can anyone help with my code right now?
im not sure why the json isnt passing through
upendrahanda
@upendrahanda
May 06 2016 07:16
you're welcome. Gym
Later people.
V1ad1m1r
@V1ad1m1r
May 06 2016 07:20
@itsstoiven what issue are you trying to solve?
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 07:22
Good morning everyone
Can I ask something about the "Target a Specific Child of an Element Using jQuery" jquery lesson?
Steven Cruz
@itsstoiven
May 06 2016 07:23
@V1ad1m1r so i want the random quote to appear using the api i have set as var url
@V1ad1m1r but im not entirely sure whats wrong as nothing is being displayed, but the url itself is fine as i am returned json
V1ad1m1r
@V1ad1m1r
May 06 2016 07:25
@itsstoiven im looking at it.
just a sec :)
@itsstoiven im getting an error off the URL.
@itsstoiven wait
never mind.
V1ad1m1r
@V1ad1m1r
May 06 2016 07:32
i think the issue is in your API call. When I sub out another, the page works.
@itsstoiven above
@itsstoiven try this call- `http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=jsonp&lang=en&jsonp=?`
@itsstoiven also, move your URL inside the function.
Steven Cruz
@itsstoiven
May 06 2016 07:36
@V1ad1m1r wow, it works lol. i dont get it. do you know why to use jsonp?
Sascha Bratton
@saschabratton
May 06 2016 07:37
It's a Cross Origin Resource Sharing issue
V1ad1m1r
@V1ad1m1r
May 06 2016 07:37
@itsstoiven http://json-jsonp-tutorial.craic.com/index.html <--- will give you the difference between them. Basically from what I can tell, jsonp gets past the browser security. which if you run your previous code and check the console was what was stopping your API.
Steven Cruz
@itsstoiven
May 06 2016 07:38
@V1ad1m1r ill take a look at it. thanks a lot for the help! saved me a bunch of time
CamperBot
@camperbot
May 06 2016 07:38
itsstoiven sends brownie points to @v1ad1m1r :sparkles: :thumbsup: :sparkles:
:cookie: 290 | @v1ad1m1r |http://www.freecodecamp.com/v1ad1m1r
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 07:39
Hello there, can I ask something about the "Target a Specific Child of an Element Using jQuery" jquery lesson?
V1ad1m1r
@V1ad1m1r
May 06 2016 07:39
@itsstoiven no worries. API's are a beast for me right now too :) it was good practice to de-bug your issue :)
@IvanaDiCarlo whats your question Ivana?
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 07:39
@V1ad1m1r something not as interesting I'm afraid :smile:

I'm asked to "Make the second child in each of your well elements bounce" using the `target:nth-child(n)`

But my problem is... I don't understand how the selector works.
I mean, I have to select the second child of my well elements (I have two diffented well ids, #right-well and #left-well)... It works if I put
`\$(".target:nth-child(2)").addClass("animated bounce");`
I know I just have those "second childs" so it can't just select something else, but what if I had another list with another second element with a different id... How it recocnizes the well id with this code?

Sascha Bratton
@saschabratton
May 06 2016 07:40
@itsstoiven It's because the URL you requested was on a different domain name. JSONP works around Same-origin Policy.
V1ad1m1r
@V1ad1m1r
May 06 2016 07:41
@IvanaDiCarlo can you post the code for me?
Sascha Bratton
@saschabratton
May 06 2016 07:41
@IvanaDiCarlo You are selecting the nth-child of `target` class not the `well` class
Steven Cruz
@itsstoiven
May 06 2016 07:41
@saschabratton can you explain same-origin policy? or as it when would it be appropriate to use json over jsonp?
V1ad1m1r
@V1ad1m1r
May 06 2016 07:41
@saschabratton i would like that as well :)
Sascha Bratton
@saschabratton
May 06 2016 07:41
You can use JSON request on the same domain, so if the JSON file was on codepen.io
Steven Cruz
@itsstoiven
May 06 2016 07:44
ahh it's a lot more clearer now and ill take a look at that site as well! thanks a bunch @saschabratton
CamperBot
@camperbot
May 06 2016 07:44
itsstoiven sends brownie points to @saschabratton :sparkles: :thumbsup: :sparkles:
:cookie: 299 | @saschabratton |http://www.freecodecamp.com/saschabratton
V1ad1m1r
@V1ad1m1r
May 06 2016 07:44
@saschabratton so JSONP is for requests from another domain. am I reading that right?
Sascha Bratton
@saschabratton
May 06 2016 07:45
Yeah, it's a security feature of the browser to prevent cross domain requests
JSONP works around that, but requires a special response from the server
V1ad1m1r
@V1ad1m1r
May 06 2016 07:46
@saschabratton ahhh! cool. thanks :)
CamperBot
@camperbot
May 06 2016 07:46
v1ad1m1r sends brownie points to @saschabratton :sparkles: :thumbsup: :sparkles:
:cookie: 300 | @saschabratton |http://www.freecodecamp.com/saschabratton
Sascha Bratton
@saschabratton
May 06 2016 07:46
That's why you need to request the JSONP format in the url query string
So it knows to response JSONP style
Kamil Malek
@KamilMalek
May 06 2016 07:50
Can someone tell me what is that piece of code doing in this pen: http://codepen.io/FreeCodeCamp/pen/ONjoLe ? I don't see any iFrame in html and the API requests doesn't seem to need it, I got it working without it
``function inIframe () { try { return window.self !== window.top; } catch (e) { return true; } }``
I just don't understand what that inIframe function is there for
V1ad1m1r
@V1ad1m1r
May 06 2016 07:51
@stutego what seems to be the problem?
stanley dominic
@stutego
May 06 2016 07:51
Tried every possible way still not passing this stage
Louis Swanepoel
@LouisSwanepoel
May 06 2016 07:52
@stutego try p {
font-size: 16px;
font-family: monospace;
}
remove capital F..
stanley dominic
@stutego
May 06 2016 07:52
I've tried dat too
Sascha Bratton
@saschabratton
May 06 2016 07:53
@KamilMalek that function checks if the window is an iframe
V1ad1m1r
@V1ad1m1r
May 06 2016 07:53
@stutego can you post your code with JS format?
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 07:53
Yes look at it @V1ad1m1r
Kamil Malek
@KamilMalek
May 06 2016 07:53
@saschabratton In what circumstances would it be an iframe?
Louis Swanepoel
@LouisSwanepoel
May 06 2016 07:53
and capitalize Monospace..
V1ad1m1r
@V1ad1m1r
May 06 2016 07:53
do you know how to format it for the forum
stanley dominic
@stutego
May 06 2016 07:53
Dont kw if it my browser am using chrome and ucweb @LouisSwanepoel
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 07:54
Sascha Bratton
@saschabratton
May 06 2016 07:54
@KamilMalek iframe have their own `window` object
So if the `window` in scope is not `window.top` then you are in the iframe's `window` scope
Louis Swanepoel
@LouisSwanepoel
May 06 2016 07:59
@stutego ''''p {
font-size: 16px; font-family: Monospace;
}'''' works for me...
CamperBot
@camperbot
May 06 2016 07:59
:bulb: to format code use backticks! ``` more info
Louis Swanepoel
@LouisSwanepoel
May 06 2016 07:59
@stutego ```p { font-size: 16px; font-family: Monospace; }```works for me...
stanley dominic
@stutego
May 06 2016 08:00
Owk lemme try it out
V1ad1m1r
@V1ad1m1r
May 06 2016 08:00
@IvanaDiCarlo I think i see. If you had a third well element with the target class used within it, then yes it would target that as well. With this current code you are targeting the class within the div. At lease as far as I can tell. Am i getting this wrong anyone?
@IvanaDiCarlo I am also learning, but i remember this being a confusing challenge :)
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 08:02
@V1ad1m1r I think so too... So I'm targeting all the six targets inside the well ids... But just because there's no mistake to be possibly made there...
stanley dominic
@stutego
May 06 2016 08:03
Still not working @LouisSwanepoel
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 08:03
YEs, I think maybe the explanation on that one is a bit confusing :smile:
V1ad1m1r
@V1ad1m1r
May 06 2016 08:04
@stutego please post the whole code you are seeing. use forum format please.
Kuldeep
@kuldeep-izap
May 06 2016 08:04
can anyone find the solution of Nest your text input element within a form element.
Louis Swanepoel
@LouisSwanepoel
May 06 2016 08:05
@stutego refresh your browser and try again....
stanley dominic
@stutego
May 06 2016 08:06
Owk tanx a mill it wrkd
Tanx @LouisSwanepoel
Sascha Bratton
@saschabratton
May 06 2016 08:06
@IvanaDiCarlo `#target2` and `#target5` are `:nth-child(2)`
Louis Swanepoel
@LouisSwanepoel
May 06 2016 08:07
Happy to help!
Sascha Bratton
@saschabratton
May 06 2016 08:09
@IvanaDiCarlo not sure what you're trying to accomplish, but you are not selecting all of the `target` class elements
V1ad1m1r
@V1ad1m1r
May 06 2016 08:12
@saschabratton i believe @IvanaDiCarlo is trying to figure out <i>why</i> `targer:nth-child()` targets 2 & 5, and how that would work if she had a third well with additional targets in it.
Sascha Bratton
@saschabratton
May 06 2016 08:12
The `well` class doesn't matter with that selector
Any `target` class element that is the second child of its parent will be selected
Regardless if that parent is a `well` class element or not.
V1ad1m1r
@V1ad1m1r
May 06 2016 08:13
@saschabratton ah that makes a little more sense.
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 08:17
@saschabratton @V1ad1m1r yes I know, I'm selecting the two second children, but the problem is what I'm asked to do, and the request says I have to select the "well" ids, that's what confused me
Sascha Bratton
@saschabratton
May 06 2016 08:17
@IvanaDiCarlo What does the request ask you to do?
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 08:18
@saschabratton "Make the second child in each of your well elements bounce" using the `target:nth-child(n)`
and I can pass the lesson using the `\$(".target:nth-child(2)").addClass("animated bounce");`
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 08:23
and that's the example given `\$(".target:nth-child(3)").addClass("animated bounce");`
when explaining the whole thing
Sascha Bratton
@saschabratton
May 06 2016 08:24
And you are uncertain because the solution is not flexible or scalable?
A lot of the required solutions are like that :\
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 08:26
@saschabratton I'm confused because I think that qith that code I'm selecting "target" elements using that id, and I'm not sure about being asked to focus on the "well" ids in my html code
at the beginning I thought "target" was part of the function :)
Sascha Bratton
@saschabratton
May 06 2016 08:26
You are supposed to select the second children of the `well` class elements
The second children are `target` class elements, so `.target:nth-child(2)` will select them
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 08:27
Ok now I get it, it's just semantics... Exactly as you say, the elements are the "target"
@thanks a lot @saschabratton and also @V1ad1m1r , it makes sense now!
Sascha Bratton
@saschabratton
May 06 2016 08:28
:thumbsup:
V1ad1m1r
@V1ad1m1r
May 06 2016 08:28
@IvanaDiCarlo :)
Ivana Di Carlo
@IvanaDiCarlo
May 06 2016 08:30
I'll stop overthinking instructions I promise :smile: I'm just happy so far I just asked for help this time, and another one 'cause I coudn't see a double bracket
Sascha Bratton
@saschabratton
May 06 2016 08:30
It's okay to ask questions
Abdul
@abdul786483
May 06 2016 08:40
Hiii, Iam unable to solve it Comment out your call to Google for the Lobster font by putting <!-- in front of it. Be sure to close your comment by adding -->.
Divyansh Saini
@NavyDish
May 06 2016 08:40
What is the exact problem @abdul786483 ?
V1ad1m1r
@V1ad1m1r
May 06 2016 08:41
trying to get whats typed int the search bar, to be pulled in by the java. grrr... http://codepen.io/Vladmir/pen/NNOMgq?editors=1010
stupid thing to be stuck on. the API for wikipedia is so much more of a pain.
Abdul
@abdul786483
May 06 2016 08:43
Iam using font degradation but when iam running it im not getting the output
h2 {
font-family: Lobster, Monospace;
}
Sascha Bratton
@saschabratton
May 06 2016 08:43
@V1ad1m1r what value are you looking for, what's in the text input?
Abdul
@abdul786483
May 06 2016 08:44
iam giving the comment before Lobster for degrade.
V1ad1m1r
@V1ad1m1r
May 06 2016 08:44
@saschabratton im trying to get anything typed in to be assigned to the input variable. currently, console isnt showing any string assigned to input. which is a problem if I'm going to add it to my API call.
Divyansh Saini
@NavyDish
May 06 2016 08:44
Can you paste your code snippet here, @abdul786483
Sascha Bratton
@saschabratton
May 06 2016 08:44
Try selecting the `input` element itself and using the `.value()` method.
Abdul
@abdul786483
May 06 2016 08:44

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

V1ad1m1r
@V1ad1m1r
May 06 2016 08:45
@saschabratton im not familiar with that.
Divyansh Saini
@NavyDish
May 06 2016 08:45
You haven't commented out the font api call to google
Abdul
@abdul786483
May 06 2016 08:45
Iam a beginner so i didn't have much knowledge about it...
Divyansh Saini
@NavyDish
May 06 2016 08:45

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

h2 {
font-family: Lobster, Monospace;
}

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

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Sascha Bratton
@saschabratton
May 06 2016 08:46
@V1ad1m1r sorry, it's actually not a method, just a property
Divyansh Saini
@NavyDish
May 06 2016 08:46
Use this
@abdul786483
Always include this "<!--" before and "-->" after on whatever you want to comment out.
Sascha Bratton
@saschabratton
May 06 2016 08:47
@V1ad1m1r you need to select the `input` element you want to get the value from and then assign its `value` property to your variable
Abdul
@abdul786483
May 06 2016 08:47
K.Im trying it
Thnqqq it works.
Divyansh Saini
@NavyDish
May 06 2016 08:51
(y)
V1ad1m1r
@V1ad1m1r
May 06 2016 08:51
@saschabratton im running into the same issue. its returning that input = <form id="search" _lpchecked="1">
What would you like to search?<br>
<br>
<input type="text" id="title" name="Title" placeholder="Search Wikipedia!"><br>
<input type="submit" id="sub">
</form>
@saschabratton ive saved the pen so you can see the new code.
Sascha Bratton
@saschabratton
May 06 2016 08:53
Looks like you are trying to put the form element into input element
V1ad1m1r
@V1ad1m1r
May 06 2016 08:53
@saschabratton yea . i think i might have jsut figured it out.
Sascha Bratton
@saschabratton
May 06 2016 08:53
Rather than assign the `input` variable to the input element value, I think you want to assign the input element value to the `input` variable
V1ad1m1r
@V1ad1m1r
May 06 2016 08:54
@saschabratton yea. i seem to be returning a string now under the input element.
thanks @saschabratton !!
CamperBot
@camperbot
May 06 2016 08:54
v1ad1m1r sends brownie points to @saschabratton :sparkles: :thumbsup: :sparkles:
:cookie: 302 | @saschabratton |http://www.freecodecamp.com/saschabratton
Sascha Bratton
@saschabratton
May 06 2016 08:54
@V1ad1m1r :thumbsup:
96street
@96street
May 06 2016 09:12
can I practise storing user accounts and input etc on my local server? without a host or domain?
Sascha Bratton
@saschabratton
May 06 2016 09:12
@96street sure you can
Darth Skywalker
@adityaparab
May 06 2016 09:13
@96street : Use node js for that. :)
Sascha Bratton
@saschabratton
May 06 2016 09:14
Node.js is a server-side javascript engine
96street
@96street
May 06 2016 09:14
can i use python? i'm just started learning python
Darth Skywalker
@adityaparab
May 06 2016 09:14
@96street : Sure!
wei
@503945930
May 06 2016 09:14
@saschabratton i like node.js
Sascha Bratton
@saschabratton
May 06 2016 09:14
You can't "store" user accounts "in" Node
Darth Skywalker
@adityaparab
May 06 2016 09:14
@96street you can use any server side technology
96street
@96street
May 06 2016 09:15
in python u can? @saschabratton
Sascha Bratton
@saschabratton
May 06 2016 09:15
Python is a language not a data store
Darth Skywalker
@adityaparab
May 06 2016 09:15
@saschabratton : neither in python, nor in java or in any server side language. You need database or file to "store" it. :)
96street
@96street
May 06 2016 09:15
do you mean like SQL?
Sascha Bratton
@saschabratton
May 06 2016 09:15
SQL is a relational database, yes you can store almost anything in SQL
Darth Skywalker
@adityaparab
May 06 2016 09:16
@96street SQL, noSQL, File all are valid storage mechanisms
96street
@96street
May 06 2016 09:16
so python sends data to store in SQL is that right?
Sascha Bratton
@saschabratton
May 06 2016 09:16
You can even store data in the client (browser)
No python is a programming language
Darth Skywalker
@adityaparab
May 06 2016 09:16
@saschabratton : Just to geek out. SQL is not a relational database. SQL (Structured Query Language) is a language used to manupulate Rdb.
Sascha Bratton
@saschabratton
May 06 2016 09:16
It can send data which can be stored in SQL though
96street
@96street
May 06 2016 09:17
so what does python do?
Darth Skywalker
@adityaparab
May 06 2016 09:18
Python is a language that allows you to write your own server and do server side operations like connecting and accessing the database.
Stuart Taylor
@Bouncey
May 06 2016 09:18
Hi guys, I've just tried to review previous solutions in intermediate algorithms, but my solutions haven't saved? Is this normal?
Darth Skywalker
@adityaparab
May 06 2016 09:18
Also, build and `serve` your webpages to the browser
Stuart Taylor
@Bouncey
May 06 2016 09:19
its as if I hit the reset button
96street
@96street
May 06 2016 09:19
thanks @adityaparab @saschabratton
CamperBot
@camperbot
May 06 2016 09:19
96street sends brownie points to @adityaparab and @saschabratton :sparkles: :thumbsup: :sparkles:
:cookie: 303 | @saschabratton |http://www.freecodecamp.com/saschabratton
:cookie: 195 | @adityaparab |http://www.freecodecamp.com/adityaparab
96street
@96street
May 06 2016 09:19
choosing python over node.js
Darth Skywalker
@adityaparab
May 06 2016 09:19
@96street Please let's not get into that argument as of now. Pick the server side language that you're most comfortable with for now. :)
96street
@96street
May 06 2016 09:20
haha i kno i wasn't asking im choosing python
Sanne
@sannek
May 06 2016 09:20
@Bouncey If you go to your profile, find the assignment and click "view solution" it should give you your solutions
Stuart Taylor
@Bouncey
May 06 2016 09:23
@sannek got it thanks
CamperBot
@camperbot
May 06 2016 09:23
:cookie: 278 | @sannek |http://www.freecodecamp.com/sannek
bouncey sends brownie points to @sannek :sparkles: :thumbsup: :sparkles:
Abhilash Swapnik
@akswapnik
May 06 2016 09:34
hello ppl. i need some clarifications about one of the jquery exercises.
Am I in the right room?
Rudolf Carl Pablico
@rudolfpablico
May 06 2016 09:37
hi guys need help on Show the local weather challenge
how can I show the API result in html
Randy
@rdavidson3
May 06 2016 09:46
Greetings friends can anyone lend aid on this

style>
h2 { color: blue; }
</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>

Css colour should be blue. Can't see what is broken
Abhilash Swapnik
@akswapnik
May 06 2016 09:49
@rdavidson3 i think it should be .h2 inside the style tag
Randy
@rdavidson3
May 06 2016 09:50
Thanks @akswapnik I will try that
CamperBot
@camperbot
May 06 2016 09:50
rdavidson3 sends brownie points to @akswapnik :sparkles: :thumbsup: :sparkles:
:cookie: 126 | @akswapnik |http://www.freecodecamp.com/akswapnik
Randy
@rdavidson3
May 06 2016 09:52
No go sadly
Abhilash Swapnik
@akswapnik
May 06 2016 09:52
@rdavidson3 sorry you missed the "<" for the style tag
Rocky C
@rchau05
May 06 2016 09:53
Also for: <h2">CatPhotoApp</h2>. You need to get rid of that quotation mark in your h2 tag
Randy
@rdavidson3
May 06 2016 09:55
Thanks @rchau05 that slipped my notice
CamperBot
@camperbot
May 06 2016 09:55
rdavidson3 sends brownie points to @rchau05 :sparkles: :thumbsup: :sparkles:
:cookie: 13 | @rchau05 |http://www.freecodecamp.com/rchau05
Rocky C
@rchau05
May 06 2016 09:56
Yeah no problem @rdavidson3 ! Did it work now?
Divyansh Saini
@NavyDish
May 06 2016 09:57
Does anyone face a problem in the online text editor. Sometime you can't just navigate to a particular line of code
Randy
@rdavidson3
May 06 2016 09:57
Yeah it worked perfectly
Divyansh Saini
@NavyDish
May 06 2016 09:57
Not even using mouse or keyboard
Alberto
@paparussian
May 06 2016 10:13
thanks @rphares! the name of the challenge is "Add borders around your elements" and here you can find my trial
CamperBot
@camperbot
May 06 2016 10:13
paparussian sends brownie points to @rphares :sparkles: :thumbsup: :sparkles:
:star2: 4377 | @rphares |http://www.freecodecamp.com/rphares
Chris Cullen
@123xylem
May 06 2016 10:18
Can someone give me a link or advice on how to add function output to html via a button???
Alberto
@paparussian
May 06 2016 10:22
@rphares let me know if you can receive my brownies because i'm very very noob :D
rphares
@rphares
May 06 2016 10:25
received, thanks! :blush: they get sent when you say thanks and @username. This message should send some to you, as i am saying thank you and mentioning you, @paparussian ~
CamperBot
@camperbot
May 06 2016 10:25
rphares sends brownie points to @username and @paparussian :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for username
:cookie: 24 | @paparussian |http://www.freecodecamp.com/paparussian
chalak2
@chalak2
May 06 2016 10:31
@paparussian how can i Create a class called gray-background with the background-color of gray. Assign this class to your div element.
Daniel O'Mahony
@OMahonyD
May 06 2016 10:36
Hi @chalak2 add "class=..." to your html div tag. Then control the styling in your css by using dot notation (.gray-background: ...)
chalak2
@chalak2
May 06 2016 10:43
@OMahonyD but why we use class for what?
Daniel O'Mahony
@OMahonyD
May 06 2016 10:45
@chalak2 Class is a way of selecting multiple html elements and applying the same style formatting to them. You would use id for unique elements like a single paragraph or perhaps a single heading but class is used to style lots.
chalak2
@chalak2
May 06 2016 10:47
@OMahonyD thank you
CamperBot
@camperbot
May 06 2016 10:47
chalak2 sends brownie points to @omahonyd :sparkles: :thumbsup: :sparkles:
:cookie: 364 | @omahonyd |http://www.freecodecamp.com/omahonyd
Daniel O'Mahony
@OMahonyD
May 06 2016 10:49
@chalak2 Sure thing
Bhargavi Goel
@bgoel99
May 06 2016 10:57
Sorry for the newbie question but... I just started the HTML challenges and can't figure out how to complete a challenge and move on? There's no 'next' button...
Brahma Reddy Chilakala
@bradd123
May 06 2016 11:02
If you can't figure out something, ask for help in help chat room @bgoel99
What is the challenge?
Divyansh Saini
@NavyDish
May 06 2016 11:03
@bgoel99 Once you think you are done press ctrl+enter
If your code is right, you will be automatically proceeded.
Bhargavi Goel
@bgoel99
May 06 2016 11:05
Thank you!
hallowcard13
@hallowcard13
May 06 2016 11:16
Hi guys i need your help
Im doing the wikipedia challenge
Anyone who can help me build the query url ?
Im a little bit confused because i cant pull out the link for each result
Brahma Reddy Chilakala
@bradd123
May 06 2016 11:19
@hallowcard13 Link to Wikipedia challenge?
Dominic Lobban
@alkapwn3d
May 06 2016 11:19

http://workbench.myartsonline.com/index.html

trying to center the sign up form horizontally and vertically but no dice. What am I missing?

hallowcard13
@hallowcard13
May 06 2016 11:20
@bradd123 i havent uploaded my code yet im working on my local machine for now
I just need the url
Im using this one, but doest have option to pull the url for each article or page
EdoJordan
@EdoJordan
May 06 2016 11:37
which languages are essential for game developing?
Ankit Panwar
@coderNoob
May 06 2016 11:38
@EdoJordan Only your problem solving abilities are necessary for game development. They can be developed using any language.
EdoJordan
@EdoJordan
May 06 2016 11:38
Okay
But if I need to make a game what should I use?
An online pvp game
Wise
@WiseNN
May 06 2016 11:40
`button.mousePressed(callWeather("button"));`
`reset.mousePressed(callWeather("reset"));` Just to make sure, it is ok if I pass strings into a method right? I know its a stupid question…but my calls arent working at all…and I cant find the problem
Ankit Panwar
@coderNoob
May 06 2016 11:44
@WiseNN Yes you can pass strings to a method.
cutie3
@cutie3
May 06 2016 11:44
hi everyone, pls i need help
Ankit Panwar
@coderNoob
May 06 2016 11:44
@EdoJordan You can make a basic game using some Javascript magic.
@EdoJordan By the time you're done doing the front-end development challenges, you'd have made two games.
elminsterrr
@elminsterrr
May 06 2016 11:45

Hi, I have problem with Basic Algorithm Scripting/Title Case a Sentence

Here is my code. Why it isn't working with sentence "I'm a little tea pot"? I'm getting ["I'm Little Tea Pot"]...

``````function titleCase(str) {
var splitted = str.split(" ");
var energy = [];

for (var i=0; i<splitted.length; i++){
for (var j=1; j<splitted[i].length; j++) {
var splittedTwo = splitted[i].split("");
var splittedThree = splittedTwo[j].toLowerCase();

if (j === 1) {
var splittedToUpperCase = splittedTwo[0].toUpperCase();

if (i === 0) {
energy = energy + splittedToUpperCase;
}

if( i !== 0 ){
energy = energy + " " + splittedToUpperCase;
}
}

energy = energy + splittedThree;
}
}
return energy;
}
//titleCase("I'm a little tea pot");
//titleCase("sHoRt AnD sToUt");
//titleCase("HERE IS MY HANDLE HERE IS MY SPOUT");``````
cutie3
@cutie3
May 06 2016 11:46
i want to view all pages in a website by scrolling with my mouse. i seem stuck. i will appreciate ur help
Wise
@WiseNN
May 06 2016 11:47
@coderNoob I know…i am just trying to figure out why my js is not loading. it reaches this line `var button = select("#submit");` and stops loading
Ankit Panwar
@coderNoob
May 06 2016 11:49
@WiseNN Need to see more of the code to figure it out.
Matej Palo
@dynematik
May 06 2016 11:52
Hey guys, I need help, what can I do to make my whole div with all content smaller when you scroll down? I need it for menu.
Ankit Panwar
@coderNoob
May 06 2016 11:53
@elminsterrr You should convert your entire string `toLowerCase()` first and then split it. WIll make it easier and shorter
Wise
@WiseNN
May 06 2016 11:53
@coderNoob right now Im just working on the setup method and the calls relating to it
ignore everything else…when I hit the buttons. Nothing happens
Not sure why
Ankit Panwar
@coderNoob
May 06 2016 11:56
@WiseNN I'm not sure whether `select()` is actually a method or not. Is there any documentation link for it?
elminsterrr
@elminsterrr
May 06 2016 11:57
@coderNoob O, I will try, thaks
Wise
@WiseNN
May 06 2016 11:57
@coderNoob No…just realized im using p5 libraries. I learn this concept using p5.js…Apparently it has its own library
Ankit Panwar
@coderNoob
May 06 2016 11:59
@WiseNN Okay I found the documentation. Hope this helps. jQuery select()
cutie3
@cutie3
May 06 2016 12:00
pls i need help
Tessa Bradford
@trose1189
May 06 2016 12:05

Hello everyone. I've been working on my Twitch assignment and I'm almost finished. I have a few nit-picky things I want to correct, but I can't seem to figure them out. All CSS stuff.

Here's the pen:
http://codepen.io/trose1189/full/xVmZRq

When I click the search and add icons, the other icon jumps around. I've tried all sorts of margin and padding combinations but can't seem to make them stop.

And then, when you click the buttons for "online", "offline" and "closed", the boxes line up strangely. I can't get them to float left.

I know these are small issues, but they're really bugging me. Any help would be appreciated! Thanks!

jonipetre
@jonipetre
May 06 2016 12:21
guys what is placeholder
syntax
Tessa Bradford
@trose1189
May 06 2016 12:23
@jonipetre It's what shows up inside of an input field BEFORE the user types something in. So, for example, if you have a form and they're supposed to enter their name, you would have something like:
``<input type="text" placeholder="Type your name here">``
Ankit Panwar
@coderNoob
May 06 2016 12:24
@trose1189 You need to put the search bar and the add icon in separate rows since you're using column size 12. Bootstrap stacks the columns if they expand beyond 12 cols.
Tessa Bradford
@trose1189
May 06 2016 12:24
Ooh, ok, thanks! @coderNoob I'll try it out.
CamperBot
@camperbot
May 06 2016 12:24
trose1189 sends brownie points to @codernoob :sparkles: :thumbsup: :sparkles:
:cookie: 371 | @codernoob |http://www.freecodecamp.com/codernoob
Tessa Bradford
@trose1189
May 06 2016 12:28
Hmm... maybe I put them in the wrong place... I created a <div class="row"> just above both col-md-12 divs, but things were still jumping around and re-sizing. Is that not where they should go? @coderNoob
Ankit Panwar
@coderNoob
May 06 2016 12:32
This message was deleted
Randy
@rdavidson3
May 06 2016 12:36
Trying to change my h2 element red l. Any idea where my mistake is?
Krishna Bharadwaj
@bharadwajpro
May 06 2016 12:36
Can anyone please explain what the router in options does in this code. I got this code from a blog. I am trying to do node http-proxy.
``````var http = require('http'),
httpProxy = require('http-proxy');

//
//Leave out the hostnameOnly field this time, or set it to false...
//
var options = {
router: {
'domainone.com/appone': '127.0.0.1:9000',
'domainone.com/apptwo': '127.0.0.1:9001',
'domaintwo.net/differentapp': '127.0.0.1:9002'
}
}

//
//...and then pass in your options like last time.
//
var proxyServer = httpProxy.createServer(options).listen(80);

//
// ...and a simple http server to show us our request back.
//
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.write('request successfully proxied!' + '\n' + JSON.stringify(req.headers, true, 2));
res.end();
}).listen(9000);``````
Randy
@rdavidson3
May 06 2016 12:37

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

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

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

May Kittens Devour Your Soul
@diomed
May 06 2016 12:38
<style>
where is your <
Wise
@WiseNN
May 06 2016 12:41
Can someone please help me…I am simply trying to add a click listener to a variable. this seems to have turned into the biggest problem
Darth Skywalker
@adityaparab
May 06 2016 12:43
@WiseNN Share the code please.
Randy
@rdavidson3
May 06 2016 12:43
Got cut off
@adityaparab I am in the setup() function …I do not know why my click listeners arent working…ive added them atleast 4 different ways now
Divyansh Saini
@NavyDish
May 06 2016 12:46
I am stuck at the "Target the same element with multiple jQuery Selectors
" challenge. Not sure where am I going wrong. Please help.
``````
<script>
\$(document).ready(function() {
\$("button").addClass("animated");
\$(".btn").addClass("shake");
\$("#target1")add.Class("btn-primary");
});
</script>

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

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>``````
UtkarshShukla7
@UtkarshShukla7
May 06 2016 12:47
@NavyDish \$("#target1")add.Class("btn-primary"); . between add and Class
Manish Giri
@Manish-Giri
May 06 2016 12:47

@WiseNN

``button.click(callWeather(1));``

lookup the jquery `click` syntax and use just 1 syntax throughout

Divyansh Saini
@NavyDish
May 06 2016 12:47
Thanks @UtkarshShukla7 :)
CamperBot
@camperbot
May 06 2016 12:47
navydish sends brownie points to @utkarshshukla7 :sparkles: :thumbsup: :sparkles:
:cookie: 440 | @utkarshshukla7 |http://www.freecodecamp.com/utkarshshukla7
UtkarshShukla7
@UtkarshShukla7
May 06 2016 12:47
@NavyDish np
Wise
@WiseNN
May 06 2016 12:47
@Manish-Giri that does not work
@Manish-Giri I do not know why, this is my third site…no idea why this has started now
Sascha Bratton
@saschabratton
May 06 2016 12:49
This message was deleted
Manish Giri
@Manish-Giri
May 06 2016 12:49
@WiseNN I know that doesn't work, I pointed out that line to you because it's wrong
Wise
@WiseNN
May 06 2016 12:51
@saschabratton @Manish-Giri Ive used addEventListener(“click”, function(param)) …and that is straight from js documentation.
I figured it would not work with jQuery…but I did not know what else to do because ive tried every other way I know how
Sascha Bratton
@saschabratton
May 06 2016 12:52
What you have is sending a click event to the element, not a click listener
Coira Ellison
@Coira
May 06 2016 12:53
@Manish-Giri you've wrapped everything in a function, but you're not calling that function
also `elseif` should be `else if`
May Kittens Devour Your Soul
@diomed
May 06 2016 12:53
@Manish-Giri u have nice webpage :smile: it's a shame you didn't use jquery for get back to top :stuck_out_tongue:
Manish Giri
@Manish-Giri
May 06 2016 12:53
This message was deleted
Coira Ellison
@Coira
May 06 2016 12:54
whoops, wrong person!
Manish Giri
@Manish-Giri
May 06 2016 12:54
@Coira yeah, not my code :smile:
Coira Ellison
@Coira
May 06 2016 12:54
@WiseNN :)
Manish Giri
@Manish-Giri
May 06 2016 12:55
@diomed thanks! And good point about the get to top, let's see what we can do about that..
CamperBot
@camperbot
May 06 2016 12:55
manish-giri sends brownie points to @diomed :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for diomed
Randy
@rdavidson3
May 06 2016 12:55
Cannot seem to change my h2 element to red. Any ideas?

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

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

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

Wise
@WiseNN
May 06 2016 12:56
@saschabratton If you look at the commented section there is a lister on the second variable called reset…but that does not execute
Randy
@rdavidson3
May 06 2016 12:56
The < is there just cut off in copy
Coira Ellison
@Coira
May 06 2016 12:56
`\$('#button').click(callWeather);` will work, and if you need to pass in a parameter then `\$('#button').click(function() { callWeather(1) });` @WiseNN
Wise
@WiseNN
May 06 2016 12:56
@saschabratton my apologies…i thought I took the click event off
Manish Giri
@Manish-Giri
May 06 2016 12:57
@rdavidson3 missing the `<` in the opening `<style>`
Randy
@rdavidson3
May 06 2016 12:57
It's there just cut off during copy
May Kittens Devour Your Soul
@diomed
May 06 2016 12:58
everything looks fine and it should change to red. lol
Randy
@rdavidson3
May 06 2016 12:58
Lol that's what I thought
Wise
@WiseNN
May 06 2016 12:59
@Coira I know that would work…but I stored them in variables for a reason…I would like to know why the addEventListener() is not working
May Kittens Devour Your Soul
@diomed
May 06 2016 12:59
well where is your page where it won't?
Randy
@rdavidson3
May 06 2016 12:59
Thanks @diomed and @Manish-Giri
CamperBot
@camperbot
May 06 2016 12:59
rdavidson3 sends brownie points to @diomed and @manish-giri :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for diomed
:star2: 1006 | @manish-giri |http://www.freecodecamp.com/manish-giri
Darth Skywalker
@adityaparab
May 06 2016 12:59

@WiseNN : Your code works fine. There are a few things though which I did not understand the rationale behind.

In your setup function, you have

``````
var button = document.getElementById("#submit");
var reset = document.getElementById("#reset");
var input = document.getElementById("#city");``````

Which should be

``````var button = document.getElementById("submit");
var reset = document.getElementById("reset");
var input = document.getElementById("city");``````

If you're using `jQuery` selectors, then the `#` sign for IDs is require. Else you just specify the ID

Wise
@WiseNN
May 06 2016 13:00
@adityaparab I think you just answered my question
This message was deleted
@adityaparab Thank you
CamperBot
@camperbot
May 06 2016 13:01
wisenn sends brownie points to @adityaparab :sparkles: :thumbsup: :sparkles:
:cookie: 197 | @adityaparab |http://www.freecodecamp.com/adityaparab
Darth Skywalker
@adityaparab
May 06 2016 13:01

@WiseNN : In your `callWeather` function, there are syntax errors.

The correct syntax for else - if is

``````if(...){
}else if(...) // notice there is a space between, else and if
} else {
}``````

@WiseNN : Another suggestion to you is, if you're using `jQuery` then use jQuery selectors.

You should replace your getElementById calls with

``````
var button = \$("#submit");
var reset = \$("#reset");
var input = \$("#city");``````
Wise
@WiseNN
May 06 2016 13:05
@adityaparab I use jQuery sometimes…but I was using javascript at that moment...
@adityaparab also…the code is still not doing what it is supposed to….when I click the button…the alert is then supposed to pop up
the alert pops up as soon as the page loads…maybe I have the wrong understanding of what the addEventerListener() does
Darth Skywalker
@adityaparab
May 06 2016 13:06

Yes. I know. The problem is this line.

`reset.addEventListener("click",callWeather(2));`

Please not that you're `calling` the `callWeather` function right when it is assigned. So it won't execute again when you click the button.

You should change it to
``````reset.addEventListener("click", function(){
callWeather(2);
});``````
Similar for the function that alerts tests.
Wise
@WiseNN
May 06 2016 13:09
@adityaparab I asked someone earlier today…well…yesterday if there was a significance of doing one vs the other when calling methods…I come from java…so the concept plays out a little differently. So I will ask you, what is the diff. between calling with an anonym. function in the param…vs..leaving the user defined function in the param w/o brackets
Darth Skywalker
@adityaparab
May 06 2016 13:15

@WiseNN : Good question. :)
The code I shared just now, although it's an anonymous function, it is just a function that is declared in the place. It is NOT called.

See this,

`reset.addEventListener("click", callWeather)` is similar to

``````reset.addEventListener("click", function(){
callWeather(2);
});``````

Only thing is, in the first variant, you can't pass custom parameter.

Your original code
``reset.addEventListener("click", callWeather(2))` is similar to

``````reset.addEventListener("click", (function(){
callWeather(2);
})());``````

In this case, the function, although anonymous is called immediately.

Let me know if that answered your question. If not, I will take another angle and try to explain it in different way.
Arpan
@sahooarpan
May 06 2016 13:18
How to nest all html elements in class .container-fluid??
UtkarshShukla7
@UtkarshShukla7
May 06 2016 13:20
@sahooarpan
``````<div class="container-fluid">
your HTML code
</div>``````
Austen Allred
@growth-austen
May 06 2016 13:20
Really stupid question: How do I go to the next challenge? http://take.ms/ZgTVk
UtkarshShukla7
@UtkarshShukla7
May 06 2016 13:20
@growth-austen ctr+enter 2 times
Austen Allred
@growth-austen
May 06 2016 13:21
thanks
UtkarshShukla7
@UtkarshShukla7
May 06 2016 13:21
np
Arpan
@sahooarpan
May 06 2016 13:21
@UtkarshShukla7 thanx
CamperBot
@camperbot
May 06 2016 13:21
sahooarpan sends brownie points to @utkarshshukla7 :sparkles: :thumbsup: :sparkles:
:cookie: 441 | @utkarshshukla7 |http://www.freecodecamp.com/utkarshshukla7
UtkarshShukla7
@UtkarshShukla7
May 06 2016 13:21
@sahooarpan np
Wise
@WiseNN
May 06 2016 13:25
@adityaparab Im not sure what you mean when you say “You can’t pass custom param”…because my understanding (clearly not in scripting) of programming tells me that a custom param is `functionName(String[] args, args)` <<<(Or whatever you’d want to pass)…a method with no param’s would be `functionName()`<<< …so when you do `functionName( func2(){…} )` …I think of `functionName(func2)`<<< …simply because of the encapsulatiuon principles I was taught using java. but…to make my question simple…I want to know why I have to do it this way `functionName( func2(){…} )` … instead of this way `functionName(func2)` . Although I know that you’re way actually triggered the button…and my way just made the function load when the page loaded…I dont understand why your way worked, and mine did not
Coira Ellison
@Coira
May 06 2016 13:35
@WiseNN javascript has something that java doesn't, and that's first-class functions. that means that in js we can pass a function as data. so addEventListener would be defined something like this
``````function addEventListener(event, funcName) {
// do stuff
funcName()  // call the function you passed in
}

// adding an event to a button
button.addEventListener('click', func2);``````

if instead you did this

``button.addEventListener('click', func2());``

then addEventListener would receive the result of calling func2()

Wise
@WiseNN
May 06 2016 13:40

@Coira I think you are confusing my question a little I will modify what you wrote to show you …I would pass the function like this `button.addEventListener('click', func2);`

but I was told to pass the function like this
`button.addEventListener('click', func2(){…something in here…} );`

I am just asking what the difference is between the first and the second

Anton Kaminsky
@nakamin
May 06 2016 13:41
@WiseNN the second one has a parameter
oh wait nevermind
well the second one actually does something
the first one is a call to func2
the second one calls and defines func2 at the same time
Coira Ellison
@Coira
May 06 2016 13:44
@WiseNN ah i see. because addEventListener needs a function passed in, doing this `button.addEventListener('click', func2(1));` won't work, because func(2) isn't a function, it's the result of a function. so if you want to pass in a parameter to func2 or do some additional work before you call func2, you have to create a new function that in itself calls func2(1)
Wise
@WiseNN
May 06 2016 13:45
@Coira Ohhhhhh…I seee
@Coira Now that makes sense….first class functions…huh. Who would’ve thought.
Coira Ellison
@Coira
May 06 2016 13:45
actually, if this is what you're passing in `func2(){…something in here…}` without a parameter, then you probably can do `func2` by itself (as long as func2 is defined elsewhere)
i googled a bit, turns out java does have some sort of support for first-class functions, but it's a little more complicated
Sherlock Holmes
@SherlcokHolmes
May 06 2016 13:46
if ("Jon".length * 2 / (2+1) <100)
{
console.log("Error Error Error");
}
else
{
console.log("dd");
}Complete the missing bits of code to construct the if / else statement. Make the condition evaluate to true.
Finish the else statement by printing out the string "Error Error Error" to the console.
Coira Ellison
@Coira
May 06 2016 13:46
it's kinda of `fake first-class functions` :p
Sherlock Holmes
@SherlcokHolmes
May 06 2016 13:46
whats wrong with this code
i get this error Oops, try again. Make sure your if/else statement evaluates to true!
Coira Ellison
@Coira
May 06 2016 13:47
@SherlcokHolmes what's the challenge name?
Wise
@WiseNN
May 06 2016 13:48
You can…but you cant put the func2()…in javascript because apparently it loads the return value. I have never heard of that lol…when we write a first class function…we will pass the entire function …but the ()…is what is executing the call…so it runs the entire function...in any capacity…doesn’t matter if it has a return value or not.
right…fake first class functions lol
Sherlock Holmes
@SherlcokHolmes
May 06 2016 13:49
actually it's not on this site hehe i was trying code academy and i am stuck now
Wise
@WiseNN
May 06 2016 13:49
@Coira well thank you Coria…this has been a pleasent conversation
CamperBot
@camperbot
May 06 2016 13:49
wisenn sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:cookie: 566 | @coira |http://www.freecodecamp.com/coira
Coira Ellison
@Coira
May 06 2016 13:49
:)
Stephaney
@Stephaney
May 06 2016 13:50
Hi everyone, I'm running into a road bump with the bootstrap grid. It's telling me that "each of my bootstrap buttons should be nested within its own div and element with the class col-xs-4". I believe I wrote the code correctly but maybe not?

<div class="row">
<div class=col-xs-4"><button class="btn btn-block btn-primary">Like</button></div> <div class=col-xs-4"><button class="btn btn-block btn-info">Info</button></div>

``<div class=col-xs-4"><button class="btn btn-block btn-danger">Delete</button></div>``

</div>

Sherlock Holmes
@SherlcokHolmes
May 06 2016 13:53
if ("Jon".length * 2 / (2+1) <100)
{
console.log("Good");
}
else
{
console.log("Error Error Error");
} \Complete the missing bits of code to construct the if / else statement. Make the condition evaluate to true.
Finish the else statement by printing out the string "Error Error Error" to the console.
Coira Ellison
@Coira
May 06 2016 13:53
@SherlcokHolmes if i'm reading this correctly, the else part of the statement is meant to print "Error Error Error" rather than the if part
Lisa
@aGirlWhoCodes
May 06 2016 13:53
Hi @Stephaney Did you put this code inside a div container?
Coira Ellison
@Coira
May 06 2016 13:54
that looks ok, do you get a error/incorrect message @SherlcokHolmes ?
Stephaney
@Stephaney
May 06 2016 13:54
Hey @aGirlWhoCodes Yes
Sherlock Holmes
@SherlcokHolmes
May 06 2016 13:54
Oops, try again. Make sure your if/else statement evaluates to true!
Stephaney
@Stephaney
May 06 2016 13:54
@aGirlWhoCodes <div class="row">...</div>
Coira Ellison
@Coira
May 06 2016 13:54
@SherlcokHolmes should it return true? do you have a link?
Lisa
@aGirlWhoCodes
May 06 2016 13:55
You need to put your classes between " "
maityutpal
@maityutpal
May 06 2016 13:56
hi
Lisa
@aGirlWhoCodes
May 06 2016 13:56
<div class=col-xs-4"> should be <div class="col-xs-4"> @Stephaney
Sherlock Holmes
@SherlcokHolmes
May 06 2016 13:56
what link?
maityutpal
@maityutpal
May 06 2016 13:56
just getting an issue with the challenge "nest-an-anchor-element-within-a-paragraph"
Stephaney
@Stephaney
May 06 2016 13:57
@aGirlWhoCodes oh man. I can't believe I missed that. Thanks!
CamperBot
@camperbot
May 06 2016 13:57
stephaney sends brownie points to @agirlwhocodes :sparkles: :thumbsup: :sparkles:
:cookie: 288 | @agirlwhocodes |http://www.freecodecamp.com/agirlwhocodes
Coira Ellison
@Coira
May 06 2016 13:57
@SherlcokHolmes to the codecademy problem
maityutpal
@maityutpal
May 06 2016 13:57
can anyone help me
i am writing this code <p>
View more <a href="http://www.freecatphotoapp.com">cat photos</a>
</p>
but not working
Coira Ellison
@Coira
May 06 2016 13:59
@maityutpal works for me, have you put it in the right place?
Lisa
@aGirlWhoCodes
May 06 2016 13:59
@Stephaney You are welcome!
SimonCred
@SimonCred
May 06 2016 14:00

Hi could use some help - or a fresh pair of eyes - I'm doing the Golf Code assignment, getting errors I can't see why (completed the first if else challenge just fine) function golfScore(par, strokes) {
// Only change code below this line
if (strokes = 1) {
return "Hole-in-one!";
} else if (strokes <= par-2) {
return "Eagle";
} else if (strokes = par-1) {
return "Birdie";
} else if (strokes = par) {
return "Par";
}
// Only change code above this line
}

// Change these values to test
golfScore(3, 3);

Sherlock Holmes
@SherlcokHolmes
May 06 2016 14:00
Moisés Man
@moigithub
May 06 2016 14:01
@SimonCred = means assigment
== or === for comparing
SimonCred
@SimonCred
May 06 2016 14:01
whatever test values I set - it returns "hole in one"
@moigithub ah, ah-hah
Sherlock Holmes
@SherlcokHolmes
May 06 2016 14:02
have u tried the link ?@Coira
maityutpal
@maityutpal
May 06 2016 14:03

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

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

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>

SimonCred
@SimonCred
May 06 2016 14:03
@moigithub perfect, thanks
CamperBot
@camperbot
May 06 2016 14:03
simoncred sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 1082 | @moigithub |http://www.freecodecamp.com/moigithub
Coira Ellison
@Coira
May 06 2016 14:03
@SherlcokHolmes just looking
maityutpal
@maityutpal
May 06 2016 14:03
@Coira given the full snippet
John Paul Lim Gabule
@StevenGabule
May 06 2016 14:04
hello guys
Coira Ellison
@Coira
May 06 2016 14:05
@SherlcokHolmes i think this bit is the problem `Make sure not to delete any of the provided code. It could cause your code to fail!`
@SherlcokHolmes your code is technically correct (the best kind of correct!), but you need to use this as your if `("Jon".length * 2 / (2+1) === )` and complete it rather than change it
nocturnalninja
@nocturnalninja
May 06 2016 14:08
Hi guys! I have some trouble with setting up my account. I just signed in today and i sent an email but I don't know if anyone will have a time to look and answer it Whenever I try to link this site to my github, it loops me out. SO I cannot even start coding without it.
Anyone have any idea?
Coira Ellison
@Coira
May 06 2016 14:09
@maityutpal you need to enclose the <a> tag here
``````<h2 class="red-text">CatPhotoApp</h2>
<a href="http://www.freecatphotoapp.com">cat photos</a>
<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">``````
rather than add another one at the bottom
Sherlock Holmes
@SherlcokHolmes
May 06 2016 14:10
if ("Jon".length * 2 / (2+1) === 2 )
{
console.log("Good");
}
else
{
console.log("Error Error Error");
}
i wrote this still an error
Alexander Køpke
@alexanderkopke
May 06 2016 14:12
@nocturnalninja you are registered yesterday. Did you finish all the steps of the last challenge?
Moisés Man
@moigithub
May 06 2016 14:13
@SherlcokHolmes u only need to complete the missing part..
DO NOT CHANGE the comments "Good" is wrong
Coira Ellison
@Coira
May 06 2016 14:13
@SherlcokHolmes change console.log("Good") to `console.log("The answer makes sense!");`
nocturnalninja
@nocturnalninja
May 06 2016 14:13
No, I didn't know I had to do it like that. Lemme do this now @alexanderkopke
Coira Ellison
@Coira
May 06 2016 14:13
what an annoying exercise!
Sherlock Holmes
@SherlcokHolmes
May 06 2016 14:14
Finally! Thanks @Coira @moigithub
CamperBot
@camperbot
May 06 2016 14:14
sherlcokholmes sends brownie points to @coira and @moigithub :sparkles: :thumbsup: :sparkles:
:cookie: 567 | @coira |http://www.freecodecamp.com/coira
:star2: 1084 | @moigithub |http://www.freecodecamp.com/moigithub
den
@dtermined
May 06 2016 14:15
why does the first codepen exercise restrict us to not use css? isn't it easier to style the elements with css?
pgjones72
@pgjones72
May 06 2016 14:16
hey guys, should this function work? I can't figure out why it doesn't.
``````// when page is loaded, this function starts
\$(document).ready(function() {
// creating click event
\$("#location").click(function() {
// check if geolocation is supported
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
\$(".city").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
});
}
});
});``````
Valantis Kamayiannis
@vkamayiannis
May 06 2016 14:17
Hello to all. I wanted to ask a question (probably I will also direct it to the support team as well). If I try to link my profile with my github account I get an error message stating: The `user` instance is not valid. Details: `username` User already exists (value: "my-user-name"); `username` is not unique (value: "my-user-name"). Also for some reason in my profile I can see that I am camper fcc8cbb384b whatever that means. Anyone has a clue?
EdoJordan
@EdoJordan
May 06 2016 14:18
Hi to all.
Can anyone list the programming languages that are needed to master game developing?
ffranc
@ffranc
May 06 2016 14:19

trying to solve this exercise: use a css class to style an element <style>
<h2> .red-text {
color: red;
}
<h2/>
</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>

pgjones72
@pgjones72
May 06 2016 14:21
@ffranc h2 { color: red }
Manish Giri
@Manish-Giri
May 06 2016 14:21
@ffranc
``````<style>
.red-text {
color: red;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>``````
@EdoJordan C++ is a priority, I guess
Alexander Køpke
@alexanderkopke
May 06 2016 14:22
@ffranc <h2> doesn't go inside the styling tags and the red-text class needs to be added to the element you want to style: <h2 class="red-text">CatPhotoApp</h2>
@ffranc so if you also wanted the paragraph to be red-texted you simply add the class to it <p class="red-text">etc etc </p> and this would be red as well
Abdul
@abdul786483
May 06 2016 14:24

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

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

h2 {
font-family: Lobster, Monospace;
}

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

.smaller-image {
width: 100px;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
}
}
</style>

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

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Darth Skywalker
@adityaparab
May 06 2016 14:24

@WiseNN : Sorry for late reply. This is a common confusion when you come from a background of `strongly typed` languages to `loosely typed` languages. Java is strongly typed. Javascript is not.

When you say `function X() {}` then this X is nothing but a special 'object`of type`Function` (please note, the F is capital)

`X()` will call the function and `X` will simply return you the the object (of type Function) named X.

In java, your method signatures must be defined.

So if you have

``````
public class User{
public void setUser(){}
public void setUser(String name){}
}``````

Then if you do

``````User u = new User();

u.setUser(string1, string2);``````

2nd method call would cause an error for there is no signature of `setUser` that takes 2 parameters.

In Javascript, that is not the problem. Becuase it is loosely typed, it can modify anything, anytime, anywhere.

Now, when you do `reset.addEventListener("click", callWeather);` what you're doing is, you're passing an `Object` of type `Function` as a second parameter.

Dev Docs of `addEventListener` tell us that it takes 2nd parameter as a function. So when the `click` event is triggered on reset button, it tries to call the 2nd parameter. If it is a an object of type `Function`m JS wouldb e able to `call` it.

But when you do `reset.addEventListener("click", callWeather(2));`
What you're doing is passing the value returned from your `callWeather` function as 2nd parameter. Now in this case, your `callWeather doesn't return a function. JS tries to`call`something that is not an object of type`Function`. Obviously, it can't`call` it and hence it bombs.

The reason my code worked because I passed in an anonymous `Function`. It is a Function so it can be `called` and so it works.

There is, however, a way to make this line `reset.addEventListener("click", callWeather(2));` work.

Simply change the `callWeather` function to return a function. And it will still work.

so if you do

``````function callWeather(weather){

return function(){

// put all your original code here and it will still work.
}
}``````
Abdul
@abdul786483
May 06 2016 14:25
Iam facing some problem in this code.......
ffranc
@ffranc
May 06 2016 14:25
thanks @alexanderkopke
CamperBot
@camperbot
May 06 2016 14:25
:cookie: 614 | @alexanderkopke |http://www.freecodecamp.com/alexanderkopke
ffranc sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
Abdul
@abdul786483
May 06 2016 14:25
Your img element should have the class smaller-image.
can anyone sort it out
ffranc
@ffranc
May 06 2016 14:25
thanks @Manish-Giri
CamperBot
@camperbot
May 06 2016 14:25
ffranc sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 1007 | @manish-giri |http://www.freecodecamp.com/manish-giri
Alexander Køpke
@alexanderkopke
May 06 2016 14:26
@abdul786483 <img class="firstClass secondClass etcClass"> this is how you add more classes to same element
@abdul786483 <img class="thick-green-border smaller-image" src="https://bit.ly/fcc-relaxing-cat">
Kamil Malek
@KamilMalek
May 06 2016 14:29
My tumblr button doesn't work and it seems the same case with the example shown in the random quote machine challenge. Does anyone know how to get it to work?
``````function sendTumblr(){
window.open('https://tumblr.com/widgets/share/tool?posttype=quote&tags=quotes&caption=' + currentAuthor + '&content=' + currentQuote);
};``````
Tumblr returns 'This page does not exist'
Is it a problem with posttype=quote?
Pruthvi Raj
@devpruthvi
May 06 2016 14:30
pen link @KamilMalek ?
Kamil Malek
@KamilMalek
May 06 2016 14:31
@Pruthvi-Raj You can even see it in official example, doesn't work: http://codepen.io/FreeCodeCamp/pen/ONjoLe
In my own work it's just a simplified copy basically
Darth Skywalker
@adityaparab
May 06 2016 14:33
@KamilMalek There is nothing on this page. Problem is with either tumblr or with the tags that are being sent. Nothing wrong with your code. It opens a window and redirects you to the website.
Kamil Malek
@KamilMalek
May 06 2016 14:33
@adityaparab Yeah, it seems like it's a change with tumblr parameters, something that changed on the tumblr end that breaks this method and these tags
I was wondering if somebody got it working
And how can I make it work now
The easiest thing to do right now would be to simply get rid of tumblr button :P
Sherlock Holmes
@SherlcokHolmes
May 06 2016 14:36
var myStr = '<a href="http://www.example.com" target="_blank">Link</a>"';
whats wrong with this
You should have two single quotes ' and four double quotes "
Only remove the backslashes \ used to escape quotes.
thats the error i get
Kelby Gassman
@Kelbster
May 06 2016 14:37
@SherlcokHolmes you just have an extra “ after closing your <a> tag
Darth Skywalker
@adityaparab
May 06 2016 14:39
@KamilMalek No idea about updated query building for tumblr
Kamil Malek
@KamilMalek
May 06 2016 14:39
@adityaparab Got it working, no more worries ;)
den
@dtermined
May 06 2016 14:39
sorry i'm new and this question might be stupid: i don't really understand what is mean