These are chat archives for FreeCodeCamp/Help

1st
Mar 2016
Moisés Man
@moigithub
Mar 01 2016 00:00
@dputtick n where u extracted / copied the API url
Jared Abel
@jaredabel
Mar 01 2016 00:00
why does the wiki media api just break after working on my page for 10 minutes
Moisés Man
@moigithub
Mar 01 2016 00:01
@dputtick what u suppose to write on the textbox ?
@dputtick im not fromUS so.. dunno whta zipcode use... but ur $ajax code dont use any zip.. just a hardcoded url
Davide
@DavOnGit
Mar 01 2016 00:02
@dputtick var openweather = "http://api.openweathermap.org/data/2.5/weather?"+inputzip+",us&appid="+apikey; why you are not using this variable?
Dan Puttick
@dputtick
Mar 01 2016 00:03
@DavOnGit I was trying to pin down what the issue with the ajax method was. It doesn't work when I use the variable either
Moisés Man
@moigithub
Mar 01 2016 00:03
@dputtick url: "http://api.openweathermap.org/data/2.5/weather?10007,us&appid=cfb57864182fae4058e85c8f85e64cca",
and according to the API documentation.. seems missing zip= before 10007 if u using that number
@dputtick
testing this on browser
http://api.openweathermap.org/data/2.5/weather?10007,us&appid=cfb57864182fae4058e85c8f85e64cca this get me city not found
adding "zip="
http://api.openweathermap.org/data/2.5/weather?zip=10007,us&appid=cfb57864182fae4058e85c8f85e64cca
returns a json object with data
Dan Puttick
@dputtick
Mar 01 2016 00:04
@moigithub yeah that was a typo. I fixed it. Still, if ajax was being called it should be returning the "error" function, it isn't even doing that
Moisés Man
@moigithub
Mar 01 2016 00:07
@dputtick when i press 2 times the button..weather data shows on console
and screen keep refreshing...
Dan Puttick
@dputtick
Mar 01 2016 00:11
@moigithub ok, when I press the button twice quickly i get the "error" log, so that means that .ajax is being called, but for some reason the success function isn't running the first time. and then the second time it throws the error i guess
Moisés Man
@moigithub
Mar 01 2016 00:12
to prevent the form "submit" data n keep refreshing the page (default htmlform behavior) u can catch the submit event and event.preventDefault()
@dputtick
then u no need to fast click 2 times
Alex Guevara
@aguevara23
Mar 01 2016 00:14
Hi! I’m trying to recreate the example tribute page before I start my own. Would anyone like to take a couple of min to let me know if I am on the right track?
Moisés Man
@moigithub
Mar 01 2016 00:14
or u can move ur logic to submit event..instead of button click... (but still it will refresh so u need to return false;) (i think, read that somewhere in stackoverflow)
Jared Abel
@jaredabel
Mar 01 2016 00:15
i used
"""" $("#search").on('submit', function(e) {
e.preventDefault();
"""
also, can someone have a look at my codepen
and see how i broke my javascript
Moisés Man
@moigithub
Mar 01 2016 00:17
@jaredabel on console..it shows
Uncaught TypeError: Cannot read property 'pageId' of undefined
Jared Abel
@jaredabel
Mar 01 2016 00:18
yeah, i commented out my
""" // pageUrl:"http://en.wikipedia.org/w/api.php?action=query&prop=info&pageids=" + myRes.pageId + "&inprop=url""""
and it working again
hmm
Dan Puttick
@dputtick
Mar 01 2016 00:21
@moigithub @jaredabel that worked!!! Thanks so much
CamperBot
@camperbot
Mar 01 2016 00:21
dputtick sends brownie points to @moigithub and @jaredabel :sparkles: :thumbsup: :sparkles:
:star: 689 | @moigithub | http://www.freecodecamp.com/moigithub
:star: 323 | @jaredabel | http://www.freecodecamp.com/jaredabel
Moisés Man
@moigithub
Mar 01 2016 00:22
@jaredabel ahh u making a self reference on the new object u creating..
but myRes dont exist yet
Jared Abel
@jaredabel
Mar 01 2016 00:22
    console.log(myRes.pageId);
works
ahhh
thanks i see it now
Moisés Man
@moigithub
Mar 01 2016 00:22
var myObj = {
  myObj.key = value  // error... here
}
Jared Abel
@jaredabel
Mar 01 2016 00:23
yup
Moisés Man
@moigithub
Mar 01 2016 00:23
pagesOb.pageid using this should work
Jared Abel
@jaredabel
Mar 01 2016 00:23
yup i changed it
i thought about unnesting the pageurl thing from the object
then decided not to
so i could have also just put pageUrl= outside of the myRes i guess
Dustin
@Key-Banger
Mar 01 2016 00:25
would someone mind checking out my pen.I'm working on wikipedia also. I can get the title. Cant get the first sentence. Extracts are showing ""
http://codepen.io/Key-Banger/pen/RrzqKK?editors=0010
Moisés Man
@moigithub
Mar 01 2016 00:29
i see the "extract"on my console..
<p>A <b>camel</b> is an even-toed ungulate within the genus <i><b>Camelus</b></i>, bearing distinctive fatty deposits known as "humps" on its back. The two surviving species of camel are the dromedary, or one-humped camel (C. dromedarius), which inhabits the Middle East and the Horn of Africa; and the bactrian, or two-humped camel (C. bactrianus), which inhabits Central Asia.</p>
Dustin
@Key-Banger
Mar 01 2016 00:30
@moigithub hmm. I don't see it on mine. let me check again. I just kept getting an empty string.
Moisés Man
@moigithub
Mar 01 2016 00:31
refresh browser ?
@Key-Banger or probably its the missing semicolon onthe previous line ?
but i gotno error on my browser
Dustin
@Key-Banger
Mar 01 2016 00:32
@moigithub ok "camel" worked. "Jimi Hendrix" didnt?
Moisés Man
@moigithub
Mar 01 2016 00:34
add
$.getJSON(url, function(data) {
        console.log(data);  // <----
probably Jimi dont have any "extract" key
yep he doenst
Dustin
@Key-Banger
Mar 01 2016 00:36
@moigithub I dont understand.
Moisés Man
@moigithub
Mar 01 2016 00:36
when i code.. i add console.log everywhere.. helps sometimes :)
Nikhil
@nikhiltom
Mar 01 2016 00:37
Hey everyone, I am trying to create a portfolio page as part of the FCC challenge. I am having a difficult time getting the buttons to behave the way I want. I am using the grid system and because of that, there is automatic spacing between them. How do I control that spacing especially in the medium and large screen sizes?
here is a link to my codepen: http://codepen.io/ntb88/pen/pgMKXd?editors=1100
Dustin
@Key-Banger
Mar 01 2016 00:37
@Key-Banger I've been trying to use the sandbox to get my url right. Just cant get that first sentence for Jimi.
@moigithub sorry tagged myself
Tabi
@mrpassiontea
Mar 01 2016 00:38
Hey guys anybody know why bootstrap keeps making things have a white background? I try to add a picture white background, I try to add a <h1> over a black background and the <h1> has a white background...
@nikhiltom I think you should mess around with the margins and padding in css.
Dustin
@Key-Banger
Mar 01 2016 00:39
@mrpassiontea post your pen.
Tabi
@mrpassiontea
Mar 01 2016 00:39
@Key-Banger I'm just doing it straight from a html file
Moisés Man
@moigithub
Mar 01 2016 00:39
probably u should not pick "titles" only
Tabi
@mrpassiontea
Mar 01 2016 00:39
@Key-Banger err notepad my bad
Dustin
@Key-Banger
Mar 01 2016 00:40
@mrpassiontea ahh understand. Hard to tell without seeing code. I'm not familiar with bootstrap having a default background on h1.
Tabi
@mrpassiontea
Mar 01 2016 00:40
@Key-Banger Here's a quick example http://codepen.io/mrpassiontea/pen/zqxwew
Dustin
@Key-Banger
Mar 01 2016 00:40
@moigithub I think I understand.
Tabi
@mrpassiontea
Mar 01 2016 00:42
I have a black background, but in this case the <h1> has a white background color.. This might be because of the col-md-6 and container class?
And the <div class=row> It was a quick mistake but does not fix the white background even if I add "row"
Dustin
@Key-Banger
Mar 01 2016 00:44
@mrpassiontea I would use
body {
background-color: black;
}
instead of html
Nikhil
@nikhiltom
Mar 01 2016 00:44
@mrpassiontea I tried that too. I am allocating 3 columns for each buttons in the md, lg screen sizes. The content(button) is placed in the middle of each 3 column unit. This creates a crazy big gutter between the buttons... Is there a different way of doing this?
AnyssaJ
@AnyssaJ
Mar 01 2016 00:46
DOES ANYONE KNOW HOW TO SET THE ZOOM ON THE HTML EXCERSISE??? THE SECTION IS SIZE YOUR IMAGES......
Tabi
@mrpassiontea
Mar 01 2016 00:47
@Key-Banger I think that's a temporary fix if I were to use gradients a lot of trouble would occur :P
Dustin
@Key-Banger
Mar 01 2016 00:48
@AnyssaJ What browser?
Tabi
@mrpassiontea
Mar 01 2016 00:48
@nikhiltom Not sure then :\
AnyssaJ
@AnyssaJ
Mar 01 2016 00:48
@Key-Banger what do you mean??
Dustin
@Key-Banger
Mar 01 2016 00:50
@AnyssaJ Which browser are you using?
@mrpassiontea the white background on body is from bootstrap. Just overwriting that. How would it affect gradients?
AnyssaJ
@AnyssaJ
Mar 01 2016 00:51
@Key-Banger I guess its Chrome. Im using a samsung chromebook
Tabi
@mrpassiontea
Mar 01 2016 00:51
@Key-Banger Ah nevermind then haha :shipit guess it would work!
Thanks
Moisés Man
@moigithub
Mar 01 2016 00:53
@Key-Banger i used this..
https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&list=search&utf8=1&srsearch=jimi+hendrix&srwhat=text&sroffset=0
Dustin
@Key-Banger
Mar 01 2016 00:54
@AnyssaJ command +, command - or conrtrol + , control- should change your zoom.
@mrpassiontea no problem.
@moigithub thanks, I'll check that out.
CamperBot
@camperbot
Mar 01 2016 00:55
key-banger sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star: 690 | @moigithub | http://www.freecodecamp.com/moigithub
AnyssaJ
@AnyssaJ
Mar 01 2016 00:56
@Key-Banger I tried that already and it didnt work...... 😕
TEANTACLES
@TEANTACLES
Mar 01 2016 00:58
ok so
on the cat app lesson, it's showing me how to change background colors on specific elements, in this case dividers
but when i add div {background-color: gray;} to the style sheet at the top, and it works in the example, it's still not letting me submit like it's incorrect?
what am i doing wrong?
Dustin
@Key-Banger
Mar 01 2016 01:00
@AnyssaJ post your code so we can check that.
this specific one
AnyssaJ
@AnyssaJ
Mar 01 2016 01:01

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:02
@TEANTACLES could you put your code here?
TEANTACLES
@TEANTACLES
Mar 01 2016 01:02
All I did was add "div {background-color: gray;}" to the style sheet at the top
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:02
@TEANTACLES ctrl shift + M to
see how to format the code :D
TEANTACLES
@TEANTACLES
Mar 01 2016 01:02
it works in the example to the right, but not letting me submit
Dustin
@Key-Banger
Mar 01 2016 01:03
"div {background-color: gray;}" is not what it is asking for.
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:03
@TEANTACLES you need to put it as css
Create a class called gray-background with the background-color of gray. Assign this class to your div element.
TEANTACLES
@TEANTACLES
Mar 01 2016 01:03
I thought that's what I did?
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:04
like .gray-element{
TEANTACLES
@TEANTACLES
Mar 01 2016 01:04
I added that in the style commands with the others
huh.
but what about like when i assigned other commands?
like for h2
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:04
after you create the style element, you put it on the div as a class
Dustin
@Key-Banger
Mar 01 2016 01:04
you gave the html tag "div" a background. everytime you use div it would have a grey background.
TEANTACLES
@TEANTACLES
Mar 01 2016 01:04
h2 {
font-family: Lobster, Monospace;
}
ohhhh
i see
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:05
when you put the h2 you give all the h2 ellements this caracteristic
TEANTACLES
@TEANTACLES
Mar 01 2016 01:05
thanks
i thought that's what it wanted me to do
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:05
ah :D i accept a brownie
wiki brownie
CamperBot
@camperbot
Mar 01 2016 01:05

:point_right: brownie points [wiki]

The number beside your picture on Free Code Camp tells you how many Brownie Points you have.

A user profile picture next to a with Brownie Points score

There are three ways you can get Brownie Points:

  1. Complete challenges - you get one point per challenge you complete
  2. Post relevant links on Camper News - you get 1 point for posting a link, and another point for each upvote your link gets
  3. Help other campers in chat - each time you help another camper and they thank you (by typing "thanks @yourname"), you will get a point

Brownie Points help you look like the kind of person who codes a lot, shares relevant links, and helps people.

They also add to your Streak.
:pencil: read more about brownie points on the FCC Wiki

Dustin
@Key-Banger
Mar 01 2016 01:05
@AnyssaJ something like this instead of inline
.smaller-image {
    width: 100px;
  }
TEANTACLES
@TEANTACLES
Mar 01 2016 01:06
thanks @lucianohd
CamperBot
@camperbot
Mar 01 2016 01:06
teantacles sends brownie points to @lucianohd :sparkles: :thumbsup: :sparkles:
:star: 328 | @lucianohd | http://www.freecodecamp.com/lucianohd
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:06
:D
Dustin
@Key-Banger
Mar 01 2016 01:06
then
<img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat">
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:07
when you create a css class, you need to put it without the point as a class on the property that you like :D
Dustin
@Key-Banger
Mar 01 2016 01:08
@AnyssaJ did you get that?
AnyssaJ
@AnyssaJ
Mar 01 2016 01:08
@Key-Banger where do I insert that?? The smaller image one??
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:09
between the <style>
inside
Dustin
@Key-Banger
Mar 01 2016 01:09
@AnyssaJ in your css like @lucianohd just said.
harish438
@harish438
Mar 01 2016 01:09
i am not getting bootstrap grid to put elements side by side
AnyssaJ
@AnyssaJ
Mar 01 2016 01:10
@Key-Banger @lucianohd so up under the color??? I dont know what happened, it was already there....
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:12
@AnyssaJ just need to be inside of style, can be after or before the color class(red text right?)
AnyssaJ
@AnyssaJ
Mar 01 2016 01:12
@lucianohd yeah thats right
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:13
:D
AnyssaJ
@AnyssaJ
Mar 01 2016 01:14
@lucianohd THANKS SO MUCH! IT WORKED! AND @Key-Banger
CamperBot
@camperbot
Mar 01 2016 01:14
anyssaj sends brownie points to @lucianohd and @key-banger :sparkles: :thumbsup: :sparkles:
:star: 329 | @lucianohd | http://www.freecodecamp.com/lucianohd
:star: 319 | @key-banger | http://www.freecodecamp.com/key-banger
Jacob Schumer
@jacobschumer
Mar 01 2016 01:14
Can anyone tell me if this code makes sense to start an API call? I've tried it with getJSON, postJSON, get, post, and load but it never seems to do anything.
$(document).ready(function(){
  $("#trigger").on("click", function(){
  var api = "http://api.forismatic.com/api/1.0/";    $.post(api,{
    method: "getQuote",
    format: "JSON",
    lang: "en",},function(json, status){
      var html = "";
     if (status == "success") {
       alert("success");
     }
    else {
      alert("fail");
    }
    })
Dustin
@Key-Banger
Mar 01 2016 01:14
@AnyssaJ no problem
Luciano Hakime Dutra
@lucianohd
Mar 01 2016 01:15
np :D
Jared Abel
@jaredabel
Mar 01 2016 01:16
can anyone think why
"""
html ="<a href=" + pageUrl +">\
<div class='tit text-center'>" + myRes.title + "</div> <br><div class='ext'>" + myRes.extract + "</div><br></a><hr>";
"""
isnt giving a good link when
pageUrl = "https://en.wikipedia.org/wiki/List_of_Anaheim_Ducks_general_managers"
Jacob Schumer
@jacobschumer
Mar 01 2016 01:20
can you redo your tics?
Luigi Battaglioli
@lbattaglioli2000
Mar 01 2016 01:21
I'm trying to implement sidecar.gitter.im Gitter.im onto my website. I'm having a hard time because the nav bar covers the top it, anyway I can change this so the Gitter.im Sidecar window is above the navbar?
Jared Abel
@jaredabel
Mar 01 2016 01:22
@jacobschumer http://codepen.io/jaredabel00/pen/QyMOeJ?editors=1111 is the codepen, if you were referring to my bad code formatting
Jacob Schumer
@jacobschumer
Mar 01 2016 01:22
lol nvm you're way above me
or rather exactly 2 projects ahead of me
Jared Abel
@jaredabel
Mar 01 2016 01:24
well they switched the order all around
AnyssaJ
@AnyssaJ
Mar 01 2016 01:25
Omg now I need help with the Add Borders Around Your Elements.....ugh
Luigi Battaglioli
@lbattaglioli2000
Mar 01 2016 01:25
I'm trying to implement sidecar.gitter.im onto my website. I'm having a hard time because the nav bar covers the top it, anyway I can change this so the Gitter.im Sidecar window is above the navbar?
Jason Karlsven
@JayV30
Mar 01 2016 01:26
@jaredabel try
html ="<a href='" + pageUrl +"'>\
(putting single quote marks to wrap the href value)
David O'Connor
@davidmaoconnor
Mar 01 2016 01:29
Just a quick tip: you can search bootstrap documentation easily with this link http://bootstrap.algolia.com/
carlosgrn
@carlosgrn
Mar 01 2016 01:30
is someone in challegen 108? i dont get what I have to write above $(document).ready...
Dustin
@Key-Banger
Mar 01 2016 01:30
@jaredabel I don't know but your pageUrl in the console is coming through as a string. with "" I don't know how to fix.
Randy
@techtolentino
Mar 01 2016 01:31
@carlosgrn send the link
Jared Abel
@jaredabel
Mar 01 2016 01:32
@JayV30 @Key-Banger I tried both and still can't seem to get it to work
Randy
@techtolentino
Mar 01 2016 01:33
<script>
  $(document).ready(function() {

  });
</script>
so you want to create a script tag
carlosgrn
@carlosgrn
Mar 01 2016 01:34
oh ok thanks a lot @techtolentino
CamperBot
@camperbot
Mar 01 2016 01:34
carlosgrn sends brownie points to @techtolentino :sparkles: :thumbsup: :sparkles:
:star: 183 | @techtolentino | http://www.freecodecamp.com/techtolentino
Randy
@techtolentino
Mar 01 2016 01:34
then, the whole $(document).ready(function() { }); part is saying - when the document is ready (or has loaded), then run this script
carlosgrn
@carlosgrn
Mar 01 2016 01:35
yep i had that right i was just missing <script> </script>
Randy
@techtolentino
Mar 01 2016 01:35
perfect
carlosgrn
@carlosgrn
Mar 01 2016 01:35
thanks again
Randy
@techtolentino
Mar 01 2016 01:36
of course
Omar Richardson
@omie86
Mar 01 2016 01:37
@bitgrower yeah that didn't work
Randy
@techtolentino
Mar 01 2016 01:39
@omie86 what're you running into? just curious?
Omar Richardson
@omie86
Mar 01 2016 01:40
@techtolentino Just figured it out.. Thanks though
CamperBot
@camperbot
Mar 01 2016 01:40
omie86 sends brownie points to @techtolentino :sparkles: :thumbsup: :sparkles:
:star: 187 | @techtolentino | http://www.freecodecamp.com/techtolentino
Randy
@techtolentino
Mar 01 2016 01:40
no prob
Jason Karlsven
@JayV30
Mar 01 2016 02:02
@jaredabel Did you figure it out?
I think I got it for you
Jared Abel
@jaredabel
Mar 01 2016 02:04
@JayV30 Nope, been sitting here trying to play with concat to see if that will work
lol
Jason Karlsven
@JayV30
Mar 01 2016 02:06
Put it inside your callback. You have to because it asynchronous.
$.getJSON(myRes.pageUrl).done(function(urlData) {
              var stuff = urlData.query.pages;
              for (var things in stuff){
                fullUrl = stuff[things].fullurl;
                console.log(fullUrl);
                html ="<a target='_blank' href='"+fullUrl+"'><div class='tit text-center'>" + myRes.title + "</div><br><div class='ext'>" + myRes.extract + "</div><br></a><hr>";
              }
              $(".output").append(html);
              });
Also, you will need to add some code to clear out the previous results if you search more than once. Otherwise, it just keeps appending to the end.
Jared Abel
@jaredabel
Mar 01 2016 02:08
yes, i see it is kind of working
Jason Karlsven
@JayV30
Mar 01 2016 02:09
if you do this, it will remove everything from the previous result. I'd stick it before the for loop, maybe?
$(".output").empty();
kelvinshang
@kelvinshang
Mar 01 2016 02:09
Does anyone know how I can center buttons over an image?
B. Garber
@TheBGar
Mar 01 2016 02:12
@kelvinshang are you using bootstrap?
kelvinshang
@kelvinshang
Mar 01 2016 02:12
@TheBGar yeah
Martin Norberg
@Catgroove
Mar 01 2016 02:12

Why would one write:

function average(array) {
           function plus(a, b) { return a + b; }
           return array.reduce(plus) / array.length;
}

instead of just passing in an anonymous function directly into reduce?

JP
@johnpaulkiser
Mar 01 2016 02:12
I'm currently working on the "Tribute Page" project and am looking for a way to keep my bullet point text from running onto a second line. Any help? http://codepen.io/jpkiser/pen/mPyRpb?editors=1000
B. Garber
@TheBGar
Mar 01 2016 02:12
@kelvinshang you could use one of the card styles or adjust the margin on the button to accommodate your preference
@kelvinshang do you have code you can share?
Jared Abel
@jaredabel
Mar 01 2016 02:13
@JayV30 when i change the nesting, nothing else works besides the link
kelvinshang
@kelvinshang
Mar 01 2016 02:14
@TheBGar yes one second
B. Garber
@TheBGar
Mar 01 2016 02:15
@johnpaulkiser can you adjust your class width for your text which is currently set to 200px
camillestomer
@camillestomer
Mar 01 2016 02:16
Hi everyone.
Can anyone tell me where my error is?
<form action="/submit-cat-photo"> </form>
JP
@johnpaulkiser
Mar 01 2016 02:17
@TheBGar that's what i needed thank you!
CamperBot
@camperbot
Mar 01 2016 02:17
johnpaulkiser sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles:
B. Garber
@TheBGar
Mar 01 2016 02:17
@camillestomer Hello and welcome!
CamperBot
@camperbot
Mar 01 2016 02:17
:star: 312 | @thebgar | http://www.freecodecamp.com/thebgar
Jason Karlsven
@JayV30
Mar 01 2016 02:17
@jaredabel yeah, I'm not quite sure what's happening without really digging into your code. One thing that helped me with the ajax stuff was to break everything down and write separate functions to handle each aspect.
camillestomer
@camillestomer
Mar 01 2016 02:17
@TheBGar Hi
kelvinshang
@kelvinshang
Mar 01 2016 02:17

@TheBGar http://codepen.io/kelvinshang/full/VawRRw

if you resize the screen, the buttons move all over the place, how do I keep them from doing that?

B. Garber
@TheBGar
Mar 01 2016 02:17
@camillestomer is there any other code?
camillestomer
@camillestomer
Mar 01 2016 02:18
Instructions: Nest your text field in a form element. Add the action="/submit-cat-photo" attribute to this form element.
Jason Karlsven
@JayV30
Mar 01 2016 02:18
Here's my wiki search, I definitely see some similarities to yours: http://codepen.io/JayV30/pen/LGvOqQ
camillestomer
@camillestomer
Mar 01 2016 02:19
blob
@Humphreto Thank you! Done.
CamperBot
@camperbot
Mar 01 2016 02:20
camillestomer sends brownie points to @humphreto :sparkles: :thumbsup: :sparkles:
Jared Abel
@jaredabel
Mar 01 2016 02:20
@JayV30 Yeah if i move my log fullurl around i can see its not holding outside of the json call
CamperBot
@camperbot
Mar 01 2016 02:20
:star: 141 | @humphreto | http://www.freecodecamp.com/humphreto
B. Garber
@TheBGar
Mar 01 2016 02:20
@kelvinshang my guess is the issue is with setting the position of them to absolute
Jason Karlsven
@JayV30
Mar 01 2016 02:20
@jaredabel I call the API, on success push the results to an array, then pass that array to a handler function that takes care of the display of those results.
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 02:22
how do you nest an existing image element within an a element
cannelflow
@cannelflow
Mar 01 2016 02:24
<a><img></a> @RoderickLBolar
B. Garber
@TheBGar
Mar 01 2016 02:24
@RoderickLBolar what have you tried thus far?
@cannelflow lol you just give him the answer :laughing:
Randy
@techtolentino
Mar 01 2016 02:24
Hahah guilty of doing that sometimes
cannelflow
@cannelflow
Mar 01 2016 02:25
@TheBGar :P
Jason Karlsven
@JayV30
Mar 01 2016 02:25

@jaredabel I'm digging into your code and one thing I noticed you are doing is defining your variable twice. You've declared all your variables at the top, and then for example:

$("#search").on('submit', function(e) {
    e.preventDefault();
    var search = $("#searchValue").val();
    var api = url.concat(search, "&callback=?");

search and api were already defined, so you don't need the var. I notice a bit of this throughout your code.

Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 02:25
oh thanks I really overthought it @TheBGar !
CamperBot
@camperbot
Mar 01 2016 02:25
rodericklbolar sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles:
:star: 313 | @thebgar | http://www.freecodecamp.com/thebgar
B. Garber
@TheBGar
Mar 01 2016 02:25
@RoderickLBolar :thumbsup:
kelvinshang
@kelvinshang
Mar 01 2016 02:26
@TheBGar would setting them to relative work?
B. Garber
@TheBGar
Mar 01 2016 02:27

@kelvinshang first, make sure the elements you want are coded inside that main div....then play with positions. My guess it they aren't coded within the elements. For example, they need to be:
```

<div>

kelvinshang
@kelvinshang
Mar 01 2016 02:27
@TheBGar i can get them centered but when i resize the window, the buttons start moving around. Could it be a problem with the column sizes?
B. Garber
@TheBGar
Mar 01 2016 02:28

@kelvinshang whoops, here it is...

<div>
<h1>Title</h1>
<img>
<button></button>
<div>

If h1, img, and button are outside of the divs, they will stack as on your codepen pen

@kelvinshang cols look fine
Thomas Mullen
@t-mullen
Mar 01 2016 02:28
A tree search of >500 depth (I know, I know) has froze my code camp. Reload and restarting hasn't helped. Any way to stop it from running on load?
Brian
@sludge256
Mar 01 2016 02:29
wiki auto
CamperBot
@camperbot
Mar 01 2016 02:29

:point_right: disable code auto run [wiki]

By default, the Free Code Camp site automatically loads and runs your last recorded solution. If you have accidentally created an infinite loop or other irrecoverable error or simply don't trust the code, you can disable code auto-run by putting the following in your URL:
run=disabled

Example:

URL: http://www.freecodecamp.com/challenges/Algorithm-meet-Algorithm#?solution=function%20meetBonfire(argument)

No-Run URL: http://www.freecodecamp.com/challenges/Algorithm-meet-Algorithm#?run=disabled&solution=function%20meetBonfire(argument)

:pencil: read more about disable code auto run on the FCC Wiki

Thomas Mullen
@t-mullen
Mar 01 2016 02:29
@camperbot Thanks
CamperBot
@camperbot
Mar 01 2016 02:29
rationalcoding sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 1289 | @camperbot | http://www.freecodecamp.com/camperbot
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 02:29
hi guys! Does anyone knows about how it works the code editor from the exercises? :smile:
Thomas Mullen
@t-mullen
Mar 01 2016 02:29
@sludge256 The credit is due to you!
Jared Abel
@jaredabel
Mar 01 2016 02:33
@JayV30 yeah i kind of suck sometimes
Jason Karlsven
@JayV30
Mar 01 2016 02:33
@jaredabel So Do I! It's bug hunting.... and every time you learn more.
Jared Abel
@jaredabel
Mar 01 2016 02:33
@JayV30 although update, the links are all just the title with underscores. No real need to mes with using the pageId to find the full Url
I just used this
'''
var pre = "https://en.wikipedia.org/wiki/"
var link = myRes.title.replace(" ", "_");
var fullUrl = pre.concat(link);
console.log(fullUrl);
'''
CamperBot
@camperbot
Mar 01 2016 02:33
:bulb: to format code use backticks! ``` more info
kelvinshang
@kelvinshang
Mar 01 2016 02:34
@TheBGar they are within the div elements though
Jared Abel
@jaredabel
Mar 01 2016 02:34
it's ugly, but it works
Jason Karlsven
@JayV30
Mar 01 2016 02:35
@jaredabel yeah, I put a bunch of console.logs in there and I can kinda see what the problems are. Basically, AJAX is a pain in the butt. Really.
Jared Abel
@jaredabel
Mar 01 2016 02:36
yeah, the second api call was working, but the api nest inside another api nest was making it hard to keep track of
I just realized i was losing it somewhere
B. Garber
@TheBGar
Mar 01 2016 02:36
@kelvinshang did you try resetting the postitions to default for the elements in question?
Jason Karlsven
@JayV30
Mar 01 2016 02:37
You have to do everything inside your callbacks... so maybe store all your myRes in an array. Then send them all to a function that loops through and calls the api again and also sets the values. Breaking out that second api call to make it a little easier to deal with.
I dunno... but you are clearly on the right track. It's frustrating, but you will really get it tomorrow! I can't tell you how many times I wrote something that just wasn't working, and then the next day I just started over and it all clicked right away! Good luck, @jaredabel !
Jared Abel
@jaredabel
Mar 01 2016 02:40
@JayV30 http://codepen.io/jaredabel00/pen/QyMOeJ?editors=1111 is working pretty swell now
atleast the basic javascript part of it. Design is still lacking as always
@JayV30 Thanks for all the help
CamperBot
@camperbot
Mar 01 2016 02:40
jaredabel sends brownie points to @jayv30 :sparkles: :thumbsup: :sparkles:
:star: 373 | @jayv30 | http://www.freecodecamp.com/jayv30
Jason Karlsven
@JayV30
Mar 01 2016 02:41
Dude, yeah! nice!
Jared Abel
@jaredabel
Mar 01 2016 02:41
after i realized the url was just the title with underscores
i just got rid of the whole other api call
Jason Karlsven
@JayV30
Mar 01 2016 02:41
Make sure you clear out the results though on another search! It's just appending the results to the bottom.
Yeah I was wondering where that api call went
LOL
Jared Abel
@jaredabel
Mar 01 2016 02:42
its just weird, since googling to find the URL of a wiki using the page id tells you to run another api call
since the initial api call doesnt have the url
Jason Karlsven
@JayV30
Mar 01 2016 02:43
Well, eventually we will both need to get better at the nesting those api calls for sure
Jared Abel
@jaredabel
Mar 01 2016 02:43
It doesn't have to be perfect, it just has to be right
Jason Karlsven
@JayV30
Mar 01 2016 02:43
:)
following you on codepen! Keep in touch bud! Gotta go. Thanks @jaredabel
CamperBot
@camperbot
Mar 01 2016 02:44
jayv30 sends brownie points to @jaredabel :sparkles: :thumbsup: :sparkles:
:star: 324 | @jaredabel | http://www.freecodecamp.com/jaredabel
camillestomer
@camillestomer
Mar 01 2016 02:48
How do I nest the input inside a form?
blob
B. Garber
@TheBGar
Mar 01 2016 02:49
@camillestomer can you post your code using markdown? check out this handy guide :point_down:
explain format
CamperBot
@camperbot
Mar 01 2016 02:49

:point_right: code formatting [wiki]

Multi line Code

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

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

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

Single line Code

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

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

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

B. Garber
@TheBGar
Mar 01 2016 02:50
@camillestomer make sure you are looking at the example in the directions. They check out where you have "action=..." written in your code
kelvinshang
@kelvinshang
Mar 01 2016 02:50
@camillestomer you put it into the form
camillestomer
@camillestomer
Mar 01 2016 02:53
Trying again. Thanks @TheBGar @kelvinshang
CamperBot
@camperbot
Mar 01 2016 02:53
camillestomer sends brownie points to @thebgar and @kelvinshang :sparkles: :thumbsup: :sparkles:
:star: 315 | @thebgar | http://www.freecodecamp.com/thebgar
:star: 131 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
B. Garber
@TheBGar
Mar 01 2016 02:53
@camillestomer :thumbsup:
Clifton Choiniere
@crcnum4
Mar 01 2016 02:59
just want to thank everyone here that helped me with my weather app I finally completed it!
camillestomer
@camillestomer
Mar 01 2016 03:00
<form 

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

      action="/submit-cat-photo">

</form>
blob
@TheBGar am I close to being on the right track?
kelvinshang
@kelvinshang
Mar 01 2016 03:04
@camillestomer input and form are separate elements
@camillestomer the input should be placed within the form like <form><input></form>
camillestomer
@camillestomer
Mar 01 2016 03:05
@kelvinshang Oohhhhhhhhhhhh
Will try that now. Thanks!!
<form><input type="text" placeholder="cat photo URL"></form
  <form action="submit-cat-photo"></form>
kelvinshang
@kelvinshang
Mar 01 2016 03:08
the input is correct now, but you should put that into the <form action="submit-cat-photo"></form>
@camillestomer ^^
camillestomer
@camillestomer
Mar 01 2016 03:09
ok... thank you :worried:
Kevin Casas
@OldSchoolCaddie
Mar 01 2016 03:14
HELP
CamperBot
@camperbot
Mar 01 2016 03:14

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

Basic Commands:

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

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

camillestomer
@camillestomer
Mar 01 2016 03:15
blob
```html
```html
blob
Matthew Brady
@bradym80
Mar 01 2016 03:16
find paste
CamperBot
@camperbot
Mar 01 2016 03:16
find paste
nothing found
camillestomer
@camillestomer
Mar 01 2016 03:16
I'm so lost @kelvinshang
```html <form input type="text" placeholder="cat photo URL" action="/submit-cat-photo"></form>
Elifaz Filho
@Elifaz
Mar 01 2016 03:17

really excited with coding today, made an exercise this big

function drop(arr, func) {
    // Drop them elements.
    var holder = [],
        currentArr = arr;

    arr.filter(function(item) {
            if (func(item)) {
                holder.push(currentArr.slice(arr.indexOf(item)));
            } else if (!func(item)) {
                return [];
            }
        })

    if (holder.length < 1) {
         holder = [];
         console.log(holder)
         return holder
    } else {
        console.log(holder.shift());
        return holder.shift();
    }
}

// drop([1, 2, 3], function(n) {return n < 3; });

become this small:

function drop(arr, func) {
    // Drop them elements.
    var holder = [],
        currentArr = arr;

    arr.filter((item) => func(item) ? 
    holder.push(currentArr.slice(arr.indexOf(item))) : 
    []);

  return holder.shift() || [];

}

It looks fancy but I’m not sure if it’s worth the huge stress that it takes to read the second over the first which is bigger but much more understandable, I wonder if someone with more experience can say if I should keep with the second approach

Demond Bivins
@dbivins
Mar 01 2016 03:17
when are you guys puuting up the sass , react and d3 courses
Matthew Brady
@bradym80
Mar 01 2016 03:17
This message was deleted
Demond Bivins
@dbivins
Mar 01 2016 03:18
when are you guys puuting up the sass , react and d3 courses for free code camp
kelvinshang
@kelvinshang
Mar 01 2016 03:18
@camillestomer haha no don't put the input element into the form element, format it like this <form action="submit-cat-photo"><input type="text" placeholder="cat photo URL"></form>
Matthew Brady
@bradym80
Mar 01 2016 03:19
Hello, why am I getting an error with the splice method.
function where(arr, num) {
  arr.sort();
  var eArr = arr.entries();
  for(var i = 0; i < arr.length; i++){
      if (eArr.next().value[1]<num) {
        arr.splice(i,0,num);
      }
  }
  // Find my place in this sorted array.
}
where([10, 20, 30, 40, 50], 35);
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 03:20
How do you nest your text input element within a form element
Brandon Lee
@brandonlee781
Mar 01 2016 03:22
Does anyone know of a good image hosting site to use with Codepen?
kelvinshang
@kelvinshang
Mar 01 2016 03:23
@RoderickLBolar <form><input></form>
camillestomer
@camillestomer
Mar 01 2016 03:23
@kelvinshang so ashamed lol will try
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 03:24
thanks @kelvinshang
CamperBot
@camperbot
Mar 01 2016 03:24
rodericklbolar sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:star: 132 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
Collin
@collinferry
Mar 01 2016 03:26
@brandonlee781 I had lots of trouble with that and ended up learning how to use a paid host
@brandonlee781 Imgur fails regularly, Dropbox and Google both dislike third-parties loading files
Brandon Lee
@brandonlee781
Mar 01 2016 03:26
@collinferry That sucks. But thanks for the info.
CamperBot
@camperbot
Mar 01 2016 03:26
brandonlee781 sends brownie points to @collinferry :sparkles: :thumbsup: :sparkles:
:star: 338 | @collinferry | http://www.freecodecamp.com/collinferry
camillestomer
@camillestomer
Mar 01 2016 03:29
@kelvinshang it didn't work :worried:
kelvinshang
@kelvinshang
Mar 01 2016 03:29
@brandonlee781 you should use images.google.com to find the same image and use a different host, imgur doesnt work for some reason
@camillestomer show me your code?
Brandon Lee
@brandonlee781
Mar 01 2016 03:30
@kelvinshang I'm going to try google. Imgur blocks all traffic to codepen apparently. This would be really simple, except I'm trying to use a picture of myself.
camillestomer
@camillestomer
Mar 01 2016 03:30
<form action="submit-cat-photo"><input type="text" placeholder="cat photo URL"></form>
Brandon Lee
@brandonlee781
Mar 01 2016 03:30
@kelvinshang Thanks though
CamperBot
@camperbot
Mar 01 2016 03:30
brandonlee781 sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:star: 133 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
kelvinshang
@kelvinshang
Mar 01 2016 03:32
@camillestomer you forgot the / in front of submit, it should be <form action="/submit-cat-photo">
camillestomer
@camillestomer
Mar 01 2016 03:32
@kelvinshang thank you so much! Following on github!!!
CamperBot
@camperbot
Mar 01 2016 03:32
camillestomer sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:warning: camillestomer already gave kelvinshang points
kelvinshang
@kelvinshang
Mar 01 2016 03:33
@brandonlee781 try uploading it to facebook, then right click the image, select copy image address, go to bit.ly, shorten the link and put it into codepin
@camillestomer no problem! :)
camillestomer
@camillestomer
Mar 01 2016 03:33
@kelvinshang :clap: :clap:
Boris
@boris-in-london
Mar 01 2016 03:34
@bradym80 you've got a few things breaking your code there... there is an infinite for loop, because arr is mutable, so it keeps getting larger. so the condition i < arr.length is never met.
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 03:35
I'm stuck it says that my submit button should only have the text "Submit"
Matthew Brady
@bradym80
Mar 01 2016 03:35
@boris-in-london excellent, thanks!
CamperBot
@camperbot
Mar 01 2016 03:35
bradym80 sends brownie points to @boris-in-london :sparkles: :thumbsup: :sparkles:
:star: 306 | @boris-in-london | http://www.freecodecamp.com/boris-in-london
Boris
@boris-in-london
Mar 01 2016 03:35
there is also a bit of anti- pattern, there are easier methods to iterate over an array.
Elifaz Filho
@Elifaz
Mar 01 2016 03:36
@bradym80 .filter .map .reduce depending on what you want.
kelvinshang
@kelvinshang
Mar 01 2016 03:36
@RoderickLBolar show me the code?
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 03:37
<form action="/submit-cat-photo">
<input type="text" placeholder="cat photo URL"><button type="submit"></button>
</form>
<button type="submit">this button submits the form</button>
kelvinshang
@kelvinshang
Mar 01 2016 03:38
<button type="submit">Submit</button>
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 03:39
thanks again @kelvinshang
CamperBot
@camperbot
Mar 01 2016 03:39
rodericklbolar sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:warning: rodericklbolar already gave kelvinshang points
ahmed elkenawy
@elkenawy0
Mar 01 2016 03:40
hello guys i am new in frecodecamp
that is my first project
feedback me plz/
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 03:44
Your page should have two radio button elements.
Give your radio buttons the name attribute of indoor-outdoor.
Each of your two radio button elements should be nested in its own label element.
Make sure each of your label elements has a closing tag.
One of your radio buttons should have the label indoor.
One of your radio buttons should have the label outdoor.
How do I do this
apklip
@apklip
Mar 01 2016 03:49

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

// Only change code below this line
function update(id, prop, value) {
if(value !== '' && collection[id][prop] !== 'tracks') {
collection[id][prop] = value;
} else if (collection[id][prop] === 'tracks' && value !== '') {
collection[id][prop].push(value);
} else {
delete collection[id][prop];
}

return collection;
}

// Alter values below to test your code
update(1245, "tracks", "Addicted to Love")

returns string instead of array
when value is pushed
Susan Harrison
@stharrison1
Mar 01 2016 03:49
stuck on "Label Bootstrap Wells"
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 03:50
I'm stuck on radio buttons!
DJ
@qualitymanifest
Mar 01 2016 03:51
@RoderickLBolar paste your code
@stharrison1 you too, paste your code
Brian
@sludge256
Mar 01 2016 03:51
@qualitymanifest thanks :+1:
CamperBot
@camperbot
Mar 01 2016 03:51
sludge256 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1028 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 03:51
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
Michael Poutre
@M1kep
Mar 01 2016 03:51
Pastie codey!
DJ
@qualitymanifest
Mar 01 2016 03:52
@RoderickLBolar is that your only radio button?
Susan Harrison
@stharrison1
Mar 01 2016 03:52
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <h4><div class="col-xs-6">#left-well

      <div class="well" id="left-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
     </h4>
      </div>

    </div>
  <h4><div class="col-xs-6">#right-well

      <div class="well" id="right-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
     </h4>
    </div>

  </div>
</div>
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 03:53
yeah @qualitymanifest
DJ
@qualitymanifest
Mar 01 2016 03:53
@RoderickLBolar re-read the instructions: Add a pair of radio buttons to your form. One should have the option of indoor and the other should have the option of outdoor.
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 03:54
okay thanks @qualitymanifest
CamperBot
@camperbot
Mar 01 2016 03:54
rodericklbolar sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1029 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
kelvinshang
@kelvinshang
Mar 01 2016 03:55
@stharrison1 your div class #right-well doesnt have an end >
DJ
@qualitymanifest
Mar 01 2016 03:56

@stharrison1 you're nesting the entire divs within your h4s, you shouldn't do that. from the instructions:

Above your left-well, inside its col-xs-6 div element, add a h4 element with the text #left-well.

@stharrison1 for that example they mean put the h4 element above here: <div class="well" id="left-well">
Jack Brierty
@jbrierty
Mar 01 2016 03:57
Hi I'm stuck on the "Change the Font Size of an Element" tutorial . I'm not sure I understand the 4th test "Do not add a class attribute to the second p element, without removing it from the first one."
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 03:58
<form action="/submit-cat-photo"><label><input type="radio" name="indoor-outdoor"> Indoor-Outdoor</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
I need 2 radio elements @qualitymanifest
DJ
@qualitymanifest
Mar 01 2016 03:59
@RoderickLBolar yeah, one that has the option of indoor, and one that has the option of outdoor, which would be 2. you only have 1, with an option of "indoor-outdoor"
Susan Harrison
@stharrison1
Mar 01 2016 03:59
@kelvinshang Thanks!
CamperBot
@camperbot
Mar 01 2016 03:59
stharrison1 sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:star: 134 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
Susan Harrison
@stharrison1
Mar 01 2016 03:59
@qualitymanifest Thanks!
CamperBot
@camperbot
Mar 01 2016 03:59
stharrison1 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1030 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Susan Harrison
@stharrison1
Mar 01 2016 03:59
@qualitymanifest Thanks!
CamperBot
@camperbot
Mar 01 2016 03:59
stharrison1 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:warning: stharrison1 already gave qualitymanifest points
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 04:01
oh @qualitymanifest
camillestomer
@camillestomer
Mar 01 2016 04:06
help
CamperBot
@camperbot
Mar 01 2016 04:06

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

Basic Commands:

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

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 04:08
how do you check a checkbox on your form should be checked by default
you put checked at the end of the opening element tag
Roderick L. Bolar
@RoderickLBolar
Mar 01 2016 04:10
thanks @qualitymanifest
CamperBot
@camperbot
Mar 01 2016 04:10
rodericklbolar sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:warning: rodericklbolar already gave qualitymanifest points
wemode
@wemode
Mar 01 2016 04:15
This message was deleted
This message was deleted
This message was deleted
Aseel
@aseelsky
Mar 01 2016 04:20
Hello Campers, I'm working on the Weather App. I have json url and I’m trying to print the keys and their values but I wasn’t able to access all the values.
Could you please give me some help here?
$(document).ready(function() {      
    $.getJSON("http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=44db6a862fba0b067b1930da0d769e98", function(json) {
        $.each(json, function(key, val) {
            $("body").append(key, ": ", val, " ");
        });
    });
});
V Bhargav Chowdary
@bhargav4
Mar 01 2016 04:23
@aseelsky open the url in your browser itself. If you are looking to view the json
Aseel
@aseelsky
Mar 01 2016 04:27
@bhargav4 I know that, but I’m trying to get access to the keys/values so I can use them in the weather app.
Moisés Man
@moigithub
Mar 01 2016 04:28
before $.each add console.log(json) n check if ur data is there...
also check on console tab.. if u get any error...
devonwilson1
@devonwilson1
Mar 01 2016 04:28
someone tell me why the link at the bottom does not work?

<body>


<h1 class="text-center">
Ansel Adams
</h1>

<img class="displayed" src="http://www.dailyartfixx.com/wp-content/uploads/2011/02/rose-and-driftwood-Ansel-Adams.jpg">

<h2 class="text-center">
Taught me Photography
</h2>

<img class"displayed " src="http://anseladamsamerica.com/images/anseladams.jpg">

<div id="footer2">
<div class="col-xs-1">
<li>1902 February 20 Ansel is born in San Fransisco</li>
</div>
<div class="col-xs-1">
<li>1916 Ansel acquires his first "Kodak" camera</li>
</div>
<div class="col-xs-1">
<li>1920 Ansel becomes a painist</li>
</div>
<div class="col-xs-1">
<li>1928 Ansel marries Virginia Best</li>
</div>
<div class="col-xs-1">
<li>1931 Smithsonian Institue recognizes 60 peice collection of Ansel photographs
</div>
<div class="col-xs-1">
<li>1933 Ansel opens his San Fransisco based gallery</li>
</div>
</div>

<div id="footer2">
<div class="col-xs-1">
<li>1941 Ansel develops the "zone system"</li>
</div>
<div class="col-xs-1">
<li>1949 Ansel becomes a polaroid consultant</li>
</div>
<div class="col-xs-1">
<li>1963 Ansel recieves the John Muir award</li>
</div>
<div class="col-xs-1">
<li>1965 Ansel is appointed to president Johnson's environmental task force</li>
</div>
<div class="col-xs-1">
<li>1980 Ansel recieves the presidential medal of freedom</li>
</div>
<div class="col-xs-1">
<li> 1984 Ansel dies at the age of 82</li>
</div>
</div>
</body>

<h3>
Ansel Adams has absolutely mastered photography not only the actual taking of a picture but what is known as "workflow". The processing of photo's was as important to Ansel as the exposure was.
</h3>

<p>click here for <a href="https://www.google.com/#q=ansel+adams">Ansel</a></p>

here is my css stuff:

h1 {
color: grey;
font-size: 75px;
font-family: san-serif;
}

h2 {
color: black;
font-family: sans-serif;
}
h3 {
position: relative;
top: 100px;
color: grey;
}

footer1 {

text-align: left;
color: grey;
}

footer2 {

text-align: right;
top: 25px;
position: relative;
}

img.displayed {
border-radius: 100%;
display: block;
margin-left: auto;
margin-right: auto
}

h3{
text-align: center;
right: 25px;
}

body {
text-align: center;
}

someone please tell me how to make the link work
DJ
@qualitymanifest
Mar 01 2016 04:30
@devonwilson1 are you doing this on codepen?
if so, put target="_blank" in the opening <a> tag.
devonwilson1
@devonwilson1
Mar 01 2016 04:31
yes thank
why do i have to do that by the way
DJ
@qualitymanifest
Mar 01 2016 04:31
@devonwilson1 okay so in the future just paste the link to your pen, instead of a huge block of code. it's shorter, and that way people can test it out
suffering
@suffering
Mar 01 2016 04:32
if you don’t set the property ‘target’ of a tareg
Gwendolyn Faraday
@gwenf
Mar 01 2016 04:32
@devonwilson1 it just means the link will open in a new window
devonwilson1
@devonwilson1
Mar 01 2016 04:32
I'm sorry what? i didn't work
oh i see well for some reason i inserted but did not work
Gwendolyn Faraday
@gwenf
Mar 01 2016 04:32
@devonwilson1 can you post a link to your codepen
it's really hard to read in the feed here
suffering
@suffering
Mar 01 2016 04:33
<a href="https://www.google.com/#q=ansel+adams” target=“_blank">Ansel</a>
Aseel
@aseelsky
Mar 01 2016 04:33
@moigithub yes I can display them in the console. As I said I’m able to access some of the keys and their values but not the keys with list or object as a value!
V Bhargav Chowdary
@bhargav4
Mar 01 2016 04:35
@aseelsky use this
$(document).ready(function() {
  $.getJSON("http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=44db6a862fba0b067b1930da0d769e98", function(json) {
    var x = JSON.stringify(json);
    $("body").append(x);

  });
});
Moisés Man
@moigithub
Mar 01 2016 04:36
@aseelsky u only iterating the "parent" key.. if u wanna "access" each "childs" u need to do a specific iteration on each too....
suffering
@suffering
Mar 01 2016 04:36
@devonwilson1 , you should wrap your .col-xs-* to a div with class .row or .fluid-row
DJ
@qualitymanifest
Mar 01 2016 04:37
@devonwilson1 get rid of position: relative on your h3
that will fix it, so you can click your link.
devonwilson1
@devonwilson1
Mar 01 2016 04:38
interesting why does that effect things/
i did that trying to figure out how to make my text lower and what not
it worked how do i make my text move lower and and center it and such..?
thanks by the way
Gwendolyn Faraday
@gwenf
Mar 01 2016 04:42
@devonwilson1 the position relative doesn't directly fix it
you have something over it, if you move your link or other elements on the page the link works fine too
and just moved the link down
camillestomer
@camillestomer
Mar 01 2016 04:43
What am I doing wrong?
blob
<div class="baclground-color:gray;">

  <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>
</div>
Son Tran
@sontranphuoc
Mar 01 2016 04:44
Hi Campers. I am new to FreeCodeCamp
Gwendolyn Faraday
@gwenf
Mar 01 2016 04:44
you spelled background wrong
@camillestomer
camillestomer
@camillestomer
Mar 01 2016 04:44
@gwenf thank you!!
CamperBot
@camperbot
Mar 01 2016 04:44
camillestomer sends brownie points to @gwenf :sparkles: :thumbsup: :sparkles:
:star: 661 | @gwenf | http://www.freecodecamp.com/gwenf
huy-tran
@huy-tran
Mar 01 2016 04:45
@sontranphuoc Welcome onboard !!! Happy coding !
camillestomer
@camillestomer
Mar 01 2016 04:45
@gwenf still not working
Gwendolyn Faraday
@gwenf
Mar 01 2016 04:45
you're welcome. we all do that
camillestomer
@camillestomer
Mar 01 2016 04:45
<div class="background-color:gray;">

  <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>
</div>
Gwendolyn Faraday
@gwenf
Mar 01 2016 04:45
you should put style='background-color: gray;'
camillestomer
@camillestomer
Mar 01 2016 04:46
I had that.. it didn't go through
devonwilson1
@devonwilson1
Mar 01 2016 04:46
good idea gwen! and ill try that
Gwendolyn Faraday
@gwenf
Mar 01 2016 04:46
do you have a css class named background color? is that what the test wants
camillestomer
@camillestomer
Mar 01 2016 04:47
Instructions: Create a class called gray-background with the background-color of gray. Assign this class to your div element.
Gwendolyn Faraday
@gwenf
Mar 01 2016 04:48
then you should make your class called gray-background and reference that
in the first pic you posted you had a class called background-color
camillestomer
@camillestomer
Mar 01 2016 04:48
still do
Aseel
@aseelsky
Mar 01 2016 04:49
@bhargav4 stringify will display the whole json as a string, that wouldn’t let me access them individually.
@moigithub so I should use .each() to iterate throught the child as well, is that right?
Gwendolyn Faraday
@gwenf
Mar 01 2016 04:50
there is a link of what the code should look like to change the background to gray
camillestomer
@camillestomer
Mar 01 2016 04:52
@gwenf it worked!! thanks a lot!!!!
CamperBot
@camperbot
Mar 01 2016 04:52
camillestomer sends brownie points to @gwenf :sparkles: :thumbsup: :sparkles:
:warning: camillestomer already gave gwenf points
Gwendolyn Faraday
@gwenf
Mar 01 2016 04:52
awesome
kevharvell
@kevharvell
Mar 01 2016 04:55
I have a general question regarding functions: is it better practice to define a variable and set it equal to your parameter or just manipulate the given parameter?
Kevin
@phobdabam
Mar 01 2016 05:00
I'm having trouble with the font size challenge. I don't know what it wants me to do
I can't clear the "Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%."
Susan Harrison
@stharrison1
Mar 01 2016 05:01
Target the same element with multiple jQuery Selectors
Only add one class with each of your three selectors.???
<script>
  $(document).ready(function() {
  $("button").addClass("animated")
  $(".btn").addClass("animated, shake")
  $("#target1").addClass("animated, btn-primary")
  });
</script>
Hernán
@hernanmanzitti
Mar 01 2016 05:01
Hi, im having a problem with the navbar while its collapsed.. the <li> inside the <ul> are displayed horizontally and not vertically
Randy
@techtolentino
Mar 01 2016 05:01
You can do that with css
@phobdabam nust give the p a font-size
Basically set up your <style> tags
@stharrison1 take out the commas
That should help
Kevin
@phobdabam
Mar 01 2016 05:03
So I've got this:
.p{
font-size: 16px;
}
DeMarcus Sparks
@dsparks2193
Mar 01 2016 05:03
hey guys how do i save where i left off??
Randy
@techtolentino
Mar 01 2016 05:03
@sontranphuoc also, don't forget your semi-colons
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:03
@hernanmanzitti can you link your code somehow
Kevin
@phobdabam
Mar 01 2016 05:04
cause it says i need an entry for p elements... is that what they meant?
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:04
@dsparks2193 i think fcc auto saves your challenge progress
Hernán
@hernanmanzitti
Mar 01 2016 05:04
@tvotyakov thanks!
CamperBot
@camperbot
Mar 01 2016 05:04
hernanmanzitti sends brownie points to @tvotyakov :sparkles: :thumbsup: :sparkles:
:star: 336 | @tvotyakov | http://www.freecodecamp.com/tvotyakov
kevharvell
@kevharvell
Mar 01 2016 05:04
@phobdabam take out the . in front of p
Randy
@techtolentino
Mar 01 2016 05:05
Sorry @sontranphuoc , i meant @stharrison1
Kevin
@phobdabam
Mar 01 2016 05:05
Oh cool that worked, thanks!
...why didn't I need the . ?
kelvinshang
@kelvinshang
Mar 01 2016 05:05
@phobdabam you only put . for classes, p is an element
kevharvell
@kevharvell
Mar 01 2016 05:05
it's not a class
Kevin
@phobdabam
Mar 01 2016 05:05
Ok
Hernán
@hernanmanzitti
Mar 01 2016 05:05
@gwenf <nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
<div class="container topnav">
<div class="navbar-header">
<a href="#" class="navbar-brand">Dr. Julio Manzitti</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span><span class='icon-bar'></span><span class='icon-bar'></span><span class='icon-bar'></span>
</button>
</div> <!-- navbar header -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav nav-tabs justified navbar-right">
        <li role="presentation" class="active"><a href="#">Home</a></li>
        <li role="presentation"><a href="#">Quienes Somos</a></li>
        <li role="presentation"><a href="#">Prestaciones</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">Contacto<b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="#">Teléfono</li></a>
            <li><a href="#">Dirección</li></a>
          </ul>
        </li>
      </ul>
    </div>  <!-- navbar collapse -->
  </div> <!-- container  -->
devonwilson1
@devonwilson1
Mar 01 2016 05:05
can someone help me i am on "a pen" and i am trying to figure out how to move some text and stuff around and change some spacing for example i have an h element and the text is to close to pictures and i text that is all the way to the right and i want it to be centered can anyone help
Kevin
@phobdabam
Mar 01 2016 05:05
now how do i give points lol
kevharvell
@kevharvell
Mar 01 2016 05:06
explain brownie
CamperBot
@camperbot
Mar 01 2016 05:06

:point_right: brownie points [wiki]

The number beside your picture on Free Code Camp tells you how many Brownie Points you have.

A user profile picture next to a with Brownie Points score

There are three ways you can get Brownie Points:

  1. Complete challenges - you get one point per challenge you complete
  2. Post relevant links on Camper News - you get 1 point for posting a link, and another point for each upvote your link gets
  3. Help other campers in chat - each time you help another camper and they thank you (by typing "thanks @yourname"), you will get a point

Brownie Points help you look like the kind of person who codes a lot, shares relevant links, and helps people.

They also add to your Streak.
:pencil: read more about brownie points on the FCC Wiki

Kevin
@phobdabam
Mar 01 2016 05:06
@kevharvell Thanks!
CamperBot
@camperbot
Mar 01 2016 05:06
phobdabam sends brownie points to @kevharvell :sparkles: :thumbsup: :sparkles:
:star: 255 | @kevharvell | http://www.freecodecamp.com/kevharvell
kevharvell
@kevharvell
Mar 01 2016 05:07
no problem, happy coding!
Kevin
@phobdabam
Mar 01 2016 05:07
@kelvinshang Thanks!
CamperBot
@camperbot
Mar 01 2016 05:07
phobdabam sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:star: 135 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
Susan Harrison
@stharrison1
Mar 01 2016 05:07
@techtolentino still not working
devonwilson1
@devonwilson1
Mar 01 2016 05:08
@camperbot thanks
CamperBot
@camperbot
Mar 01 2016 05:08
devonwilson1 sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
kelvinshang
@kelvinshang
Mar 01 2016 05:08
@stharrison1 remove the animated class from .btn and target1
CamperBot
@camperbot
Mar 01 2016 05:08
:star: 1292 | @camperbot | http://www.freecodecamp.com/camperbot
devonwilson1
@devonwilson1
Mar 01 2016 05:08
please help me with moving my h element text around please
@camperbot
Susan Harrison
@stharrison1
Mar 01 2016 05:09
@kelvinshang Thanks!
CamperBot
@camperbot
Mar 01 2016 05:09
stharrison1 sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:star: 136 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
Luong Van Vinh
@lvhero
Mar 01 2016 05:09
@devonwilson1 what do your question and your code?
devonwilson1
@devonwilson1
Mar 01 2016 05:10
if you look at my "a pen " i have text that i would look to move to other side of page and cannot figure out how
thanks @lvhero
CamperBot
@camperbot
Mar 01 2016 05:13
devonwilson1 sends brownie points to @lvhero :sparkles: :thumbsup: :sparkles:
:star: 2 | @lvhero | http://www.freecodecamp.com/lvhero
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:14
@hernanmanzitti did you figure it out? what challenge are you on right now
devonwilson1
@devonwilson1
Mar 01 2016 05:14
@gwenf thank you
CamperBot
@camperbot
Mar 01 2016 05:14
devonwilson1 sends brownie points to @gwenf :sparkles: :thumbsup: :sparkles:
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:14
I can't seem to find which one in fcc
CamperBot
@camperbot
Mar 01 2016 05:14
:star: 662 | @gwenf | http://www.freecodecamp.com/gwenf
devonwilson1
@devonwilson1
Mar 01 2016 05:14
you were right
now i just want to make some of the stuff move around like my h3 element text for example
can anyone help lol
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:15
@devonwilson1 how do you want to move it?
devonwilson1
@devonwilson1
Mar 01 2016 05:16
i want the text at the bottom where i moved the link to to be centered or to the right
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:17
.top {
margin-top: 100px;
text-align: right;
}
you already have a text align in the body set as center
so you can change the rest below that or by using classes
devonwilson1
@devonwilson1
Mar 01 2016 05:18
i forgot about that so things that are adjusted in the body will supersede the child element?
Luong Van Vinh
@lvhero
Mar 01 2016 05:19
<h3>
  <a target="_blank" href="https://www.google.com/#q=ansel+adams">Ansel</a><p> Adams has absolutely mastered photography not only the actual taking of a picture but what is known as "workflow".  The processing of photo's was as important to Ansel as the exposure was.<p>
</h3>
tag p into ta h3 : not good
devonwilson1
@devonwilson1
Mar 01 2016 05:19
what would i name the class as @gwenf
Hernán
@hernanmanzitti
Mar 01 2016 05:19
@gwenf i couldnt
Luong Van Vinh
@lvhero
Mar 01 2016 05:19
sorry, i write English not good
V Bhargav Chowdary
@bhargav4
Mar 01 2016 05:20
@aseelsky Yes, but your code doesn't account for multiple childs
To get multiple childs you need to add more each methods
You don't want to display entire json on your page because there'll be a lot of data that cannot be understood.
Instead try to display simple info like weather , temp, city etc.
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:21
@devonwilson1 it's all just cascading and specificity. most people use classes to change styles on html elements and that's how I prefer it. You could do something like: .text-center and .text-right and just add those classes to elements
Luong Van Vinh
@lvhero
Mar 01 2016 05:22
@devonwilson1 you can create a tag <div class=" . . ."> <h3>. . . </div>
because you will easy write css
bigbeno37
@bigbeno37
Mar 01 2016 05:24
Hey guys, I'm trying to do the Portfolio Page project, and I'm wondering how to go about centering some text horizontally and vertically on the screen
Kinda like this
devonwilson1
@devonwilson1
Mar 01 2016 05:25
@gwenf would i just write something under css like " .text-center { text-align: right;}?
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:26
ya
devonwilson1
@devonwilson1
Mar 01 2016 05:26
and that add the class="text-center" to the desired element?
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:26
ya
.text-center { text-align: center;}
devonwilson1
@devonwilson1
Mar 01 2016 05:26
thanks @gwenf i will try
CamperBot
@camperbot
Mar 01 2016 05:26
devonwilson1 sends brownie points to @gwenf :sparkles: :thumbsup: :sparkles:
:warning: devonwilson1 already gave gwenf points
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:27
your body tag has center already so you can just change other elements to left or right if you want
devonwilson1
@devonwilson1
Mar 01 2016 05:27
well whey is my bottom h3 element to the right if the body is centered?
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:28
h3{
text-align: right;
right: 25px;
}
Luong Van Vinh
@lvhero
Mar 01 2016 05:28
@devonwilson1 text-align: right;
@devonwilson1 you have know "float"?
devonwilson1
@devonwilson1
Mar 01 2016 05:30
@gwenf i simply added that to the css h3 element and it did nothing to i need to give it a class and change the css h3 tag
camillestomer
@camillestomer
Mar 01 2016 05:30
trying to add a background color to a form
<form action="/submit-cat-photo" id="cat-photo-form" #background-color="green">
Elifaz Filho
@Elifaz
Mar 01 2016 05:30
I don’t get why Number 3 and 4 are comming up as NaN can anybody spot anything?
function steamroller(arr) {
    // I'm a steamroller, baby
    var final = [],
        holder = arr.toString().split(',').join('').replace('[object Object]', '{}');
    for (var item = 0; item < holder.length; item++) {

        final.push(holder[item]);

        if (final[item] === "}") {
            final.splice(item - 1);
            final.push({});
        }

        if (!isNaN(final[item])) {
            final[item] = Number(final[item]);
        }

        // console.log(isNaN(final[item]));
    }
    // console.log(final);
    return final;
}
 steamroller([1, {}, [3, [[4]]]])
Hernán
@hernanmanzitti
Mar 01 2016 05:32
Hi, mi links are not displaying vertically.
CAn anyone help me
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:32
@devonwilson1 if you right click on an element you can click 'inspect' and it will show you what css styles are being applied to that element and which ones aren't
@hernanmanzitti are they set to inline in your css?
Elifaz Filho
@Elifaz
Mar 01 2016 05:33
output
steamroller([1, {}, [3, [[4]]]]);

[1, {}, "3", "4"];
Hernán
@hernanmanzitti
Mar 01 2016 05:33
@gwenf sorry i couldn't understand the Q
but i think the answer is no
Aseel
@aseelsky
Mar 01 2016 05:33
@bhargav4, @moigithub thanks for the help, I play with my code again and see what happes
CamperBot
@camperbot
Mar 01 2016 05:33
aseelsky sends brownie points to @bhargav4 and @moigithub :sparkles: :thumbsup: :sparkles:
:star: 693 | @moigithub | http://www.freecodecamp.com/moigithub
:star: 295 | @bhargav4 | http://www.freecodecamp.com/bhargav4
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:36
see how inline styling makes it display horizontal
DeMarcus Sparks
@dsparks2193
Mar 01 2016 05:37
hey guys i need help
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:37
that should be the problem
Hernán
@hernanmanzitti
Mar 01 2016 05:37
@gwenf thanks, going to check
CamperBot
@camperbot
Mar 01 2016 05:37
hernanmanzitti sends brownie points to @gwenf :sparkles: :thumbsup: :sparkles:
:star: 663 | @gwenf | http://www.freecodecamp.com/gwenf
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:37
@devonwilson1 did you figure it out
DeMarcus Sparks
@dsparks2193
Mar 01 2016 05:37

Your a element should be a dead link with a href attribute set to "#".

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

<p>Click here for <a href#="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>

Elifaz Filho
@Elifaz
Mar 01 2016 05:37
I found, it was the Object interfering...
Daniyal
@danyalasif
Mar 01 2016 05:39
Which class in Bootstrap can I use to make text responsive?
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:39
@dsparks2193 <a href="#">cat photos</a>
@codeInjection I don't think it's innate in bootstrap but try % or em
in your text sizing
instead of pixels
Elifaz Filho
@Elifaz
Mar 01 2016 05:41
@codeInjection check this out
Thomas Mullen
@t-mullen
Mar 01 2016 05:42
This message was deleted
Elifaz Filho
@Elifaz
Mar 01 2016 05:42
@codeInjection but to answer your question you can also use @media to set the screen max-width and min-width and therefore adjust the size of your h1, h2 , h3, h4, h5, h6, p tags
wiki steamroller
CamperBot
@camperbot
Mar 01 2016 05:43

:point_right: algorithm steamroller [wiki]

Explanation:

This problem seems simple but you need to make sure to flatten any array, regardless of the level which is what adds a bit of difficulty to the problem.

:pencil: read more about algorithm steamroller on the FCC Wiki

Shayan Javadi
@ShayanJavadi
Mar 01 2016 05:44
So apparently imgur doesnt work with codepen. any idea what image hosting site i should use instead ?
Elifaz Filho
@Elifaz
Mar 01 2016 05:44
imgur does work with codepen as far as i’m concerned
Daniyal
@danyalasif
Mar 01 2016 05:45
How are you trying to make it work?
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:46
@dunkleheit it should work but you can https://plnkr.co/ too. some people like that one
Shayan Javadi
@ShayanJavadi
Mar 01 2016 05:47
@gwenf that's what I thought too, but some people were saying that they can't see my images. I'll see if that website works thanks
CamperBot
@camperbot
Mar 01 2016 05:47
dunkleheit sends brownie points to @gwenf :sparkles: :thumbsup: :sparkles:
:star: 664 | @gwenf | http://www.freecodecamp.com/gwenf
Shayan Javadi
@ShayanJavadi
Mar 01 2016 05:47
@gwenf it's kinda dumb that it doesn't work tbh
Gwendolyn Faraday
@gwenf
Mar 01 2016 05:48
@dunkleheit ya it's weird
Jeremy
@JeremyMundell
Mar 01 2016 05:58
How do I post my code here to get a second eye on it?
Coy Sanders
@coymeetsworld
Mar 01 2016 06:00
put it between ``` tags
var x="something";
easier to read that way if you use the formatting
Jeremy
@JeremyMundell
Mar 01 2016 06:02
Thanks! How do I give brownie points?
Daniyal
@danyalasif
Mar 01 2016 06:02
Finally built a somewhat tribute page
Jeremy
@JeremyMundell
Mar 01 2016 06:02
@codeInjection Nice!
CHRISTY ALBY
@christyalby
Mar 01 2016 06:02
need help to Change the Font Size of an Element
Coy Sanders
@coymeetsworld
Mar 01 2016 06:02
say the word thanks or thx and mention someone
like thanks @JeremyMundell
hmm that didn't work
Jeremy
@JeremyMundell
Mar 01 2016 06:03
@coymeetsworld Thanks!
CamperBot
@camperbot
Mar 01 2016 06:03
jeremymundell sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star: 316 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Mar 01 2016 06:03
did you sign up on free code camp?
Daniyal
@danyalasif
Mar 01 2016 06:03
@christyalby font-size?
Jeremy
@JeremyMundell
Mar 01 2016 06:03
@coymeetsworld yup
Coy Sanders
@coymeetsworld
Mar 01 2016 06:03
@JeremyMundell Thanks!
CamperBot
@camperbot
Mar 01 2016 06:03
coymeetsworld sends brownie points to @jeremymundell :sparkles: :thumbsup: :sparkles:
:star: 82 | @jeremymundell | http://www.freecodecamp.com/jeremymundell
Daniyal
@danyalasif
Mar 01 2016 06:04
I haven't logged into FCC for long, and this stuff is pretty new now.
Coy Sanders
@coymeetsworld
Mar 01 2016 06:04
hmm not sure why it worked this time and not last lol whatever, maybe because it wasn't the first line
yoni chanowitz
@yonichanowitz
Mar 01 2016 06:04
@christyalby , with Bootstrap? or straight css?
CHRISTY ALBY
@christyalby
Mar 01 2016 06:05
@yonichanowitz straight css

<style>
.red-text {
color: red;
}
</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>

Rachel
@chellybear
Mar 01 2016 06:13
i have a question, sorry if i'm a little unclear. but is it possible to access specific elements while using the map function?
Rachel
@chellybear
Mar 01 2016 06:19
like say i have an array of strings and i want to change charAt(0) for each element of the array to caps but like.. how do i do charAt if i don't have an index to go off of? my code looks like this
  var newAr = wordAr.map(function(){ // for each element in the array, charAt(0) will be capitalized
    wordAr[/* ??? */].charAt(0).toUpperCase();
  });
    return newAr;
Dawson
@byteright
Mar 01 2016 06:19
Hey, what are the scrolling boxes with separate background images used in this portfolio page called? http://codepen.io/FreeCodeCamp/full/VemmoX/
Rachel
@chellybear
Mar 01 2016 06:19
it's called parallax effect
Dawson
@byteright
Mar 01 2016 06:19
This message was deleted
camillestomer
@camillestomer
Mar 01 2016 06:20
trying to give the h1 element the class of pink-text
<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  h1 {
    color: pink-text;
  }
</style>
<h1>Hello World!</h1>
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 06:20
@chellybear u have to specify the element var newAr = wordAr.map(function(element){ // for each element in the array, charAt(0) will be capitalized element.charAt(0).toUpperCase(); }); return newAr;
Dawson
@byteright
Mar 01 2016 06:20
@chellybear thank you
CamperBot
@camperbot
Mar 01 2016 06:20
byteright sends brownie points to @chellybear :sparkles: :thumbsup: :sparkles:
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 06:20
```js
var newAr = wordAr.map(function(element){
// for each element in the array, charAt(0) will be capitalized
element.charAt(0).toUpperCase();
}); return newAr;
Coy Sanders
@coymeetsworld
Mar 01 2016 06:21
@camillestomer its just pink
CamperBot
@camperbot
Mar 01 2016 06:21
:star: 256 | @chellybear | http://www.freecodecamp.com/chellybear
Dawson
@byteright
Mar 01 2016 06:21
there we go
Coy Sanders
@coymeetsworld
Mar 01 2016 06:21
not pink-text
Dawson
@byteright
Mar 01 2016 06:21
just wanted to send you the brownie parts :D
points*
camillestomer
@camillestomer
Mar 01 2016 06:22
blob
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 06:22
var newAr = wordAr.map(function(element){
// for each element in the array, charAt(0) will be capitalized
    element.charAt(0).toUpperCase();
}); return newAr;
camillestomer
@camillestomer
Mar 01 2016 06:22
@coymeetsworld I tried, it doesn't work
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 06:22
for @chellybear
```js
Rachel
@chellybear
Mar 01 2016 06:22
that's what i'm wondering, like since map iterates through the whole array is there a way i can make it so i can use charAt(0).toUpperCase(); on all the elements?
camillestomer
@camillestomer
Mar 01 2016 06:22
Warnings: Your h1 element should have the class pink-text.
Your <style> should have a pink-text CSS class with its color set to pink.
Coy Sanders
@coymeetsworld
Mar 01 2016 06:23
oh, its a class
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 06:23
just specify the element @chellybear
var newAr = wordAr.map(function(element){ // for each element in the array, charAt(0) will be capitalized element.charAt(0).toUpperCase(); }); return newAr;
Rachel
@chellybear
Mar 01 2016 06:23
OH wait i didn't see the value in function
Coy Sanders
@coymeetsworld
Mar 01 2016 06:23
so what you want to do is give the h1 element a class
Rachel
@chellybear
Mar 01 2016 06:23
thanks @ChinuxParibus i'll try that out
CamperBot
@camperbot
Mar 01 2016 06:23
:star: 92 | @chinuxparibus | http://www.freecodecamp.com/chinuxparibus
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 06:23
:smile:
CamperBot
@camperbot
Mar 01 2016 06:23
chellybear sends brownie points to @chinuxparibus :sparkles: :thumbsup: :sparkles:
Coy Sanders
@coymeetsworld
Mar 01 2016 06:23
i.e. <h1 class="some_class">
Dawson
@byteright
Mar 01 2016 06:24
Do I need to use jQuery to use parallax?
er, to create parallax effects on my page
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 06:24
not at all @byteright
Coy Sanders
@coymeetsworld
Mar 01 2016 06:24
in this example you would give the h1 class the pink-text class so <h1 class="pink-text">
Daniyal
@danyalasif
Mar 01 2016 06:24
Built a tribute page, copied from wikipedia: http://codepen.io/RestSpecs/full/wGBaVv/
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 06:24
Dawson
@byteright
Mar 01 2016 06:25
@ChinuxParibus thank you kindly
CamperBot
@camperbot
Mar 01 2016 06:25
byteright sends brownie points to @chinuxparibus :sparkles: :thumbsup: :sparkles:
:star: 93 | @chinuxparibus | http://www.freecodecamp.com/chinuxparibus
camillestomer
@camillestomer
Mar 01 2016 06:25
@coymeetsworld thank you
CamperBot
@camperbot
Mar 01 2016 06:25
camillestomer sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star: 317 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Mar 01 2016 06:25
did that work @camillestomer ?
camillestomer
@camillestomer
Mar 01 2016 06:25
@coymeetsworld no, but I'm trying some things..
<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  pink-text {
    color: pink;
  }
  h1 {
    color: pink;
  }
</style>
<h1 class="pink-text">Hello World!</h1>
Coy Sanders
@coymeetsworld
Mar 01 2016 06:26
you'll probably need to remove the h1 {} part from the style too
camillestomer
@camillestomer
Mar 01 2016 06:26
Warning: "Your <style> should have a pink-text CSS class with its color set to pink"
Coy Sanders
@coymeetsworld
Mar 01 2016 06:26
not that that's not valid, it's just redundant and the tests may check to make sure you didn't do that
camillestomer
@camillestomer
Mar 01 2016 06:27
Warning: Your <style> should have a pink-text CSS class with its color set to pink.
Dawson
@byteright
Mar 01 2016 06:27
I think I'm going to do the parallax with jQuery just to get some practice with it
Coy Sanders
@coymeetsworld
Mar 01 2016 06:28
oh, forgot the period
@camillestomer .pink-text is to denote a class
camillestomer
@camillestomer
Mar 01 2016 06:28
it worked!! @coymeetsworld thanks a lot!
CamperBot
@camperbot
Mar 01 2016 06:28
camillestomer sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:warning: camillestomer already gave coymeetsworld points
Coy Sanders
@coymeetsworld
Mar 01 2016 06:29
np, gj :thumbsup:
yoni chanowitz
@yonichanowitz
Mar 01 2016 06:33
@christyalby , sorry i'm so late at my response. between the {} of .red-text put a font-size: ??px;
Justin Gary
@JustinGary
Mar 01 2016 06:34
I must be doing something stupid, maybe someoe here can help me?
.green-box {
background-color: green;
margin: 40px 20px 20px 40x;
}
trying to Use Clockwise Notation to give the element with the green-box class a margin of 40px on its top and left side, but only 20px on its bottom and right side.
Coy Sanders
@coymeetsworld
Mar 01 2016 06:35
@JustinGary last item
40x should be 40px;
Justin Gary
@JustinGary
Mar 01 2016 06:35
lol
awesome
thank you
Coy Sanders
@coymeetsworld
Mar 01 2016 06:35
yea np
Matt Reynolds
@mareynolds
Mar 01 2016 06:40
Any ideas on how to show a thumbnail preview of another webpage? "img src" only works for a jpg or actual image, not another website...
kelvinshang
@kelvinshang
Mar 01 2016 06:42
How do I keep my buttons in place? Changing window size moves the buttons all over the place. http://codepen.io/kelvinshang/full/VawRRw
Alex Salkever
@ASalkever
Mar 01 2016 06:48
Hi, everyone: I'm having trouble passing a button tutorial in the initial Front-End Tutorial. Here's the code snippet that won't pass.
<div class="row">
<form action="/submit-cat-photo">
<div class="col-xs.6"><label><input type="radio" name="indoor-outdoor"> Indoor</label></div>
<div class="col-xs.6"><label><input type="radio" name="indoor-outdoor"> Outdoor</label></div>
<div class="col-xs.6"><label><input type="radio" name="personality"> Loving</label></div>
<div class="col-xs.6"> <label><input type="checkbox" name="personality"> Lazy</label></div>
<div class="col-xs.6"><label><input type="checkbox" name="personality"> Crazy</label></div>
<div class="col-xs.6"><input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button></div>
</form>
</div>
It's failing on this criteria: "Nest each of your radio buttons inside its own div with the class col-xs-6."
Any ideas on what's wrong here? I am a noob but I can't figure out why the radio buttons are not nested.. Tnx!
Coy Sanders
@coymeetsworld
Mar 01 2016 06:49
your class's spelled wrong
col-xs.6 should be col-xs-6 @ASalkever
Alex Salkever
@ASalkever
Mar 01 2016 06:50
Oh, snap! Thank so much @coymeetsworld !
CamperBot
@camperbot
Mar 01 2016 06:50
asalkever sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star: 318 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld
Josh Fisk
@JoshFisk
Mar 01 2016 06:50
@acctg4code You could do it with a server, but not from the client in most cases.
Coy Sanders
@coymeetsworld
Mar 01 2016 06:50
np :thumbsup: @ASalkever
camillestomer
@camillestomer
Mar 01 2016 06:56
trying to nest all html elements in .container-fluid
<div class="container-fluid"><html></html></div
can anyone see my error?
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 06:57
@camillestomer simply quit the html tag
Brandon Mitchell
@OlympusBrons
Mar 01 2016 06:57
@camillestomer close the last div
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 06:57
and close the last div
camillestomer
@camillestomer
Mar 01 2016 06:58
okay!! thank you both @ChinuxParibus @OlympusBrons
CamperBot
@camperbot
Mar 01 2016 06:58
camillestomer sends brownie points to @chinuxparibus and @olympusbrons :sparkles: :thumbsup: :sparkles:
Coy Sanders
@coymeetsworld
Mar 01 2016 06:58
no, the div class needs to be between html tags @camillestomer
CamperBot
@camperbot
Mar 01 2016 06:58
:star: 99 | @chinuxparibus | http://www.freecodecamp.com/chinuxparibus
:star: 88 | @olympusbrons | http://www.freecodecamp.com/olympusbrons
camillestomer
@camillestomer
Mar 01 2016 06:58
doesn't work
Coy Sanders
@coymeetsworld
Mar 01 2016 06:59
i mean div tags need to be between html tags
camillestomer
@camillestomer
Mar 01 2016 06:59
<div class="container-fluid"></div>
Coy Sanders
@coymeetsworld
Mar 01 2016 06:59
<html><div class="container-fluid"></div></html>
camillestomer
@camillestomer
Mar 01 2016 06:59
Warning: "Make sure you have nested all HTML elements in .container-fluid."
@coymeetsworld thank you
CamperBot
@camperbot
Mar 01 2016 06:59
camillestomer sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:warning: camillestomer already gave coymeetsworld points
Coy Sanders
@coymeetsworld
Mar 01 2016 06:59
yeah but not the html tags, html should def be outside of any other tags
camillestomer
@camillestomer
Mar 01 2016 07:00
ok
still not working
Instructions: To get started, we should nest all of our HTML in a div element with the class container-fluid.
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:02
maybe you should quit the html tag @camillestomer
camillestomer
@camillestomer
Mar 01 2016 07:02
it doesn't work with or without it in the div element
<div class="container-fluid"></div>
CHRISTY ALBY
@christyalby
Mar 01 2016 07:03
This message was deleted
kelvinshang
@kelvinshang
Mar 01 2016 07:04
@camillestomer can you screenshot the code?
camillestomer
@camillestomer
Mar 01 2016 07:04
this is the first lesson in Responsive Design with Boostrap
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:04
are you nesting all the elements inside the div @camillestomer ??
camillestomer
@camillestomer
Mar 01 2016 07:05
blob
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:05
that's the problem
u have to nest all elements inside the div
camillestomer
@camillestomer
Mar 01 2016 07:05
nest the entire code in div element?
ok
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:05
yes
kelvinshang
@kelvinshang
Mar 01 2016 07:05
you need to put <div class="container-fluid"> all the way at the top
and leave </div> at the bottom
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:06
not the link nor the style tags
camillestomer
@camillestomer
Mar 01 2016 07:06
Done
@kelvinshang @ChinuxParibus thank you
CamperBot
@camperbot
Mar 01 2016 07:07
camillestomer sends brownie points to @kelvinshang and @chinuxparibus :sparkles: :thumbsup: :sparkles:
:warning: camillestomer already gave chinuxparibus points
:star: 137 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
CHRISTY ALBY
@christyalby
Mar 01 2016 07:08
<button type="submit"></button> no text displaying
anyone know?
Brandon Mitchell
@OlympusBrons
Mar 01 2016 07:10
Put the text that will go on top of the button in between the tags
SugarDrop
@SugarDrop
Mar 01 2016 07:10
@christyalby <button type"submit">your text</button> should do
Brandon Mitchell
@OlympusBrons
Mar 01 2016 07:10
yeah ^
CHRISTY ALBY
@christyalby
Mar 01 2016 07:11
@SugarDrop :+1:
SugarDrop
@SugarDrop
Mar 01 2016 07:12
Hi guys, sorry i'm new to this, not sure how to post code snippet. My question:
For the following segment of code
(function(){
var tweeterButton = $('#tweeterButton');
$(document).ready(function(){
tweeterButton.on("click", function(){ console.log('clicked'); });
});
})();
It seems that my button is not properly registered with the callback. But if I put "tweetButton" directly inside the ready() function's callback, then it will work. Any idea why?
CHRISTY ALBY
@christyalby
Mar 01 2016 07:12
@OlympusBrons :+1:
Brandon Mitchell
@OlympusBrons
Mar 01 2016 07:14
This message was deleted
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:14
@SugarDrop put the callback declaration inside the jQuery ready callback
Brandon Mitchell
@OlympusBrons
Mar 01 2016 07:15
@SugarDrop
to post code snippets:
help format
CamperBot
@camperbot
Mar 01 2016 07:15

:point_right: code formatting [wiki]

Multi line Code

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

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

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

Single line Code

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

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

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

SugarDrop
@SugarDrop
Mar 01 2016 07:17
(function(){
    var tweeterButton = $('#tweeterButton');
    $(document).ready(function(){
        tweeterButton.on("click", function(){ console.log('clicked'); });
    });
})();

The above segment of code, it doesn't seem that my button callback is registered properly. Any idea why?
On the other hand, if I do

(function(){
    $(document).ready(function(){
        $('#tweeterButton').on("click", function(){ console.log('clicked'); });
    });
})();

Then it seems to work. I'm not understanding the scoping of variables I feel like.

(Sorry about the last post, I figured out hot to format it now)
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:18
is because you have a declaration outside the jQuery global scope
(function(){
    $(document).ready(function(){
        var tweeterButton = $('#tweeterButton');
        tweeterButton.on("click", function(){ console.log('clicked'); });
    });
})();
V Bhargav Chowdary
@bhargav4
Mar 01 2016 07:20
Could not figure out wikipedia search and results api
The links given are confusing
Any help?
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:21
what exactly you're lookin' for??
does it helps @SugarDrop ??
SugarDrop
@SugarDrop
Mar 01 2016 07:22
@ChinuxParibus thanks, after you pointed that out it seems obvious.
CamperBot
@camperbot
Mar 01 2016 07:22
sugardrop sends brownie points to @chinuxparibus :sparkles: :thumbsup: :sparkles:
:star: 100 | @chinuxparibus | http://www.freecodecamp.com/chinuxparibus
SugarDrop
@SugarDrop
Mar 01 2016 07:25
@ChinuxParibus Can I ask you a more generic question? You seem pretty good. I put the code snippet I have in a separate js file. In general, do people usually wrap everything the js code does inside the $(document).ready()? Or are there better ways to 'kick start' a script? (sorry if my question doesn't make absolute sense)
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:29
in fact, it has absolutely sense
it depends
there's something called design patterns
depends on which design pattern you're using
but, in most cases, $(document).ready()works!
you can put away on another file
or use an IIFE
SugarDrop
@SugarDrop
Mar 01 2016 07:33
@ChinuxParibus Great stuff on IIFE, I was trying to do that in the original sinppet without actually knowing it's a thing. Do you have more resource on common design patterns that I can look at? Perhaps some other people's code of how they kick-off a script and stuff like that? (Thanks a bunch again)
CamperBot
@camperbot
Mar 01 2016 07:33
sugardrop sends brownie points to @chinuxparibus :sparkles: :thumbsup: :sparkles:
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:33
but, if you wanna code very big and complex apps, my advice is definitively use separated files for features
CamperBot
@camperbot
Mar 01 2016 07:33
:warning: sugardrop already gave chinuxparibus points
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:33
sure
gimme a minute
oh, crap!
i always forget the markdown format
hahaha lol
excuse me
this link could be helpful
SugarDrop
@SugarDrop
Mar 01 2016 07:36
@ChinuxParibus That will keep me busy for a while! Thanks again for the resource!
CamperBot
@camperbot
Mar 01 2016 07:36
sugardrop sends brownie points to @chinuxparibus :sparkles: :thumbsup: :sparkles:
:warning: sugardrop already gave chinuxparibus points
SugarDrop
@SugarDrop
Mar 01 2016 07:36
Also I wish I could give you more of these brownie points. I have absolutely no idea what they do, but the system apparently doesn't allow me to give you more... ;)
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:38
don't worry... i didn't know how can i use them (maybe in a "virtual cake"?, LOL :wink2: )
Brandon Mitchell
@OlympusBrons
Mar 01 2016 07:39
@SugarDrop The number next to your picture on your freecodecamp profile is how many brownie points you have.. You also get one point per challenge you complete..
so it's pretty neat. more here:
https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Brownie-Points
SugarDrop
@SugarDrop
Mar 01 2016 07:39
@OlympusBrons Thanks, brownie points for you too! LOL
CamperBot
@camperbot
Mar 01 2016 07:39
sugardrop sends brownie points to @olympusbrons :sparkles: :thumbsup: :sparkles:
:star: 89 | @olympusbrons | http://www.freecodecamp.com/olympusbrons
Brandon Mitchell
@OlympusBrons
Mar 01 2016 07:39
@ChinuxParibus Hahaha
:shipit:
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:40
oh, thanks for the link @OlympusBrons :smile:
CamperBot
@camperbot
Mar 01 2016 07:40
chinuxparibus sends brownie points to @olympusbrons :sparkles: :thumbsup: :sparkles:
:star: 90 | @olympusbrons | http://www.freecodecamp.com/olympusbrons
MujinyaAndrew
@MujinyaAndrew
Mar 01 2016 07:42
I have failed to delete all trailing comment tags.
rickyantony
@rickyantony
Mar 01 2016 07:44
Replace the value of your a element's href attribute with a #, also known as a hash symbol, to turn it into a dead link.<p>Click here for <a href="http://www.freecatphotoapp.com">cat photos</a>.</p>
sangeet
@sangeet
Mar 01 2016 07:44
Hey, I am having a bit of trouble with this excercise : http://www.freecodecamp.com/challenges/give-a-background-color-to-a-div-element
rickyantony
@rickyantony
Mar 01 2016 07:45
how to give # & where??i got stuck here
Brandon Mitchell
@OlympusBrons
Mar 01 2016 07:45
alt
@ChinuxParibus
@SugarDrop
rickyantony
@rickyantony
Mar 01 2016 07:45
please reply
sangeet
@sangeet
Mar 01 2016 07:46

I have declared a gray-background and put the essential background-color:gray in the code, but it isn't working. Here is my full code : http://paste.ubuntu.com/15250382/

Any corrections to be made?

Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:47
oh, i laughed sooooo much with this achieve message...
alt
SugarDrop
@SugarDrop
Mar 01 2016 07:48
@sangeet You have an unclosed bracket for your smaller-image class
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:48
alt
sangeet
@sangeet
Mar 01 2016 07:48
Guys, can someone review my code at http://paste.ubuntu.com/15250382/ for any possible mistake with the .gray-background class
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:49
@sangeet what @SugarDrop says :smile: you must close the bracket for the smaller-image class
Brandon Mitchell
@OlympusBrons
Mar 01 2016 07:50
D'oh!
I was looking so hard.. hahaha
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:50
oh, c'mon @OlympusBrons we're newbies helping newbies, what else can we do?? :wink2:
Brandon Mitchell
@OlympusBrons
Mar 01 2016 07:51
haha, right!?
sangeet
@sangeet
Mar 01 2016 07:52
Oh! Thanks
My bad
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:53
joda-curso-js.png
i laughed so hard for this achieve message
Mr.lonely
@maoyaoxiansheng
Mar 01 2016 07:53
"myStr should have the escape sequences for backslash tab tab carriage-return new-line separated by spaces"
what does it mean?
Encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:53
can you post some code???
Mr.lonely
@maoyaoxiansheng
Mar 01 2016 07:54
var myStr="backslash\ tab\t tab\t carriage-return\r new-line\n";
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:54
help format
CamperBot
@camperbot
Mar 01 2016 07:54

:point_right: code formatting [wiki]

Multi line Code

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

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

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

Single line Code

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

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

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

Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:55
a backlash is a '\' char
but in strings maybe you want to "escape" them
Brandon Mitchell
@OlympusBrons
Mar 01 2016 07:56
@maoyaoxiansheng I think what it's asking (I haven't done this one yet)
is
var myStr="\\ \t \r \n";
Mr.lonely
@maoyaoxiansheng
Mar 01 2016 07:56
@OlympusBrons that is wrong,I have tried.
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:56
or use spaces chars var myStr="\\\s\t\s\r\s\n"
what's the name of '\s' char??
oh, blank space :wink2:
Brandon Mitchell
@OlympusBrons
Mar 01 2016 07:57
isn't \s a RegExp thing?
Mr.lonely
@maoyaoxiansheng
Mar 01 2016 07:58
@ChinuxParibus I tried,but unfortunately wrong
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:58
but works in most string cases
Mr.lonely
@maoyaoxiansheng
Mar 01 2016 07:59
I don't know, just in this case,It can work.
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 07:59
try this var myStr= "\\\s\t\t\s\r\s\n" or this var myStr="\\ \t\t \r \n"
Brandon Mitchell
@OlympusBrons
Mar 01 2016 08:00
var myStr="\\ \t \t \r \n"; I would think.. yeah. My first post, I missed the extra tab
Mr.lonely
@maoyaoxiansheng
Mar 01 2016 08:01
@ChinuxParibus I tested it,sorry,but not right.
Brandon Mitchell
@OlympusBrons
Mar 01 2016 08:01
hmmm
Mr.lonely
@maoyaoxiansheng
Mar 01 2016 08:01
@OlympusBrons I have done.Thanks.
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 08:01
what da... :worried:
CamperBot
@camperbot
Mar 01 2016 08:01
maoyaoxiansheng sends brownie points to @olympusbrons :sparkles: :thumbsup: :sparkles:
:star: 91 | @olympusbrons | http://www.freecodecamp.com/olympusbrons
Mr.lonely
@maoyaoxiansheng
Mar 01 2016 08:02
@ChinuxParibus I passed it ,Thanks
CamperBot
@camperbot
Mar 01 2016 08:02
maoyaoxiansheng sends brownie points to @chinuxparibus :sparkles: :thumbsup: :sparkles:
:star: 105 | @chinuxparibus | http://www.freecodecamp.com/chinuxparibus
Brandon Mitchell
@OlympusBrons
Mar 01 2016 08:02
these challenges can be picky!
and tricky!
MujinyaAndrew
@MujinyaAndrew
Mar 01 2016 08:02
I am new here and am starting learning how to code in html 5
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 08:02
and more if you don't read well
Mr.lonely
@maoyaoxiansheng
Mar 01 2016 08:02
Yes,I can't understand waht it want to convey?
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 01 2016 08:02
in six hours, your eyes get tired
kelvinshang
@kelvinshang
Mar 01 2016 08:03
can anyone help me center the buttons on my page? i can't seem to size them correctly http://codepen.io/kelvinshang/full/VawRRw
MujinyaAndrew
@MujinyaAndrew
Mar 01 2016 08:08
on part of uncomment. i would to know how to delete all trailing comment tags, i.e. -->
someoneoffl
@someoneoffl
Mar 01 2016 08:28
hello guys
Anna Sakoyan
@ansakoy
Mar 01 2016 08:35
@kelvinshang as a partial solution, you could try to wrap your buttons into <div class='btn-group'> ...</div> (instead of this row-column thing). This will definitely make your buttons managable in terms of alignment. But I'm not sure that's exactly the solution you're looking for.
praveen sambu
@praveen-sambu
Mar 01 2016 08:44
does anybody have experience in using this frameworks sails js, loopback or hapi js?
V Bhargav Chowdary
@bhargav4
Mar 01 2016 08:45
getJSON method isn't executing. Any reasons?
$('input').on('keypress', function(w) {
    if (w.which == 13 && $('input').val().length !== 0) {
     var sword = $('input').val();
     var link = "https://en.wikipedia.org/w/api.php?action=opensearch&search="+sword+"&limit=6&namespace=0&format=json";

      $getJSON(link, function(data) {

      });
    }

  });
praveen sambu
@praveen-sambu
Mar 01 2016 08:45
is it necessary or does it have huge advantage to use one of the framework, if we dont use...what happens?
Robert Uivarosi
@URobert
Mar 01 2016 08:45
@bhargav4 what error are you getting?
V Bhargav Chowdary
@bhargav4
Mar 01 2016 08:47
If i type alert(link) before get function it pops. But not if i type it inside getJson method
Coy Sanders
@coymeetsworld
Mar 01 2016 08:47
should be $.getJSON() @bhargav4
V Bhargav Chowdary
@bhargav4
Mar 01 2016 08:47
:smile:
@coymeetsworld
:+1: thanks
CamperBot
@camperbot
Mar 01 2016 08:47
bhargav4 sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star: 319 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Mar 01 2016 08:47
np @bhargav4
im working on that now too lol
Ashraful Islam
@iashraful
Mar 01 2016 08:53
on what?
V Bhargav Chowdary
@bhargav4
Mar 01 2016 08:53
Looks like that wasn't the only error.
Still doesn't work for me
Ashraful Islam
@iashraful
Mar 01 2016 08:54
@bhargav4 add a lovely &callback=? at the end of your link
try it and see if it works
:D
Coy Sanders
@coymeetsworld
Mar 01 2016 08:55
oh yeah need the callback
Ashraful Islam
@iashraful
Mar 01 2016 08:55
@bhargav4
   ...
   var link = "https://en.wikipedia.org/w/api.php?action=opensearch&search="+sword+"&limit=6&namespace=0&format=json&callback=?";
   ...
V Bhargav Chowdary
@bhargav4
Mar 01 2016 08:57
No luck
Coy Sanders
@coymeetsworld
Mar 01 2016 08:58
i would print out to console.log what link is
then paste that into your browser address bar and see if it gets what you expect first
if it does you can rule out an issue with your API call at least
Pedro Figueiredo
@pedronfigueiredo
Mar 01 2016 08:59
Hi, I am having problems with my Tic Tac Toe AI project… I think the code is a little bit too big and I find it hard to manage it… Can anyone help me get it back from the dead?
Kevin
@devlyx
Mar 01 2016 09:02
guys
css not working after adding bootstrap
why is that?
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:03
@coymeetsworld @iashraful Its working now thanks
CamperBot
@camperbot
Mar 01 2016 09:03
bhargav4 sends brownie points to @coymeetsworld and @iashraful :sparkles: :thumbsup: :sparkles:
:warning: bhargav4 already gave coymeetsworld points
:star: 461 | @iashraful | http://www.freecodecamp.com/iashraful
MsMarChe
@MsMarChe
Mar 01 2016 09:03
Hello
Ashraful Islam
@iashraful
Mar 01 2016 09:03
@MsMarChe hi! :D
Coy Sanders
@coymeetsworld
Mar 01 2016 09:04
cool what was the issue @bhargav4 ?
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:06
@coymeetsworld Messed with previous code
Kevin
@devlyx
Mar 01 2016 09:07
Hello guys!
Ashraful Islam
@iashraful
Mar 01 2016 09:07
@suffering nice design!
suffering
@suffering
Mar 01 2016 09:08
@kelvinshang , I forked your codepen project, this solved your problem.
Kevin
@devlyx
Mar 01 2016 09:08
background image from css disappears after adding bootstrap :worried:
Ashraful Islam
@iashraful
Mar 01 2016 09:08
:worried:
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:08
@juzOne It happens because there are 2 css files
Your .css
bootstrap.css
So you want to add bootstrap before building your project
Ashraful Islam
@iashraful
Mar 01 2016 09:09
@juzOne are you doing it on codepen?
Kevin
@devlyx
Mar 01 2016 09:09
yes
I'm doing it it in codepen
suffering
@suffering
Mar 01 2016 09:09
@iashraful , it’s not mine, the designer is @kelvinshang .
Ashraful Islam
@iashraful
Mar 01 2016 09:09
then add the bootstrap from css pen
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:09
specify !important
Kevin
@devlyx
Mar 01 2016 09:09
how do I add bootstrap before building my project?
Ashraful Islam
@iashraful
Mar 01 2016 09:09
click the little gear button at the top of codepen [CSS] panel
there add bootstrap from the dropdown list :D
Kevin
@devlyx
Mar 01 2016 09:10
I did it like that. what is still left to do?
Ashraful Islam
@iashraful
Mar 01 2016 09:12
may I see your codepen?
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:13
How do I access this JSON
["abc",["ABC","ABC Television Network","Abc asia-pacific","ABC News","ABC3","ABC2"],["ABC are the first three letters of the Latin script known as the alphabet.","","","ABC News is the news division of the American Broadcasting Company (ABC), owned by the Disney Media Networks division of the Walt Disney Company.","This article is about the ABC TV channel. For the ABC's Canberra TV station (which was on channel 3 until the early 1990s), see ABC (TV station).","ABC2 is a national public digital television multichannel in Australia. Launched on 7 March 2005, it is the responsibility of the Australian Broadcasting Corporation's television division, and is available nationally to digital television viewers in Australia."],["https://en.wikipedia.org/wiki/ABC","https://en.wikipedia.org/wiki/ABC_Television_Network","https://en.wikipedia.org/wiki/Abc_asia-pacific","https://en.wikipedia.org/wiki/ABC_News","https://en.wikipedia.org/wiki/ABC3","https://en.wikipedia.org/wiki/ABC2"]]
Kevin
@devlyx
Mar 01 2016 09:13
@iashraful Sure. I haven't done anything yet though.
Ashraful Islam
@iashraful
Mar 01 2016 09:14
@bhargav4 weird json! where did you get this?
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:14
Wiki json. I saw this from stackoverflow
CamperBot
@camperbot
Mar 01 2016 09:14
no wiki entry for: json i saw this from stackoverflow
Kevin
@devlyx
Mar 01 2016 09:15
I'm trying to make portfolio webpage.
Ashraful Islam
@iashraful
Mar 01 2016 09:16
@juzOne I think I know the problem
you missed the little dot . infront of firstname class in your css
:D
Kevin
@devlyx
Mar 01 2016 09:17
@iashraful I did miss that. And I added it. But nothing happens
Ashraful Islam
@iashraful
Mar 01 2016 09:17
ah, I see
let me check again
now you made a spelling mistake in css
frstpage should be firstpage
:D
Kevin
@devlyx
Mar 01 2016 09:18
@iashraful OK. I fix the spelling mistake. But still not working :smile:
Ashraful Islam
@iashraful
Mar 01 2016 09:19
it's working for me here
showing a thin line of image
Kevin
@devlyx
Mar 01 2016 09:19
weird. :/
Ashraful Islam
@iashraful
Mar 01 2016 09:20
clear out your divs and see all divs has a matching closing tag
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:20

@juzOne Add

height: px;
width: px;

In your css

Ashraful Islam
@iashraful
Mar 01 2016 09:21
^
yes, I added 400px height too
Kevin
@devlyx
Mar 01 2016 09:22
@bhargav4 it's working. but what do I need to do to show the whole image?
Ashraful Islam
@iashraful
Mar 01 2016 09:22
@bhargav4 he can't use width, because it's defined by bootstrap columns
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:22
yes
Ashraful Islam
@iashraful
Mar 01 2016 09:22
@juzOne add contents
Enrico Mattiazzi
@emattiazzi
Mar 01 2016 09:22
I have problems with the Weather App.
Mixed Content: The page at 'https://s.codepen.io/boomerang/d234acc5aff372fb84e9e491a821c62d1456824133765/index.html?editors=1111' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.openweathermap.org/data/2.5/weather?APPID=42f42312aab4f2f710f4ee4fdc962022&lat=45.657975199999996&lon=13.8280962'. This request has been blocked; the content must be served over HTTPS.
Ashraful Islam
@iashraful
Mar 01 2016 09:23
:D
@emattiazzi add a &callback=? at the end of your line
:D
Kevin
@devlyx
Mar 01 2016 09:23
Ok. Thanks guys! I'll figure it out myself. @iashraful @bhargav4
CamperBot
@camperbot
Mar 01 2016 09:23
juzone sends brownie points to @iashraful and @bhargav4 :sparkles: :thumbsup: :sparkles:
:star: 462 | @iashraful | http://www.freecodecamp.com/iashraful
:star: 296 | @bhargav4 | http://www.freecodecamp.com/bhargav4
Ashraful Islam
@iashraful
Mar 01 2016 09:23
nothing a &callback=? can't solve
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:24
what does &callback=? do?
Catalin Anghel
@Lessar277
Mar 01 2016 09:25
@juzOne not related to your problem, but don't use Imgur to host your images
it's against their TOS
Ashraful Islam
@iashraful
Mar 01 2016 09:25
it's just a magic thing that wraps the returning result into a jquery object
Catalin Anghel
@Lessar277
Mar 01 2016 09:25
I saw someone recommend http://cloudinary.com/
Ashraful Islam
@iashraful
Mar 01 2016 09:26
also when callback is included, jquery knows that its cross-origin and does appropriate stuff to bypass browser blocking
other than that I don't know anything else @bhargav4
Enrico Mattiazzi
@emattiazzi
Mar 01 2016 09:26
It returns the same error but with http://api.openweathermap.org/data/2.5/weather?appid=42f42312aab4f2f710f4ee4fdc962022&lat=45.658000699999995&lon=13.828128999999999&callback=%3F
Ashraful Islam
@iashraful
Mar 01 2016 09:26
%3f?
Enrico Mattiazzi
@emattiazzi
Mar 01 2016 09:27
@iashraful looks like it translate the ?
Ashraful Islam
@iashraful
Mar 01 2016 09:27
did you do encodeURI thing on your link?
Enrico Mattiazzi
@emattiazzi
Mar 01 2016 09:27
@iashraful right
Ashraful Islam
@iashraful
Mar 01 2016 09:27
nope, don't do it
it has to be exactly callback=?
otherwise it won't work
@Lessar277 cloudinary is expensive, if I have 1 image of 1MB and I have 5000 views, then that's ~5GB spent
Enrico Mattiazzi
@emattiazzi
Mar 01 2016 09:29
but my request is this:
$.get("http://api.openweathermap.org/data/2.5/weather", {
    "appid": "42f42312aab4f2f710f4ee4fdc962022",
    "lat": position.coords.latitude,
    "lon" : position.coords.longitude,
"callback" : "?"
  }, function () {
    console.log("success");
  }); 
});
Ashraful Islam
@iashraful
Mar 01 2016 09:30
then I don't know
I can't see the url
also lat/lon is not working, it never asked me for allowing access to my location
Catalin Anghel
@Lessar277
Mar 01 2016 09:30
@iashraful indeed, I just looked at their pricing now. I didn't know about them either, saw someone else recommend them.
Ashraful Islam
@iashraful
Mar 01 2016 09:30
:D
@Lessar277 I suppose it won't be 1mb image only, I might have several images of 200kB per page, and a random distribution of visitors will eat up the bandwidth pretty much fast
assuming it's a blog
Enrico Mattiazzi
@emattiazzi
Mar 01 2016 09:32
@iashraful it is only one part of my code. this is only the request.
Ashraful Islam
@iashraful
Mar 01 2016 09:32
but hey, a single page app doesn't have that many images :D
Catalin Anghel
@Lessar277
Mar 01 2016 09:32
@emattiazzi maybe try with this url: "http://api.openweathermap.org/data/2.5/weather?callback=?"
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:32
Any idea how to access elements in this JSON?
["abc",
["Abc","ABC Television Network"],
["This is a redirect from a title with another method of capitalisation. It leads to the title in accordance with the Wikipedia naming conventions for capitalisation, or it leads to a title that is associated in some way with the conventional capitalisation of this redirect title.",""]
,
["https://en.wikipedia.org/wiki/Abc","https://en.wikipedia.org/wiki/ABC_Television_Network"]
]
Enrico Mattiazzi
@emattiazzi
Mar 01 2016 09:33
@Lessar277 tried but it don't work. why these things aren't explained on the lessons? :(
Ashraful Islam
@iashraful
Mar 01 2016 09:34
@bhargav4 use the indexes if the json structure is always the same
@bhargav4 can you show me the actual json result instead of an example? also your json is an array, not a json object
Catalin Anghel
@Lessar277
Mar 01 2016 09:35
@emattiazzi position.coords.latitude and position.coords.longitude need to be between quotes
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:36

@emattiazzi I have used the same API

"http://api.openweathermap.org/data/2.5/weather?lat="+lat+"&lon="+lon+"&APPID=8ccd5c2658281d7e5879a2ea390c4c"

This is the format where lat and lon are variables that you want to get using another api or geolocation

Ashraful Islam
@iashraful
Mar 01 2016 09:36
json is usually like this
{
   'title' : 'ABC Television Netzwerk',
   'extract' : 'This is a redirect from a title with another method of capitalisation. It leads to the title in... '
}
suffering
@suffering
Mar 01 2016 09:36

@emattiazzi ,

$.get("http://api.openweathermap.org/data/2.5/weather", {
    "appid": "42f42312aab4f2f710f4ee4fdc962022",
    "lat": 139,
    "lon" : 35,
"callback" : "?"
  }, function (data) {
    console.log(JSON.stringify(data));
    // the output is {"cod":"404","message":"Error: Not found city"}
  });

and your code has some syntax problem.

Catalin Anghel
@Lessar277
Mar 01 2016 09:36
@emattiazzi also get rid of the last set of });. it doesn't do anything
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:37
@iashraful Yes but when in the wiki page the format is looks like what I postes
https://en.wikipedia.org/w/api.php?action=opensearch&search=abc&limit=2&namespace=0&format=json
Catalin Anghel
@Lessar277
Mar 01 2016 09:37

$.get("http://api.openweathermap.org/data/2.5/weather?callback=?", {
    "appid": "42f42312aab4f2f710f4ee4fdc962022",
    "lat": "position.coords.latitude",
    "lon" : "position.coords.longitude",
  }, function () {
    console.log("success");
  });
@emattiazzi the above works fine
Ashraful Islam
@iashraful
Mar 01 2016 09:38
@bhargav4 that's super weird, its not supposed to be like that
@Lessar277 he can't quote position.coords.latitude because those are variables being provided by browser
:D
Catalin Anghel
@Lessar277
Mar 01 2016 09:39
@iashraful damn, true
Enrico Mattiazzi
@emattiazzi
Mar 01 2016 09:40
@Lessar277 nope, it's not working
but I am the only one that receives the error of Cross-Origin Resource?
Ashraful Islam
@iashraful
Mar 01 2016 09:40
@emattiazzi may be try using the straight line method we used
define a link
then $.getJSON(link), function(data) { ... do something with returned result here ... });
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:41
Any working wiki opensearch apis?
Ashraful Islam
@iashraful
Mar 01 2016 09:41
@bhargav4 your format is wrong
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:42
@iashraful yes i got it
Know any apis that would work fine?
Ashraful Islam
@iashraful
Mar 01 2016 09:44
@bhargav4 use this format
'https://en.wikipedia.org/w/api.php?action=query&title=' + sword' + '&prop=info&format=json&callback=?'
@bhargav4 api for what?
Enrico Mattiazzi
@emattiazzi
Mar 01 2016 09:47
@iashraful Nothing :(
 $(document).ready(function () {
   navigator.geolocation.getCurrentPosition(function(position) {      
$.getJSON("http://api.openweathermap.org/data/2.5/weather?callback=?&lat=" + position.coords.latitude + "&lon=" + position.coords.longitude + "&appid=42f42312aab4f2f710f4ee4fdc962022",    function () {
     console.log("success");
   });
 });
 });
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:47
@iashraful ok ill use that
Marcin Sawicki
@Sawik8888
Mar 01 2016 09:47
Hi all I need to Remove the btn-default class from all of my button elements using JQery to remove class from the element. <script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$(".well").addClass("animated shake");
$("#target1").addClass("animated fadeOut");
$("#target2").removeClass("btn-default");
$("#target3").removeClass("btn-default");
$("#target4").removeClass("btn-default");
$("#target5").removeClass("btn-default");
$("#target6").removeClass("btn-default");
});
</script>
Ashraful Islam
@iashraful
Mar 01 2016 09:47
@Sawik8888 holy biscuits! what is that?
@Sawik8888 use this
$('button').removeClass('btn-default');
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:48
@iashraful Nothing :(
 $(document).ready(function () {
   navigator.geolocation.getCurrentPosition(function(position) {      
$.getJSON("http://api.openweathermap.org/data/2.5/weather?callback=?&lat=" + position.coords.latitude + "&lon=" + position.coords.longitude + "&appid=42f42312aab4f2f710f4ee4fdc962022",    function (x) {
     console.log("success");
   });
 });
 });
Marcin Sawicki
@Sawik8888
Mar 01 2016 09:49
Thanks @iashraful
CamperBot
@camperbot
Mar 01 2016 09:49
sawik8888 sends brownie points to @iashraful :sparkles: :thumbsup: :sparkles:
:star: 463 | @iashraful | http://www.freecodecamp.com/iashraful
Ashraful Islam
@iashraful
Mar 01 2016 09:51
:D
@bhargav4 I think geolocation thing is being deprecated
sorry, its not working here either
:D
I can't console.log the position object
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:55

@bhargav4 use this format

'https://en.wikipedia.org/w/api.php?action=query&title=' + sword' + '&prop=info&format=json&callback=?'

This isn't working either
From where you got this format?

@iashraful
Ashraful Islam
@iashraful
Mar 01 2016 09:55
@bhargav4 from Wikipedia api page
check your console for any errors you get
@bhargav4 here is where I found ithttps://www.mediawiki.org/wiki/API:Data_formats
:D
V Bhargav Chowdary
@bhargav4
Mar 01 2016 09:58
@iashraful Thank you
CamperBot
@camperbot
Mar 01 2016 09:58
bhargav4 sends brownie points to @iashraful :sparkles: :thumbsup: :sparkles:
:warning: bhargav4 already gave iashraful points
ad3pt14
@ad3pt14
Mar 01 2016 10:00
hello guys - can you help me little with task "Change the Font Size of an Element"
Ashraful Islam
@iashraful
Mar 01 2016 10:01
@ad3pt14 ok
where are you stuck?
ad3pt14
@ad3pt14
Mar 01 2016 10:03
@iashraful "Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%."
that place

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

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

<p class="font-size">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>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>

thats my code
Ashraful Islam
@iashraful
Mar 01 2016 10:04
here is an example of giving a p tag a font-size of 30px
p { 
        font-size: 30px;
}
Surbhi Oberoi
@surbhioberoi
Mar 01 2016 10:05
hi, can someone help me with adding jquery function?
<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$("well").addClass("animated shake");
});
</script>
ad3pt14
@ad3pt14
Mar 01 2016 10:05
yeah - as you can see i already do that in my code
Ashraful Islam
@iashraful
Mar 01 2016 10:05
then?
@ad3pt14
what errors do you get?
Surbhi Oberoi
@surbhioberoi
Mar 01 2016 10:06
it doesn't wokr, i think it's fine?
Ashraful Islam
@iashraful
Mar 01 2016 10:06
@surbhioberoi I don't know, what is your code supposed to be doing?
ad3pt14
@ad3pt14
Mar 01 2016 10:06
@iashraful still the same as i mentioned before
Surbhi Oberoi
@surbhioberoi
Mar 01 2016 10:06
it is supposed to animate all the things in div "well"
Ashraful Islam
@iashraful
Mar 01 2016 10:07
@ad3pt14 can you please copy and paste the link from your challenge page?
Surbhi Oberoi
@surbhioberoi
Mar 01 2016 10:07
it is working for buttons, but not well
Ashraful Islam
@iashraful
Mar 01 2016 10:07
don't change anything just copy and paste the link
Surbhi Oberoi
@surbhioberoi
Mar 01 2016 10:07
http://www.freecodecamp.com/challenges/target-elements-by-class-using-jquery#?solution=fccss%0A%20%20%24(document).ready(function()%20%7B%0A%20%20%20%20%24(%22button%22).addClass(%22animated%20bounce%22)%3B%0A%20%20%20%20%24(%22well%22).addClass(%22animated%20shake%22)%3B%0A%20%20%7D)%3B%0Afcces%0A%0A%3C!--%20Only%20change%20code%20above%20this%20line.%20--%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Ch3%20class%3D%22text-primary%20text-center%22%3EjQuery%20Playground%3C%2Fh3%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23left-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22left-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target1%22%3E%23target1%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target2%22%3E%23target2%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target3%22%3E%23target3%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23right-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22right-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target4%22%3E%23target4%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target5%22%3E%23target5%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target6%22%3E%23target6%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A
that's such a big link!
Ashraful Islam
@iashraful
Mar 01 2016 10:08
@surbhioberoi you need to use the . for well like this $('.well').addClass('animated shake');
Surbhi Oberoi
@surbhioberoi
Mar 01 2016 10:08
oh!
Ghost
@ghost~56bd2077e610378809c105cd
Mar 01 2016 10:08
heys guys n gals...just wanted to stop by and say that ive hadto break from fcc to learn some javascript basics at another venue...the javascript challenges here were leaving me with brain pain