These are chat archives for FreeCodeCamp/HelpFrontEnd

28th
Feb 2016
Jason
@carpediem1213
Feb 28 2016 00:14
In the Random Quote Generator, what is going on in the example's JS? I'm pretty much done with the quote generator zipline but I still do not understand 70% of the example project's code.
darrynwu29
@darrynwu29
Feb 28 2016 00:15
hi everyone
Amir Ghafouri
@amirghafouri
Feb 28 2016 00:35
Why am I getting "undefined" at the top of my search results? Everything else works fine... http://codepen.io/amirghafouri/pen/jqNeWE?editors=1010
Caleb Martin
@caleb272
Feb 28 2016 00:43
has anyone here done the arguments optional
campfire ?
Nick Burress
@4trio19
Feb 28 2016 00:45
I'm playing around with that pen @amirghafouri . not sure why yet though
Jason
@carpediem1213
Feb 28 2016 00:47
I have found a way to do the random quote zipline, but I do not understand what is going on in the example's code. For instance, I just don't get the catch (e), the inIframe function or the ajax stuff in the getQuote function. What material should I review so I can fully understand the project example's code?
RickWisneske
@rwisneske
Feb 28 2016 00:49
I keep getting a border-top when I clear: both; on #myNavbar. I want to remove the thin white border line on the navbar-collapse.
http://codepen.io/rwhiskey/pen/ZQZRpM?editors=1100
Amir Ghafouri
@amirghafouri
Feb 28 2016 00:54
@burressdesign thanks but I actually just figured it out! The solution was defining the variable result as an empty string when I first declare it
CamperBot
@camperbot
Feb 28 2016 00:54
amirghafouri sends brownie points to @burressdesign :sparkles: :thumbsup: :sparkles:
:star: 375 | @burressdesign | http://www.freecodecamp.com/burressdesign
Nick Burress
@4trio19
Feb 28 2016 00:54
@amirghafouri hahahha
was just gonna message ya that
:smile:
var result = '';
That's awesome. I just finished my Wikipedia thing today: http://codepen.io/4trio19/pen/bpGpLb
@rwisneske I don't think I'm seeing the border
RickWisneske
@rwisneske
Feb 28 2016 01:03
@burressdesign Hmm possible chrome browser....
Nick Burress
@4trio19
Feb 28 2016 01:05
I found it. Tricky one
RickWisneske
@rwisneske
Feb 28 2016 01:05
@burressdesign oh forgot to mention it's in the responsive small screen navbar-collapse nav menu
Terrell Vest
@MirPresT
Feb 28 2016 01:14
anyone currently need some assistance ?
Alex
@wiscoay521
Feb 28 2016 02:35
i have no clue how to do the weather app
Caleb Martin
@caleb272
Feb 28 2016 02:36
thats front end ^
Alex
@wiscoay521
Feb 28 2016 02:36
i'm looking at weather app pens that people have done and the javascript looks like chinese to me. I don't even know where to start
Caleb Martin
@caleb272
Feb 28 2016 02:36
o wait didn’t realize I’m in the front end room oops
Alex
@wiscoay521
Feb 28 2016 02:37
im probably gonna give up with this. so frustrating. been at this for 2 weeks
Caleb Martin
@caleb272
Feb 28 2016 02:38
give up on programming
Alex
@wiscoay521
Feb 28 2016 02:39
thanks for the support bro
anthonygallina1
@anthonygallina1
Feb 28 2016 02:40
@wiscoay521 Dont give up. It took me long to do mine also. Put it down and do some thing dif if you need to.
Alex
@wiscoay521
Feb 28 2016 02:40
I don't even know where to start with the weather API
anthonygallina1
@anthonygallina1
Feb 28 2016 02:41
@wiscoay521 You know how to use developer tools right to check and see if are getting data.
Alex
@wiscoay521
Feb 28 2016 02:41
yes
but I haven't even started the javascript portion of it
since I don't know where to even begin with it
the tutorials suck
anthonygallina1
@anthonygallina1
Feb 28 2016 02:42
@wiscoay521 start by getting the conection.
Alex
@wiscoay521
Feb 28 2016 02:42
how? every example i've seen its done a completely different way
with no explanation of what is happening
i just need someone to talk me through this shit
anthonygallina1
@anthonygallina1
Feb 28 2016 02:43
@wiscoay521 well is think the user storys on the new sugest using the browser to get the lat and lon?
@wiscoay521 K well I just googled html5 get lat and lon. And got this http://www.w3schools.com/html/html5_geolocation.asp
Alex
@wiscoay521
Feb 28 2016 02:46
how do i get it to show my city instead of the coords?
anthonygallina1
@anthonygallina1
Feb 28 2016 02:51
@wiscoay521 write the js that works withe weather api you choose
@wiscoay521 have you worked through the tuts here that show you how to work withthe keys the json returns?
Noah Wilkie
@vultureroast
Feb 28 2016 03:04
Can somebody help me on where to start on the tribute page?
Tiffany White
@twhite96
Feb 28 2016 03:12
Found this gem for animations
I am working on the tribute page and needed a list of css animations to use with jQuery animate()
Getting started seems to be the trouble. Ha
Franco Zapata
@Francozt01
Feb 28 2016 03:25
@vultureroast use bootstrap and and make a div with class "container" and inside use a div class="panel panel-default"
@vultureroast then add content and use more divs inside if u need to
Brandyn Lucinsky
@appbeza
Feb 28 2016 03:29
Greetings. I have been putting this off for weeks: what content and who should I tribute in the Tribute project. It's difficult to decide. There are so many options. Can someone give a suggestion?
Gordon Davidescu
@gordondavidescu
Feb 28 2016 03:46
who's your favorite actor
or just do Betty White
can someone look at this:
and tell me why now computerTurn is not being called ever
Eric Yohansa
@eyohansa
Feb 28 2016 03:50
@gordondavidescu It looks like you actually never call computerTurn. You only declared the function.
Gordon Davidescu
@gordondavidescu
Feb 28 2016 03:50
I call it from within the function that checks if the player won
line (ugh) 315
I may have caught it. brb.
Gordon Davidescu
@gordondavidescu
Feb 28 2016 03:58
ok i somewhat got it to work
Eric Yohansa
@eyohansa
Feb 28 2016 04:01
Nice
Gordon Davidescu
@gordondavidescu
Feb 28 2016 04:03
for some reason the "tie!" detection is off
Noah Wilkie
@vultureroast
Feb 28 2016 04:07
@Francozt01 did you make your tribute page with the stuff you learned on freecodecamp or did you read the documentation's?
Franco Zapata
@Francozt01
Feb 28 2016 04:07
@vultureroast freecode camp + youtube tutorials about HTML, CSS, Bootstrap, JS
FreeCode Camp is ur path
and you have to use outside resources to compliment your knowledge
at least i recommend you to do that! @vultureroast
Eric Yohansa
@eyohansa
Feb 28 2016 04:13
@gordondavidescu at line 331, you're checking for filled instead of filledSquares.
Noah Wilkie
@vultureroast
Feb 28 2016 04:13
@Francozt01 yeah thats what i thought. thanks for the tips and help
CamperBot
@camperbot
Feb 28 2016 04:13
vultureroast sends brownie points to @francozt01 :sparkles: :thumbsup: :sparkles:
:star: 561 | @francozt01 | http://www.freecodecamp.com/francozt01
Franco Zapata
@Francozt01
Feb 28 2016 04:15
@vultureroast np good luck :+1:
Gordon Davidescu
@gordondavidescu
Feb 28 2016 04:19
I finally found it @eyohansa but thank you
CamperBot
@camperbot
Feb 28 2016 04:19
gordondavidescu sends brownie points to @eyohansa :sparkles: :thumbsup: :sparkles:
:star: 283 | @eyohansa | http://www.freecodecamp.com/eyohansa
Gordon Davidescu
@gordondavidescu
Feb 28 2016 04:19
my game is basically complete
I can make the computer a lot smarter
UGH. if you win, then the computer doesn't take a turn the next go around. I feel like I'm missing initializing something but I"m not sure what
Eric Yohansa
@eyohansa
Feb 28 2016 04:29
You might want to set filledSquares back to 0 on clearBoard()
Chris Davis
@chrisdav6
Feb 28 2016 04:36
this might be a cool addition, if the player wins, create an if/else asking the player if they would like to play again. If yes - newGame() , if no - have a nice day!
Gordon Davidescu
@gordondavidescu
Feb 28 2016 04:38
I set filledSquares to 0 in the new game function
that's a good idea @chrisdav6
huh, @eyohansa that seemed to fix it
thanks again @eyohansa
CamperBot
@camperbot
Feb 28 2016 04:41
gordondavidescu sends brownie points to @eyohansa :sparkles: :thumbsup: :sparkles:
:warning: gordondavidescu already gave eyohansa points
Eric Yohansa
@eyohansa
Feb 28 2016 04:42
:thumbsup:
Chris Davis
@chrisdav6
Feb 28 2016 04:45
maybe something like this...

if (playerWon === true)
alert("Good on you, you won, mate!");

var playAgain = prompt("Would you like to play again? Yes or No?", "").toLowerCase();

if(playAgain === "yes") {
clearBoard();
 newGame();
} else {
alert("Have a nice day!");
/*Code to exit function*/
}
Gordon Davidescu
@gordondavidescu
Feb 28 2016 04:47
I like that
uhm for some reason, and this ONLY happens for the third square in the middle row, but sometimes clicking on it does nothing
like if you take a couple of turns and it isn't filled, you cannot click it
and that's the only square for which that is the case
CodingwithGreenTea
@CodingwithGreenTea
Feb 28 2016 04:49
For the Twitch API, why is my array only printing the last array item inside the $.getJSON function?
 for (i = 0; i < streamers.length; i++) {
    var currentStreamer = streamers[i];
    console.log(currentStreamer); //prints list of all streamers

    $.getJSON(endpointURL + streamers[i], function(json) {
      var isStreaming = json.stream;
      console.log(currentStreamer); //prints list of only last streamer in array

      if (isStreaming) {
        var streamer = json.stream.channel.name,
          streamTitle = json.stream.channel.status,
          streamImage = json.image,
          game = json.stream.game;
          //do stuff
Aidan VanLeuven
@aidanvanleuven
Feb 28 2016 04:49
@gordondavidescu it gets kinda glitchy if you let the computer win
Gordon Davidescu
@gordondavidescu
Feb 28 2016 04:51
yes, you noticed that too
Luong Van Vinh
@lvhero
Feb 28 2016 04:52
test code
test code
test code
wtf
how to add code into tag? everybody help me
Gordon Davidescu
@gordondavidescu
Feb 28 2016 04:53
also, damnit, the win detection is not always working
use ```
wait, what? code into tag?
right, so then enter then and control enter once the code is in between
``` makes whatever is in between it look like ^
Luong Van Vinh
@lvhero
Feb 28 2016 04:56
code
@gordondavidescu thank you very much
CamperBot
@camperbot
Feb 28 2016 04:56
lvhero sends brownie points to @gordondavidescu :sparkles: :thumbsup: :sparkles:
:star: 380 | @gordondavidescu | http://www.freecodecamp.com/gordondavidescu
Luong Van Vinh
@lvhero
Feb 28 2016 04:57
@gordondavidescu i am sorry i write English not good.
Gordon Davidescu
@gordondavidescu
Feb 28 2016 04:57
yay
ok, can someone help me figure out why the computer win detection is not working for everything
you're welcome @lvhero
Gordon Davidescu
@gordondavidescu
Feb 28 2016 05:08
still can't figure out why when a couple of moves have been made, suddenly square six is unclickable
Noah Wilkie
@vultureroast
Feb 28 2016 05:14
when i use the thumbnail component on my image i get really wide white bars on the sides of the image
Jeremy Roe
@jeremyroe
Feb 28 2016 05:50
Would anyone have a moment to QA my weather zipline? http://codepen.io/jeremyroe/full/qbzVRO/
Maulik Darji
@maulikdarji
Feb 28 2016 06:02
@jeremyroe nice :+1:
DJ
@qualitymanifest
Feb 28 2016 06:05
@jeremyroe the temperature is about 14 degrees faherenheit low to me. but, that's just open weather map's inaccuracy. so i think it's fine. the only thing i might change is to make it more obvious how to switch between f and c
Jeremy Roe
@jeremyroe
Feb 28 2016 06:11
Ok Thanks @qualitymanifest
CamperBot
@camperbot
Feb 28 2016 06:11
jeremyroe sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1010 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Jeremy Roe
@jeremyroe
Feb 28 2016 06:11
Thanks also @maulikdarji
CamperBot
@camperbot
Feb 28 2016 06:11
jeremyroe sends brownie points to @maulikdarji :sparkles: :thumbsup: :sparkles:
:star: 511 | @maulikdarji | http://www.freecodecamp.com/maulikdarji
Chris Davis
@chrisdav6
Feb 28 2016 06:15
just noticed that you can use emmet features, same used in sublime text for code shortcuts in the editor. Sweet!
ul.class1>li*5 then press tab, produces...
<ul class="class1">
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
</ul>
Chris Davis
@chrisdav6
Feb 28 2016 06:24

do you guys stagger your html, like this...

<a href="#">
    Some Link
</a>

<button class="btn">
    Like
</button>

or do you keep it inline?

<a href="#">Some Link</a>

<button class="btn">Like</button>
CodingwithGreenTea
@CodingwithGreenTea
Feb 28 2016 06:26
I keep it inline if the content is short, otherwise I use line breaks
(Sorry for reposting; didn't get a response before) For the Twitch API, why is my array only printing the last array item inside the $.getJSON function?
 for (i = 0; i < streamers.length; i++) {
    var currentStreamer = streamers[i];
    console.log(currentStreamer); //prints list of all streamers

    $.getJSON(endpointURL + streamers[i], function(json) {
      var isStreaming = json.stream;
      console.log(currentStreamer); //prints list of only last streamer in array

      if (isStreaming) {
        var streamer = json.stream.channel.name,
          streamTitle = json.stream.channel.status,
          streamImage = json.image,
          game = json.stream.game;
          //do stuff
Joshua McKenzie
@mckenzieja
Feb 28 2016 07:28
I've been looking over this for about an hour now. Cant seem to understand why it's not displaying. Any tips? Thanks
 if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
  var lat = position.coords.latitude;
  var lon = position.coords.longitude;
  loadWeather(lat,lon);
  });

 } else {
   document.getElementbyId("city").innerHTML = "Either you did not allow your browser to ping your location or this browser is not supported.";
    }
var loadWeather = function(lat,lon){
var api = "&APPID=7d764d9a5887edcac1258090cce472a8";
var apiurl = "http://api.openweathermap.org/data/2.5/weather&lat="+lat+"&lon="+lon+api;
  $.ajax({
    type: GET,
    url: apiurl,
    dataType: 'jsonp',
    success: function(json){
        $("#city").text(json.name);
    }
});
};
kirbyedy
@kirbyedy
Feb 28 2016 07:34
could you link your pen
Joshua McKenzie
@mckenzieja
Feb 28 2016 07:35
is my pen corrupted?
lol
Maulik Darji
@maulikdarji
Feb 28 2016 07:41
@metaljacke1 try checking the generated api url, by alert or printing it somewhere on the page
@metaljacke1 it returns invalid API key
{"cod":401, "message": "Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."}
Joshua McKenzie
@mckenzieja
Feb 28 2016 07:44
Well its the right api key according to openweather
maybe they blocked for a couple of mins since it's a free api?
Maulik Darji
@maulikdarji
Feb 28 2016 07:46
try reseting the key
Joshua McKenzie
@mckenzieja
Feb 28 2016 07:47
Ok I just reset and copy pasted
still nothing.
Im gonna call it a night.
3am here.
Thanks for trying @maulikdarji
CamperBot
@camperbot
Feb 28 2016 07:49
metaljacke1 sends brownie points to @maulikdarji :sparkles: :thumbsup: :sparkles:
:star: 512 | @maulikdarji | http://www.freecodecamp.com/maulikdarji
anthonygallina1
@anthonygallina1
Feb 28 2016 08:15
@metaljacke1 have you tried "lat"+"lon"+"api";
Bruce Young
@mutantspore
Feb 28 2016 08:32
@metaljacke1 here is your error fixed. you had an & instead of a ? for the first of the parameters.
var apiurl = "http://api.openweathermap.org/data/2.5/weather?lat="+lat+"&lon="+lon+api;
it works now
Bruce Young
@mutantspore
Feb 28 2016 08:37
@metaljacke1 however if you do it this way with the data listed out in an object, you don’t have to worrry about the & and ? as it’s done for you. See the fork of your pen below.
http://codepen.io/MutantSpore/pen/WwNJBP?editors=1010
anthonygallina1
@anthonygallina1
Feb 28 2016 08:46
@mutantspore mine was wrong to but was try to lead in a direction @metaljacke1
@mutantspore I think he will do much better after he gets data thank you @mutantspore
CamperBot
@camperbot
Feb 28 2016 08:47
anthonygallina1 sends brownie points to @mutantspore and @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1182 | @mutantspore | http://www.freecodecamp.com/mutantspore
:star: 1182 | @mutantspore | http://www.freecodecamp.com/mutantspore
Jesus Vega
@ParagonChuy
Feb 28 2016 09:40
Can somebody help me with getting the Quote Generator to work?
Bruce Young
@mutantspore
Feb 28 2016 09:42
@ParagonChuy go for it
Jesus Vega
@ParagonChuy
Feb 28 2016 09:43
I'm trying to use the Quotes on Design API , but have little to no idea on how to parse the JSON data .
Bruce Young
@mutantspore
Feb 28 2016 09:44
well did you get something back and then log it to the console console.log(data); so you can see the structure of it.
do you have a pen?
Jesus Vega
@ParagonChuy
Feb 28 2016 09:45
I'm reading the documentation but I feel it is very vague
And I'm on Jsfiddle currently
Bruce Young
@mutantspore
Feb 28 2016 09:45
well? i neeed to see something.. fiddle… docs?
That's what I'm reading and trying to make sense of
Bruce Young
@mutantspore
Feb 28 2016 09:48
well the bit at the bottom.. the codepen example … if you click on the JS tab it shows you exactly what to do
just make sure you add in jQuery
Edward Hong
@edward-hong
Feb 28 2016 09:49

Hi I'm having trouble getting access to the Wikipedia API here's my code

    $.ajax({
            url: 'https://en.wikipedia.org/w/api.php?action=query&list=search&format=json&srsearch=' + $('#search-entry').val(),
            dataType: 'json',
            type: 'POST',
            headers: { 'Api-User-Agent': 'Example/1.0' },
            success: function(data) {
                console.log(data);
            }
    });

I keep getting "XMLHttpRequest cannot load https://en.wikipedia.org/w/api.php?action=query&list=search&format=json&srsearch=hello. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access." on the console in Chrome dev tools. Is it because I'm loading a local html file?

Bruce Young
@mutantspore
Feb 28 2016 09:50
@edward-hong addin &callback=? to the url
Oliver Webb
@Ollie15
Feb 28 2016 09:50
try it with target="_blank"
@edward-hong
Edward Hong
@edward-hong
Feb 28 2016 09:55
thanks @mutantspore it worked
CamperBot
@camperbot
Feb 28 2016 09:55
edward-hong sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1183 | @mutantspore | http://www.freecodecamp.com/mutantspore
Oliver Webb
@Ollie15
Feb 28 2016 09:56

Hello I am trying to put text over an image, how would I do this? thanks.

http://codepen.io/Olliewe88/pen/WrBVPw

Pynman
@Pynman
Feb 28 2016 10:03
Suggest best editor software similar to FCC txt editor (windows)
Hemang Kumar
@hemangsk
Feb 28 2016 10:19
@pynman Atom, Sublime Text
Hemang Kumar
@hemangsk
Feb 28 2016 10:25
@Boomybiscuit45 One way is that you can make a <div> and then use the image as background-image of that div and write the desired text inside <div>
Ngoc Chi Vo
@nchivo101
Feb 28 2016 11:11
@pynman vim :D
Brian Kilrain
@bkilrain
Feb 28 2016 11:15

Hello kind people… I’ve been banging my head against the wall with my random quote generator. I’ve lurked around this chat and tried to follow advice for other folks having problems… I’ve checked out blogs/books/youtube tutorials/etc… I’ve poured myself large glasses of whiskey and shook my fist in the air while yelling obscenities. Nothing has worked.

My main goal right now is to get the api working properly… then I’ll build the site around that. I am evidently missing something. Here is my latest failed incantation… but I’ve tried the .getJSON method too, as prescribed in the FCC lesson.

So - my fellow campers - I implore you. Please provide me with a resource that can walk me through this process. My mind is slow from all the whiskey… so if it is written in the language an eight-year-old could understand, all the better.

I really don’t want to copy, or even look at, someone else’s code… I want to understand this organically. But my will is weak. HELP!!! OTL

sigursiguros
@sigursiguros
Feb 28 2016 11:38
dear campers my clock is not working, please help http://codepen.io/Sigursiguros/pen/QyJaLQ?editors=0010
Brian Kilrain
@bkilrain
Feb 28 2016 11:47
seems all the helpers are taking a break @sigursiguros :worried:
Hemang Kumar
@hemangsk
Feb 28 2016 11:54
@bkilrain I am working with ur codepen, will let you know if I find a solution, btw for the Random Quote Generator problem, I preferred to use an array
Coy Sanders
@coymeetsworld
Feb 28 2016 11:56
@sigursiguros i dont think the setInterval function should be within the function you are passing it, needs to be separate
Brian Kilrain
@bkilrain
Feb 28 2016 11:57
@hemangsk thanks a lot. I thought about using an array… but then the thought of not knowing how to properly rock an api made me crazy. I’m thinking I’ve got to use a jsonp format… something about ‘same domain policy'
CamperBot
@camperbot
Feb 28 2016 11:57
bkilrain sends brownie points to @hemangsk :sparkles: :thumbsup: :sparkles:
:star: 314 | @hemangsk | http://www.freecodecamp.com/hemangsk
Coy Sanders
@coymeetsworld
Feb 28 2016 11:59
Agreed I used an array too @bkilrain @hemangsk, the funny part was that I started working on this a month ago and the curriculum changed
Random Quote was put with Basic FE Development Projects which is before the JSON APIs and Ajax section
Brian Kilrain
@bkilrain
Feb 28 2016 12:01
ahhhh… yeah, with the curriculum as it is now, using an array feels like cheating after learning about apis
Yasin Yusuf
@YasinYA
Feb 28 2016 12:01
hi guys how is everyone
Hemang Kumar
@hemangsk
Feb 28 2016 12:04
@bkilrain Its really great you thought of using an API, and that same domain error is a real headache, and it get resolved by using &callback=? most of the times... but the error I'm getting is,.. that there is apparently a missing semicolon in the json data received....looking into it...
@coymeetsworld i think they changed because the quotes zipline is to check our array and random number function understanding....! btw that json api CORS error is real notorious...right? :D
Coy Sanders
@coymeetsworld
Feb 28 2016 12:07
which error is that @hemangsk ?
Hemang Kumar
@hemangsk
Feb 28 2016 12:08
"cross origin request" something...pops up when we forget to put that "&callback=?" thing in api url
Coy Sanders
@coymeetsworld
Feb 28 2016 12:10
hmm don't think I've seen that before, were we working on the Weather API stuff? I haven't been doing any of that the last 2 days trying to put some work in now lol
Hemang Kumar
@hemangsk
Feb 28 2016 12:12
@coymeetsworld Yaaa our last encounter with CORS was when we were working on weather api stuff :)
Coy Sanders
@coymeetsworld
Feb 28 2016 12:13
oh you're talking about when we didn't specify the protocol in the URL right @hemangsk ?
left out the http:// in the API call?
Thanasis S.
@xakersas
Feb 28 2016 12:14
hello
so i want to allign my list both in the center
and left
Azrul Zulkifli
@azrulnaut
Feb 28 2016 12:16

Hi guys and girls, I'm working on the weather report project. As the open source weather API only allows hourly calls, to help me while I'm working on it, I decided to copy the JSON file an upload a copy on dropbox. For some reason, my code doesn't check out.

     var apiURL = "https://www.dropbox.com/s/dg2606z3hhpxj9q/weathertest.json?raw=1&callback=?";

function getPosition() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(showPosition);
  }
}

function showPosition(position) {
  $.getJSON(apiURL, function(json) {
    var lat = position.coords.latitude;
    var long = position.coords.longitude;
    var weather = "";
    weather += json.name + ", " 
      + json.weather[0].id + "<br>"
      + json.weather[0].icon + "<br>"
      + json.main.temp + " Kelvin<br>Longitude: " 
      + long + "Latitude: " + lat;
    $('.weather').html(weather);
  });
}

(document).ready(getPosition());

Hope someone could lend a hand.

Coy Sanders
@coymeetsworld
Feb 28 2016 12:20
you need to call the JSON.stringify method
@azrulnaut
to convert that to a JSON object
Hemang Kumar
@hemangsk
Feb 28 2016 12:30
@bkilrain I am not able to figure it out, your approach is completely correct... Found an API which works.. http://www.icndb.com/api/
Brian Kilrain
@bkilrain
Feb 28 2016 12:31
Ok… thanks again. I’ll try that other api :)
here is the url I’m attempting to use. It works! But how can I get the function quoter(json) to display on the site?
Hemang Kumar
@hemangsk
Feb 28 2016 12:34
@bkilrain Cool lemme see
Brian Kilrain
@bkilrain
Feb 28 2016 12:34
i dont’ care about formatting right now… just JSON.stringify would be fine
Azrul Zulkifli
@azrulnaut
Feb 28 2016 12:40
thanks @coymeetsworld will try that!
CamperBot
@camperbot
Feb 28 2016 12:40
azrulnaut sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star: 310 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Feb 28 2016 12:41
gl @azrulnaut i'm working on this one too
actually now that i tried it @azrulnaut i didn't have to do that, hmmm
tried plugging in your reference to dropbox, are you getting forbidden error?
you may not be able to reference Dropbox data from outside, I'm not sure where I heard that from exactly
Azrul Zulkifli
@azrulnaut
Feb 28 2016 12:45
@coymeetsworld At first I got the forbidden error but I added 'callback?=0' to the url
now the error seems to be a syntax error in my json
which is strange
anyway, this is my json url = ""https://www.dropbox.com/s/dg2606z3hhpxj9q/weathertest.json?raw=1&callback=?" opening it in the browser seems fine
maybe i'll try a different hosting site for the json.
thanks again
Coy Sanders
@coymeetsworld
Feb 28 2016 12:47
yeah in the browser is one thing, codepen may disallow those things
i would try just using the API if you can, that way you eliminate possible errors with this way
im using free version of API i haven't ran into too many calls issue
one thing you can do is prevent autorun from happening in codepen, manually trigger a run when you want, maybe that will help
Azrul Zulkifli
@azrulnaut
Feb 28 2016 12:48
Hmm, how do you control when the call trigger?
Ah, the autoupdate!
Of course! Alright @coymeetsworld , this dropbox plotline has steered me off course, thanks for reminding me to stay on track, haha. Will get back to the API.
CamperBot
@camperbot
Feb 28 2016 12:50
azrulnaut sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:warning: azrulnaut already gave coymeetsworld points
Coy Sanders
@coymeetsworld
Feb 28 2016 12:51
right, you got me worried i might go over my calls too so i shut it off lol @azrulnaut thanks for that idea
CamperBot
@camperbot
Feb 28 2016 12:51
coymeetsworld sends brownie points to @azrulnaut :sparkles: :thumbsup: :sparkles:
:star: 278 | @azrulnaut | http://www.freecodecamp.com/azrulnaut
Hemang Kumar
@hemangsk
Feb 28 2016 13:00
Brian Kilrain
@bkilrain
Feb 28 2016 13:05
@hemangsk strange… the preview within the git chat window appears to work. But when I open the codepen in my browser, it doesn’t.
I just tried it in firefox… that worked. does codepen not play nice with chrome? or could it be one of my plugins is messing things up?
@hemangsk thank you for working this out with me
Hemang Kumar
@hemangsk
Feb 28 2016 13:07
@bkilrain np..it was great learning.. thank you
CamperBot
@camperbot
Feb 28 2016 13:07
hemangsk sends brownie points to @bkilrain :sparkles: :thumbsup: :sparkles:
:star: 279 | @bkilrain | http://www.freecodecamp.com/bkilrain
Brian Kilrain
@bkilrain
Feb 28 2016 13:07
it was one of my plugins… thanks again!
Hemang Kumar
@hemangsk
Feb 28 2016 13:08
Good luck :)
Pedro Figueiredo
@pedronfigueiredo
Feb 28 2016 13:37
Hi, I am stuck with http://www.freecodecamp.com/challenges/no-repeats-please algorithm challenge, any help?
The problem is not the code, it is the math. I cannot reproduce the tests
Chris Hinton
@hintcj
Feb 28 2016 13:54
Anyone have time to help with a problem on my portfolio zipline?
kirbyedy
@kirbyedy
Feb 28 2016 13:56
post your problem
On the last page, I'm trying to figure out why the Twitter button is pushed out of the div on the right hand side. Also, trying to figure out why its rounded at the top.
Ken Haduch
@khaduch
Feb 28 2016 14:08
@hintcj - I'll take a quick look...
Azrul Zulkifli
@azrulnaut
Feb 28 2016 14:09
@hintcj The rounded top of the first button and rounded bottom of the last button seems to be a style of ".btn-group-vertical"
replacing that class with your own should do the trick
Chris Hinton
@hintcj
Feb 28 2016 14:10
@azrulnaut okay awesome. That helps with that problem. Thanks!
CamperBot
@camperbot
Feb 28 2016 14:10
hintcj sends brownie points to @azrulnaut :sparkles: :thumbsup: :sparkles:
:star: 279 | @azrulnaut | http://www.freecodecamp.com/azrulnaut
Chris Hinton
@hintcj
Feb 28 2016 14:12
I just don't understand why the twitter button is pushed over
Ken Haduch
@khaduch
Feb 28 2016 14:14
@hintcj - it is picking up a margin from somewhere, I think it is the btn-default class, but the others are having it overridden somehow. I was trying to figure this out but thought that you had an answer...
@hintcj - you are defining a .btn-default class, which has a margin 10px on it. For some reason that is getting overridden on the other buttons, but not the first.
@hintcj - the buttons other than the first in the .btn-group-vertical are being treated differently. If you take that btn-default class off of those buttons, it will change the placement. Maybe you need to do something else?
Chris Hinton
@hintcj
Feb 28 2016 14:18
@khaduch I was thinking it was a margin, too. I'm trying to go through the inspector on chrome and see whats affecting it
Ken Haduch
@khaduch
Feb 28 2016 14:20
@hintcj - it is definitely your .btn-default. If you need to provide some separation between the buttons, you could change it to margin-top and margin-bottom so it doesn't have that margin all the way around. The btn-group-vertical is also adding some extra styling like the rounded corners. You can define your own styling to make that grouping.
Chris Hinton
@hintcj
Feb 28 2016 14:24
@khaduch Okay yeah, that's definitely it. I'm going to remove it and then create my own class to get rid of the problem
@khaduch Thanks for the help!
CamperBot
@camperbot
Feb 28 2016 14:25
hintcj sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star: 608 | @khaduch | http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Feb 28 2016 14:26
@hintcj - you're welcome. Hope you get it all shaped up as you want it! Have a great day!
John Otu
@johnotu
Feb 28 2016 14:30

Guys, what would be the best idea to arrange a JSON that will carry grocery data for a store in such a manner that the price and quantity of each item can be easily updated? I have tried:

var goodsInStock = {
    beverages: {
        coffee: {Nescaffe:[20, 200], ReCaffe[10, 300]},
        tea: {Lipton:[5, 50], richTea:[3, 45]},
        juice: {ribena:[4, 200], fivealive[3, 300]},
        softDrink: {},
        other: {}
    }
}

but it doesn't seem to work. Displaying the goodsInStock object shows the array of quantity and price as "object"

Amir Ghafouri
@amirghafouri
Feb 28 2016 14:33
Trying to get my drop down menu to sit on the same row as my h1 element... help? Tried messing around with display: inline-block; but not sure if I'm making a mistake with CSS selector syntax or wrong approach entirely. Maybe just use bootstrap row? Would still like to hear how to do it with inline-block if possible..
http://codepen.io/amirghafouri/pen/ONJZoZ
Dustin
@Key-Banger
Feb 28 2016 14:47

@amirghafouri you can use a span like so:

<h1><span><button class="btn btn-primary dropdown-toggle inline" type="button" data-toggle="dropdown">select category <span class="caret"></span></button>
        <ul class="dropdown-menu">
          <li class="dropdown-header">Gaming</li>
          <li><a href="#">FIFA 16</a></li>
          <li><a href="#">League of Legends</a></li>
          <li><a href="#">Poker</a></li>
          <li class="divider"></li>
          <li class="dropdown-header">Creative</li>
          <li><a href="#">Art</a></li>
          <li><a href="#">Coding</a></li>
          <li><a href="#">Music</a></li>
        </ul></span>TWITCH STREAMERS</h1>

You will also need to adjust the width of your content class because the button and h1 are wider then the content.

@amirghafouri alternative with css is to add this to css and then give each element that class:
.inline {
  display: inline-block;
}
Amir Ghafouri
@amirghafouri
Feb 28 2016 15:04
@Key-Banger Thanks
CamperBot
@camperbot
Feb 28 2016 15:04
amirghafouri sends brownie points to @key-banger :sparkles: :thumbsup: :sparkles:
:star: 317 | @key-banger | http://www.freecodecamp.com/key-banger
shameem fairooz
@sfshameem5
Feb 28 2016 15:27
Does anyone have an idea as to how i should build the tribute page?
It's the first project in front end
max77p
@max77p
Feb 28 2016 15:29
can someone help me figure out why i have a white line beside my blockquote in this codepen?
need it to be grey
AliciadW
@AliciadW
Feb 28 2016 15:32
@max77p you didn't specify the colour in the css
max77p
@max77p
Feb 28 2016 15:32
for blockquote?
Azrul Zulkifli
@azrulnaut
Feb 28 2016 15:34
@max77p That white line is the default styling for blockquote by Bootstrap
AliciadW
@AliciadW
Feb 28 2016 15:35
@max77p yes
AliciadW
@AliciadW
Feb 28 2016 15:35
add something like this:
blockquote{
border-left: 10px solid red;
}
max77p
@max77p
Feb 28 2016 15:36
ohh ok, thanks! had no idea! thought it was something wrong with my grid lines @AliciadW @azrulnaut
CamperBot
@camperbot
Feb 28 2016 15:36
max77p sends brownie points to @aliciadw and @azrulnaut :sparkles: :thumbsup: :sparkles:
:star: 319 | @aliciadw | http://www.freecodecamp.com/aliciadw
:star: 280 | @azrulnaut | http://www.freecodecamp.com/azrulnaut
AliciadW
@AliciadW
Feb 28 2016 15:39
HI all. Could someone please have a look at my code and tell me why it doesn't work? Been at it for some time now so I might be missing something small or huge... http://codepen.io/AliciadW/pen/ONLQey?editors=1010
Gordon Davidescu
@gordondavidescu
Feb 28 2016 15:49
Hi all! I have tic tac toe nearly done. there's ONE weird problem. if a couple of moves are done, for some reason, the far right middle tile can't be clicked anymore for player move.
oops just found a reason
yup. I was accidentally reading square 6 from the square 4 data. :O
Andrew Perrin
@Pezz18
Feb 28 2016 15:57
hi all, have any of you completed the weather app challenge yet?
mhm
@mierea
Feb 28 2016 16:07
@mattxgreen late thank you for pointing the bug in my code
CamperBot
@camperbot
Feb 28 2016 16:07
mierea sends brownie points to @mattxgreen :sparkles: :thumbsup: :sparkles:
:star: 51 | @mattxgreen | http://www.freecodecamp.com/mattxgreen
Bruce Young
@mutantspore
Feb 28 2016 16:14
@AliciadW you are using a Form and upon submit it causes a page reload. to fix it you can make it not do the default action
$("#wikiSearch").on("click", function(e) { e.preventDefault();
Thomas Honeyman
@thomashoneyman
Feb 28 2016 16:24
Hey guys! Weather app is nearly done, but I’m struggling with the order my functions are running in so I can display different temperatures to users when they click the buttons. Everything is working except for that. Any thoughts on this?
max77p
@max77p
Feb 28 2016 16:25
i am trying to create horizontal line in black under my container, but i can't seem to get it there can someone help please?
dcjuju
@dcjuju
Feb 28 2016 16:26
did you try <hr> @max77p ?
max77p
@max77p
Feb 28 2016 16:27
@dcjuju yes actually figured it out, you can't put color:black you have to do border-color:black
dcjuju
@dcjuju
Feb 28 2016 16:29
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #000;
margin: 1em 0;
padding: 0;
}
@max77p you can try to put background-color:black;
and a height:@1px; @max77p

like this @max77p

hr{}

hr{}
max77p
@max77p
Feb 28 2016 16:33
@dcjuju by putting display:block, then anything beside it would get pushed to next line right?
dcjuju
@dcjuju
Feb 28 2016 16:33
here try this
hr {
height:1px;
background-color: #123455;
}
@max77p
try the last one :)
i think that would work :) @max77p
hr {
height:1px;
background-color: black;
}
Dustin
@Key-Banger
Feb 28 2016 16:39
I'm working on the wikipedia viewer. Could someone help me out with this error code:
XMLHttpRequest cannot load https://en.wikipedia.org/w/api.php?action=query&titles=jimi%20hendrix&prop=revisions&rvprop=content&format=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access.
Oluwatobi Adeyinka
@tobex9434
Feb 28 2016 16:41
@Key-Banger i spent a whole day on that error
@Key-Banger make sure you include this in you api call: '&callback=?'
Dustin
@Key-Banger
Feb 28 2016 16:42
@tobex9434 ha ha ha I just got it, any clue?
@tobex9434 cool, I'll try that.
Buzz Tarek
@buzzth
Feb 28 2016 16:43

Hey guys, I started on my first tribute page project. I'm trying to get the CSS style settings to work but it does not seem to be functioning like in freecodecamp challenges. Here's my code <style> .blue-text {
color: blue;
}

</style>

Oluwatobi Adeyinka
@tobex9434
Feb 28 2016 16:43
@Key-Banger it has something to do with cross domain requests you can read up on it https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
Dustin
@Key-Banger
Feb 28 2016 16:45
@tobex9434 Thanks! I'll check that out
CamperBot
@camperbot
Feb 28 2016 16:45
key-banger sends brownie points to @tobex9434 :sparkles: :thumbsup: :sparkles:
:star: 300 | @tobex9434 | http://www.freecodecamp.com/tobex9434
Robert Richey
@0x0936
Feb 28 2016 16:45

@saylu .replaceWith() removes the set of matched elements, and in their place, inserts new html content. In other words, the span with id temperature is removed from the dom and replaced with a literal Fahrenheit value. Use $('#temperature).text(tempFahrenheit); instead, preserving the span.

Also, the object temperatures is a local variable to the function displayCurrentWeather() and is not accessible outside the function. Even though the function is returning temperatures, this function is only being called once and there is no variable assignment to the return value. A simple fix would be to assign to temperatures the return value from calling displayCurrentWeather().

var temperatures; // global temperatures variable

// Create API URL
function locationCode() {
   // ... stuff ...
   $.getJSON(apiURL, function(data) {
      temperatures = displayCurrentWeather(data); // the data in temperatures is available to the rest of your app
   });
}
genesisjoec
@genesisjoec
Feb 28 2016 16:54
What do you call a website feature that allows the user to input their own photos, paragraphs, etc. I would like to learn more about it. I understand how to develop it from a programming stand point, but I don't know what you call that from a users perspective. How would I as a developer create such an ability for a user? I hope that makes sense!
I want to make a blog template for a friend.
jhois
@jhois
Feb 28 2016 16:56
Why do they make the example for the projects so complicated is that realistically how we are supposed to be making them? They use a ton of stuff that isn't taught.
Achilleas Papakonstantinou
@AchiPapakon
Feb 28 2016 16:56
Hi, can someone tell me why this sample code from w3schools doesn't work on codepen.io? (Works as intended when I create a test.htm file on my desktop)
<nav class="navbar navbar-inverse"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">WebSiteName</a> </div> <div class="collapse navbar-collapse" id="myNavbar"> <ul class="nav navbar-nav"> <li class="active"><a href="#">Home</a></li> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">Page 1 <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#">Page 1-1</a></li> <li><a href="#">Page 1-2</a></li> <li><a href="#">Page 1-3</a></li> </ul> </li> <li><a href="#">Page 2</a></li> <li><a href="#">Page 3</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li> <li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li> </ul> </div> </div> </nav>
Alicja Raszkowska
@trueskawka
Feb 28 2016 16:57
do you have all the relevant .css and .js for boostrap in codepen?
Achilleas Papakonstantinou
@AchiPapakon
Feb 28 2016 16:57
<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>                        
      </button>
      <a class="navbar-brand" href="#">WebSiteName</a>
    </div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Home</a></li>
        <li class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" href="#">Page 1 <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="#">Page 1-1</a></li>
            <li><a href="#">Page 1-2</a></li>
            <li><a href="#">Page 1-3</a></li>
          </ul>
        </li>
        <li><a href="#">Page 2</a></li>
        <li><a href="#">Page 3</a></li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
        <li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
      </ul>
    </div>
  </div>
</nav>
Yes.
Alicja Raszkowska
@trueskawka
Feb 28 2016 16:57
ok. so how does it "not work"?
Achilleas Papakonstantinou
@AchiPapakon
Feb 28 2016 16:57
wait
I have the .css for bootstrap
Alicja Raszkowska
@trueskawka
Feb 28 2016 16:57
does it not open?
not display certain elements?
Achilleas Papakonstantinou
@AchiPapakon
Feb 28 2016 16:58
Mm ok, I needed the .js thanks :D
Alicja Raszkowska
@trueskawka
Feb 28 2016 16:58
;)
Achilleas Papakonstantinou
@AchiPapakon
Feb 28 2016 16:59
When I clicked the buttons nothing happened, thanks :)
Robert Richey
@0x0936
Feb 28 2016 17:00
@jhois try and focus on just the requirements. As far as I know, there are no design requirements in any front-end project. My Wikipedia Viewer, for example, didn't use any CSS. The example projects are just examples - the requirements are all that matters, but feel free to add as many bells and whistles as you like. Ultimately, these projects will become part of your portfolio that others will see.
Buzz Tarek
@buzzth
Feb 28 2016 17:04
in CodePen, do I add the /style section under HTML or CSS?
Thanasis S.
@xakersas
Feb 28 2016 17:05
hey, in this website that codecamp gives you does this guy use seperate image files as his background or just 1?
max77p
@max77p
Feb 28 2016 17:06
hey guys in my project, for the horizontal line i have col-xs-14 why does this work?
i thought you can only go maximum 12 in columns?
Robert Richey
@0x0936
Feb 28 2016 17:06
@buzzth add your CSS to the CSS section, without a <style> tag
@xakersas that project uses separate images
Thanasis S.
@xakersas
Feb 28 2016 17:07
thanks
Buzz Tarek
@buzzth
Feb 28 2016 17:09
@0x0936 I see, so the style tag is not necessary in this situation. Thank you
CamperBot
@camperbot
Feb 28 2016 17:09
buzzth sends brownie points to @0x0936 :sparkles: :thumbsup: :sparkles:
:star: 1205 | @0x0936 | http://www.freecodecamp.com/0x0936
Robert Richey
@0x0936
Feb 28 2016 17:09
@max77p it seems to be ignoring your class. col-xs-14 is not a valid bootstrap class. <hr> lines by default have 100% width of it's parent container
wstrauss123
@wstrauss123
Feb 28 2016 17:11
I think I found the correct help room. I had a question about the show local weather zip line.
Robert Richey
@0x0936
Feb 28 2016 17:11
@xakersas @buzzth :+1: :)
max77p
@max77p
Feb 28 2016 17:11
@0x0936 you are right, i removed the col-xs-14 but still its lined up to the container
@0x0936 how is it still lining up to the container, when i have the entire hr container outside the main container?
Robert Richey
@0x0936
Feb 28 2016 17:12
@max77p it's still nested within a container
<div class="container container-fluid">
  <div class="row">
      <div class="horiline">
      <hr>
    </div>
  </div>
</div><!--end of horizontal line-->
Igor Šumonja
@igor-sumonja
Feb 28 2016 17:12
hi
wstrauss123
@wstrauss123
Feb 28 2016 17:13
has anyone completed the show local weather zipline?
Robert Richey
@0x0936
Feb 28 2016 17:13
@wstrauss123 what's your question?
Igor Šumonja
@igor-sumonja
Feb 28 2016 17:13
why my code in working in debug mode on codepen but not in default mode ?
wstrauss123
@wstrauss123
Feb 28 2016 17:14
My zipline is always showing 63 degrees for Ferenheight. I wanted to ask if yours is always showing the same 63 degree also in your location.
Or some other degrees that doesn't match the real weather.
Maybe there is something wrong the the API.
?
Robert Richey
@0x0936
Feb 28 2016 17:16
@wstrauss123 do you have a link to the project I can look at? is it on codepen?
wstrauss123
@wstrauss123
Feb 28 2016 17:16
yes, one moment
max77p
@max77p
Feb 28 2016 17:16
@0x0936 so even if its in a separate container, it would assume its same size as the parent container?
Tanner Kiser
@Kiser3613
Feb 28 2016 17:17
Hey guys! I'm working on my portfolio page and trying to make my thumbnails. I need my second row of thumbnails to match my first row in size and location. I was wondering if I could get some help. Here is my code.

<h3 class="text-center"style="font-size:40px">My Projects</h3>
<img id="car" class="thumbnail, col-xs-4" src="http://hdwallpaperbackgrounds.net/wp-content/uploads/2015/08/Awesome-Car-HD-Wallpapers-1080p.jpg"></img>
<img id="world" class="thumbnail, col-xs-4" src="http://applehdwallpaper.com/wp-content/uploads/awesome-1080p-wallpaper_1.jpg"></img>
<img id="awesome" class="thumbnail, col-xs-4" src="http://hdwallpaperia.com/wp-content/uploads/2013/12/Awesome-Wallpaper-HD.jpg"></img>
<div id="row2" class="row">
<img id="purple"class="thumbnail, col-xs-4" src="http://wallpapers-and-backgrounds.net/wp-content/uploads/2015/11/awesome-full-hd-background_1.jpg"></img>
<img id="space" class="thumbnail, col-xs-4" src="http://wallpapercave.com/wp/9eKny6U.jpg"></img>
<img id="colors" class="thumbnail, col-xs-4" src="http://iwritealot.com/wp-content/uploads/2010/07/8.jpg"></img>

</div>

Robert Richey
@0x0936
Feb 28 2016 17:19
@max77p hr is always, by default, the max width of it's parent container
max77p
@max77p
Feb 28 2016 17:21
@0x0936 right..but a parent container is in this case would be the main container wrapping all the other elements. But the hr I have outside that container in a separate container though?
I think my codepen may be working now. I was looking at a page that was hosted by github.
well maybe not.
@0x0936
Maybe the open weather API isn't matching the real local weather.
Llandy3d
@Llandy3d
Feb 28 2016 17:29
can someone check and tell me why if I click on the "C" link the text doesn't get changed ? if I put the javascript commands 1 by 1 in the console it works, but not in automatic http://codepen.io/Llandy3d/pen/eZYPYN
Robert Richey
@0x0936
Feb 28 2016 17:35

@max77p you have 2 divs with class .container not to be confused with the more general term, parent container. one with most of your content and the second with just an hr. The parent container for this hr is <div class="horline">. By default, div elements have 100% width of their parent container. This div has a <div class="row"> parent container - which is then limited by the <div class="container"> parent container.

Added comments to help explain. You can view all of this by opening your dev console and inspecting each element and seeing how much margin, padding, and actual width they take up - and how classes are affecting them.

<!-- this restricts max width and centers content -->
<div class="container container-fluid">
    <!-- bootstrap rows extend slightly beyond the left and right edges of .container -->
    <div class="row">
      <div class="horiline">
        <!-- hr has 100% width, effectively matching the current row's width -->
        <hr>
      </div>
    </div>
  </div>
Thanasis S.
@xakersas
Feb 28 2016 17:37
so in this given website there is a bar that's always visible, how can i implement that, there was nothing similar in the previous codecamp tutorials
Panagiotis
@bohemian83
Feb 28 2016 17:39
Hi guys, could you please have a look at my personal portfolio page? I think I am just about done...
Robert Richey
@0x0936
Feb 28 2016 17:40
@wstrauss123 it loaded for me showing correct city and relatively correct temperature. OpenWeather data is generally not very accurate at times - and I don't know why, and for this reason I chose to use a different API service, Forecast.io
wstrauss123
@wstrauss123
Feb 28 2016 17:42
@Llandy3d I can't get your codepen weather app to work in my chrome browser.
@0x0936 Thanks. Your answer was helpful.
CamperBot
@camperbot
Feb 28 2016 17:42
wstrauss123 sends brownie points to @0x0936 :sparkles: :thumbsup: :sparkles:
:star: 1206 | @0x0936 | http://www.freecodecamp.com/0x0936
Robert Richey
@0x0936
Feb 28 2016 17:43
@max77p I think perhaps there may be some confusion with the general term "parent container" vs a div with class container. These are separate concepts.
Jasmina Babic
@animsaj
Feb 28 2016 17:48
@Llandy3d do something with data instead of displaying it as JSON string
Robert Richey
@0x0936
Feb 28 2016 17:48
@xakersas that's a bootstrap navigation bar with a fixed position. FCC projects are intended for you to learn more on your own. Basically, the hand holding stops and you get to try and solve problems on your own, with only high level guidance.
Robert Uivarosi
@URobert
Feb 28 2016 17:49
@bohemian83 Hi. Interesting portfolio page. Nice picture selection. Personally I'm not a very big fan of those large square in the beginning, but I guess that depends on who you ask. Next you`ll have to fix the overlay issue. I understand you want a fixed nav bar but as it is currently built it overlays your text from the about section. Lastly, I would recommend working on the styling at the last section. You could use buttons instead of simple links, style the buttons and change the font within and... you could consider adding some sort of content to the right of them, because as it is right now, IMO there is to much empty space on the right side. I hope this helps. All the best and happy coding !
José Pereira
@jafcpereira
Feb 28 2016 17:55
@bohemian83 I really like your page. Other than the review already given by @URobert , I would only add for you to be careful with the white color of your text against the second div image. It does not contrast too well and makes reading the text more difficult :)
Llandy3d
@Llandy3d
Feb 28 2016 17:56
@animsaj you didn't really look the code then because data is there just as a reference to see the format ^^ anyways the problem seemed to be the fact that the <a> was inside an h3 and even by pressing the <a> link it would be read as the h3 click event
Pedro Abel Díaz Sánchez
@coderHook
Feb 28 2016 17:57

Hello! I am trying to figure out how to start with the weather Zipline but I cannot find the way.

I already registered into de apiweather webpage and got the key but I do not know how to start using it. I read the documentation as well, but honestly I feel quite lost and do not know how to start setting up things.

Now, I am trying to get some knowledge from codecademy --> learn apis sections, but even with that I cannot see anything clear.

Can someone give me a hand here?

Jasmina Babic
@animsaj
Feb 28 2016 17:57
@bohemian83 Πολύ καλό!!
kirbyedy
@kirbyedy
Feb 28 2016 17:59
@Abel1987 basically you need to find the users location, call the openweather api, with getjson and that just stick those result inside your html
Llandy3d
@Llandy3d
Feb 28 2016 17:59
@Abel1987 start simple, like linked in the zipline page http://openweathermap.org/current#geo , start reading which data you receive and begin to code to display degrees, and weather
Jasmina Babic
@animsaj
Feb 28 2016 17:59
@Llandy3d ok. for the reference you could use console.log()
kirbyedy
@kirbyedy
Feb 28 2016 17:59
if you recall there was a json section on fcc
Llandy3d
@Llandy3d
Feb 28 2016 18:00
@animsaj I used console.log() a lot but it wasn't really helpfull, putting 2 alerts, one in the h3 and one in the <a> .click events did the trick to figure out the bug =p
Robert Uivarosi
@URobert
Feb 28 2016 18:01
@Abel1987 first get your geo location from google. then use the value to get a correct API call. After you have the result of that, you go on and start working at getting the geo location working properly, have the values and use them in the API call URL. After you got that part to work, you analyze the response of the API call, and start figuring out which values you need and how to get them to be displayed on your page
Panagiotis
@bohemian83
Feb 28 2016 18:01
@Khaltar @URobert thanks for the feedback! I will keep working on it! @animsaj Σ' ευχαριστώ! :)
CamperBot
@camperbot
Feb 28 2016 18:01
bohemian83 sends brownie points to @khaltar and @urobert and @animsaj :sparkles: :thumbsup: :sparkles:
:star: 636 | @urobert | http://www.freecodecamp.com/urobert
:star: 435 | @animsaj | http://www.freecodecamp.com/animsaj
:star: 208 | @khaltar | http://www.freecodecamp.com/khaltar
Robert Uivarosi
@URobert
Feb 28 2016 18:02
@bohemian83 yw
Jasmina Babic
@animsaj
Feb 28 2016 18:03
@bohemian83 Και εγω
max77p
@max77p
Feb 28 2016 18:03
@0x0936 thanks for explanation, do you have some reading you can recommend me to so i can get this concept down better for next time?
CamperBot
@camperbot
Feb 28 2016 18:03
max77p sends brownie points to @0x0936 :sparkles: :thumbsup: :sparkles:
:star: 1207 | @0x0936 | http://www.freecodecamp.com/0x0936
Panagiotis
@bohemian83
Feb 28 2016 18:05
Quick question. I saved my html/css/js code in a single text file and saved it as an html. For reason it throws off my background image sizing. If I open the page in chrome the background images are much bigger. Any ideas why?
Robert Richey
@0x0936
Feb 28 2016 18:08
@max77p perhaps others can recommend reading resources - the best I can offer is that you skim through Bootstrap documentation and pay close attention to the classes you intend to use in your projects. For example, learn exactly what .container and .row are doing. Other than that, just keep practicing. Build small projects - like a demo - for yourself, for learning a particular technology. For example, if you want to learn more about Bootstrap's jumbotron, make a small project that just focuses on using a jumbotron.
Also, open the dev console and inspect your elements often to learn what is going on - dev console makes debugging much easier.
Pedro Abel Díaz Sánchez
@coderHook
Feb 28 2016 18:14

@kirbyedy yes, I did it all already, but What I typed doesn't displayed anything on the screen but it pass the test... even if a directly copy what they ask me for I cannot get any result from fcc.

@URobert Thats what I am trying to do, getting the geoLocation is not a problem, ad fcc json section I can find an example but then... I really dont know how to comunnicate my codepen with the weather api...

Robert Uivarosi
@URobert
Feb 28 2016 18:17
@Abel1987 look below:
   $.getJSON(weatherApiUrl, function(json) {
    //console.log(json.weather[0].description);
    city = json.name;
.......
......
.....
@Abel1987 after you got your proper API response, you analyze that and separate the elements that you want form it (see the example of getting the city from above
@Abel1987 then you use the variables to display the values in HTML
@Abel1987 here is an example of that
$(".location").html(country+","+city);
Pedro Abel Díaz Sánchez
@coderHook
Feb 28 2016 18:23
Thanks @URobert lets see what I get.
CamperBot
@camperbot
Feb 28 2016 18:23
abel1987 sends brownie points to @urobert :sparkles: :thumbsup: :sparkles:
:star: 638 | @urobert | http://www.freecodecamp.com/urobert
Pedro Abel Díaz Sánchez
@coderHook
Feb 28 2016 18:23
in the weather apiurl I guess I have to set it with my api key, isn't it?
Eric
@eti313
Feb 28 2016 18:23
Somehow fcc skipped me past the basic front end dev projects and wanted me to start the intermediate projects. I went through evertything in between already. XD
The algorithms and evertything.
Probably not the worst thing that could happen.
Jasmina Babic
@animsaj
Feb 28 2016 18:26
@Abel1987 you can use http://ip-api.com no need for api key
Pedro Abel Díaz Sánchez
@coderHook
Feb 28 2016 18:36
I am quite lost @animsaj I am getting the geolocation using this script
<script>
        $.getJSON("http://ip-api.com/json/?callback=?", function(data) {
            var table_body = "";
            $.each(data, function(k, v) {
                table_body += "<tr><td>" + k + "</td><td><b>" + v + "</b></td></tr>";
            });
            $("#GeoResults").html(table_body);
        });
        </script>
Thats the code from FCC Json getGeolocation
Jasmina Babic
@animsaj
Feb 28 2016 18:46
This message was deleted
@Abel1987 ok, before anything else console.log() your data to see its format and then,save it to a variable, so you can use it in weather-api call, append city and country to any HTML element you want, to display it on the page; move on to a function to hold ajax call for weather data and do the same steps with that data
Pedro Abel Díaz Sánchez
@coderHook
Feb 28 2016 18:54
Is there any video on twithc on I can see how other people did this weather zipline? I can see tha jackel_27 shows his weather app but not from the very beggining... I am completely lost.
Robert Uivarosi
@URobert
Feb 28 2016 18:54
@Abel1987 yw
Pedro Abel Díaz Sánchez
@coderHook
Feb 28 2016 19:01
can you provide me with a link? on twitch I cannot find it
Buzz Tarek
@buzzth
Feb 28 2016 19:43
Hey guys, I'm in the early phases of my tribute page. Struggling with making elements responsive as well as centering a video on the page. Any help is appreciated.

<p data-height="447" data-theme-id="0" data-slug-hash="jqOeZE" data-default-tab="result" data-user="buzzth" data-preview="true" class='codepen'>See the Pen <a href='http://codepen.io/buzzth/pen/jqOeZE/'>Kazumi Totaka Tribute Page</a> by Bassim Hijazi (<a href='http://codepen.io/buzzth'>@buzzth</a>) on <a href='http://codepen.io'>CodePen</a>.</p>

<script async src="//assets.codepen.io/assets/embed/ei.js"></script>

My bad, I'm not exactly sure how to share it
Terrell Vest
@MirPresT
Feb 28 2016 19:44
@abel1987 paste the link from the address bar at the top
Terrell Vest
@MirPresT
Feb 28 2016 19:45
@Abel1987 are you trying to center the video ?
Gordon Davidescu
@gordondavidescu
Feb 28 2016 19:47
funnily I am in the very early stages of the weather app. I get a feeling I am not calling the API right
Buzz Tarek
@buzzth
Feb 28 2016 19:47
Yes, the one on the very bottom to be precise.
And also, elements such as the boxes aren't responsive when windows are smaller like in this case for instance.
classact1
@classact1
Feb 28 2016 19:49
@gordondavidescu you're calling it right
Terrell Vest
@MirPresT
Feb 28 2016 19:50
@buzzth ok if you make your iframes display block and give them a margin top and bottom of 0 and a margin left and right of auto it will center them. I just tested it on your codepen
Gordon Davidescu
@gordondavidescu
Feb 28 2016 19:51
I am? That's good. I wonder why it's not getting me the data I am thinking it should
glad I'm calling it right at least
Terrell Vest
@MirPresT
Feb 28 2016 19:52
@gordondavidescu I would recommend using jquery if you are still learning how to make ajax requests.
classact1
@classact1
Feb 28 2016 19:52
@classact1 but remember that server will send you information in JSON format and JSON is a string. You have to JSON.parse(weatherInfo);
Yotam Levy
@Heaser
Feb 28 2016 19:52
Hello
Ok, So I've searched google but I couldn't find an answer.
classact1
@classact1
Feb 28 2016 19:53
@gordondavidescu but remember that server will send you information in JSON format and JSON is a string. You have to JSON.parse(weatherInfo);
Terrell Vest
@MirPresT
Feb 28 2016 19:53
@Heaser what are you stuck on ?
Yotam Levy
@Heaser
Feb 28 2016 19:53
Is there a way CSSly to make the text animate but, the background of said text not animated?
Terrell Vest
@MirPresT
Feb 28 2016 19:53
animate in what way ?
Gordon Davidescu
@gordondavidescu
Feb 28 2016 19:53
ding ding! that's what I am missing, thanks @classact1
CamperBot
@camperbot
Feb 28 2016 19:53
gordondavidescu sends brownie points to @classact1 :sparkles: :thumbsup: :sparkles:
Buzz Tarek
@buzzth
Feb 28 2016 19:53
@MirPresT sorry how would you go about changing the display to block?
CamperBot
@camperbot
Feb 28 2016 19:53
:star: 279 | @classact1 | http://www.freecodecamp.com/classact1
Terrell Vest
@MirPresT
Feb 28 2016 19:55
// remove all your styles on the video box
.video-box {

}
// add display block and margin 0 auto to the iframe which holds the youtube vids

.video-box iframe{
  display: block;
  margin: 0 auto;
}
@Heaser what would you like to do to the text?
Yotam Levy
@Heaser
Feb 28 2016 19:56
I'd like the text to pulse
Terrell Vest
@MirPresT
Feb 28 2016 19:56
@Heaser but only the text and not the container correct?
Yotam Levy
@Heaser
Feb 28 2016 19:57
Correct.
Also I'm adding it via JQuery, because there's a condition in which the text pulsates.
Gordon Davidescu
@gordondavidescu
Feb 28 2016 19:57
Wow. Calling that api throws a 404 error
Terrell Vest
@MirPresT
Feb 28 2016 19:57
@heaser Would you prefer to use jquery or css to do the animation ?
Yotam Levy
@Heaser
Feb 28 2016 19:57
Jquery..
@MirPresT
Robert Richey
@0x0936
Feb 28 2016 19:58
@Heaser use jQuery to toggle a class that adds a css animation to pulse the text
Yotam Levy
@Heaser
Feb 28 2016 19:59
I did that, but the background pulsates as well.
Terrell Vest
@MirPresT
Feb 28 2016 19:59
@Heaser can I see your css ? Are you targeting the individual text element?
Yotam Levy
@Heaser
Feb 28 2016 19:59
@MirPresT Sure.
Nicholas
@nick88p
Feb 28 2016 19:59
Good day, Can someone please tell me how to loop through an AJAX request? - I've tried forEach, $.each, for loop, having the ajax request in the .push(here) for the array and nothing is working properly. Furthermore, I can't find any solutions online to this. Any help would be much appreciated. Here my latest attempt.
$(document).ready(function(){

  var users = ["freecodecamp", "storbeck", "terakilobyte", "habathcx","RobotCaleb","thomasballinger","noobs2ninjas","beohoff"];
  var baseURL = "https://api.twitch.tv/kraken/users/";
  var callBack = "?callback=?";
  var userInfo = [];

$.each(users,function(){
      $.ajax({
        type: "GET",
        url: baseURL + users + callBack,
        async: true,
        dataType: "jsonp",
        success: function (data) {
        userInfo.push(data);
        console.log(data);
        }
      });
    });
});
@MirPresT please reload, I had a bug in the code, Fixed it now
Terrell Vest
@MirPresT
Feb 28 2016 20:01
@Heaser which part are you trying to pulse cause right now the offline pulse looks like its working...
ok one sec
Yotam Levy
@Heaser
Feb 28 2016 20:01
Offline is pulsing, But the white background of the offline is pulsing as well @MirPresT
lcaptain47
@lcaptain47
Feb 28 2016 20:04
I'm quite stuck on what else I want to do with the tribute page. I know I would like to center the timeline text while keeping it aligned to the left, but I have yet to find a solution. This is what I have so far: http://codepen.io/lcaptain47/pen/xVxZMR I'm quite fine with critical feedback. Anything will help.
Terrell Vest
@MirPresT
Feb 28 2016 20:05
@Heaser where are the styles for the "its live " element ??? I dont seee them in the css ? are you linking another codepen ?
Buzz Tarek
@buzzth
Feb 28 2016 20:05
@MirPresT Everything is working better now. Thank you for your help.
CamperBot
@camperbot
Feb 28 2016 20:05
buzzth sends brownie points to @mirprest :sparkles: :thumbsup: :sparkles:
:star: 284 | @mirprest | http://www.freecodecamp.com/mirprest
Yotam Levy
@Heaser
Feb 28 2016 20:06
@MirPresT Nope.. I don't have them.
Terrell Vest
@MirPresT
Feb 28 2016 20:07
@Heaser oh I see it in the javascript... one sec
Sujit Karki
@Swoozeki
Feb 28 2016 20:07
@lcaptain47 Look into Bootstrap's grid system
lcaptain47
@lcaptain47
Feb 28 2016 20:07
Okay @Swoozeki I'll give it a shot.
Robert Richey
@0x0936
Feb 28 2016 20:08
@Heaser here is one way to fix it fork of your pen. basically put 'Offline' into a span given display inline-block. Updated jquery to target this span for the animation.
Gordon Davidescu
@gordondavidescu
Feb 28 2016 20:10
this is what I have now -- and it's giving me a 404 error
Yotam Levy
@Heaser
Feb 28 2016 20:10
Thank you @0x0936 but, Now the text does not pulsate.
CamperBot
@camperbot
Feb 28 2016 20:10
heaser sends brownie points to @0x0936 :sparkles: :thumbsup: :sparkles:
:star: 1208 | @0x0936 | http://www.freecodecamp.com/0x0936
Robert Richey
@0x0936
Feb 28 2016 20:10
@Heaser fixed. I made that change in dev console and forgot to put it in the pen. refresh to see it working
0x0936 @0x0936 forgot to make the span an inline-block
Yotam Levy
@Heaser
Feb 28 2016 20:11
Oh ok
Thank you!!
Terrell Vest
@MirPresT
Feb 28 2016 20:11
@Heaser I had fixed things as well but then the codepen crashed, I see someone else was helping as well. did you get it figure out ?
Robert Richey
@0x0936
Feb 28 2016 20:12
:+1: :)
Yotam Levy
@Heaser
Feb 28 2016 20:12
@MirPresT Thanks to both of you
CamperBot
@camperbot
Feb 28 2016 20:12
heaser sends brownie points to @mirprest :sparkles: :thumbsup: :sparkles:
:star: 285 | @mirprest | http://www.freecodecamp.com/mirprest
Yotam Levy
@Heaser
Feb 28 2016 20:12
Yup :)
Terrell Vest
@MirPresT
Feb 28 2016 20:12
Ok great.. Yea sometimes you just have to change the structure of your html
Yotam Levy
@Heaser
Feb 28 2016 20:14
I didn't even know what inline block was until now.. :P
Ishti
@Ishtiaque-Ahmed
Feb 28 2016 20:15
hello everyone
i am trying to design the portfolio page
but i am stuck
in the portfolio section i want to fit an image on another which will fade when mouse points to the image
but it does not fit(white space is seen and the go image is not fully loaded)
can anyone help?here is the link
http://codepen.io/Ishtiaque/pen/mVNpXj?editors=0100
RickWisneske
@rwisneske
Feb 28 2016 20:29
Need help removing the border-top or line break for the class of .navbar-collapse responsive nav menu at (max width: 768px). There is a thin white or gray line at the top of the responsive nav menu that I don't want.
http://codepen.io/rwhiskey/pen/ZQZRpM?editors=1100
Gordon Davidescu
@gordondavidescu
Feb 28 2016 20:32
if you run this, it talks about an unexpected token 'o' but i have no idea what that means
at least by using a different api the 404 is gone
so confused.
lcaptain47
@lcaptain47
Feb 28 2016 20:40
Thanks so much @Swoozeki. It looks so much better now.
CamperBot
@camperbot
Feb 28 2016 20:40
lcaptain47 sends brownie points to @swoozeki :sparkles: :thumbsup: :sparkles:
:star: 313 | @swoozeki | http://www.freecodecamp.com/swoozeki
Llandy3d
@Llandy3d
Feb 28 2016 20:41
I'm getting a strange 404 error, the page seems to be running something continuosly can someone check my code ? it was all working perfectly till I added lines 1-10 in javascript (geolocation) http://codepen.io/Llandy3d/pen/eZYPYN
Gordon Davidescu
@gordondavidescu
Feb 28 2016 20:49
tough crowd for weather writing folk today, @Llandy3d
I'm having problems with mine too
I couldn't get the free weather api to load so i 'bought' one from weather underground for $0
Rory
@HughCoyote
Feb 28 2016 20:52
This message was deleted
Gordon Davidescu
@gordondavidescu
Feb 28 2016 20:58
rut roh
did codepen just bite the big one temporarily (we hope)
Rory
@HughCoyote
Feb 28 2016 21:00
@gordondavidescu ? It's working here.
Gordon Davidescu
@gordondavidescu
Feb 28 2016 21:01
oh it was the function i was calling that made it go wonky
it had a huge error on the bottom and said tell us what happened that made this page appear
never seen that from a function
Matt Yamamoto
@MattYamamoto
Feb 28 2016 21:02
@Llandy3d your var location seemes to be causing your issue. I don't think that's a JS reserved word, but maybe it is in use by codepen? Not sure. Either rename that var, and/or (maybe "and" is best) wrap all your code in a function... since you're using jQuery just wrap it all in a $(document).ready(function() { }) to locally scope your var. But probably best to also rename it.
Llandy3d
@Llandy3d
Feb 28 2016 21:13
@MattYamamoto yeah noticed the name was causing the strange bug, new question thou I think this one will be hard, on line 10 now I got an alert();, if I remove it the code doesn't work, how is this even possible ? http://codepen.io/Llandy3d/pen/eZYPYN
Bruce Young
@mutantspore
Feb 28 2016 21:16
@Llandy3d is this legal function updateWeather(units = 'metric') {
Llandy3d
@Llandy3d
Feb 28 2016 21:17
@mutantspore yeah, the code with problems is only on line 1-10, everything else worked perfectly before the so added lines
Joseph Morse
@jnmorse
Feb 28 2016 21:19
function updateWeather(units = 'metric') is only legal in es6 syntax, so less your using babel, won't work
Bruce Young
@mutantspore
Feb 28 2016 21:19
@Llandy3d also you’ll have to call the updateWeather from inside the location finding function
@Llandy3d and some of the variables are out of scope
Nerando Johnson
@nerajno
Feb 28 2016 21:24
ok can I use bootstrap building my tribute page ?
Bruce Young
@mutantspore
Feb 28 2016 21:26
@nerajno yes the example does
Nerando Johnson
@nerajno
Feb 28 2016 21:27
thank you
Llandy3d
@Llandy3d
Feb 28 2016 21:29
@mutantspore I wanted to have a global variable address that would be changed first by the code to find the address and second be used by the code that gets the weather, this is possible right ?
Bruce Young
@mutantspore
Feb 28 2016 21:29
@Llandy3d removing that units bit and calling the updateWeather from within the location function.
http://codepen.io/MutantSpore/pen/GZRPbx?editors=1010
the getjson process are asynchronous
one has to be called from the other as you don’t know when it will be finished
Llandy3d
@Llandy3d
Feb 28 2016 21:30
oh I understand it now, then that's explains why the random alert was making it work
Gordon Davidescu
@gordondavidescu
Feb 28 2016 21:37
hey all. i'm having a dumb dude moment with mismatched brackets. looking at the first dozen lines are making my eyes bleed. can someone help me see where I am not closing properly
Llandy3d
@Llandy3d
Feb 28 2016 21:39
@gordondavidescu seems like line 17 after the }
Gordon Davidescu
@gordondavidescu
Feb 28 2016 21:40
am I missing one?
I mean am I missing a bracket?
Pete
@petegarvin1
Feb 28 2016 21:40
hey all, can you give me some feedback on this wiki viewer :D
http://codepen.io/petegarvin1/pen/JXjJrx
Llandy3d
@Llandy3d
Feb 28 2016 21:41
@gordondavidescu );
Gordon Davidescu
@gordondavidescu
Feb 28 2016 21:41
THANK YOU @Llandy3d
CamperBot
@camperbot
Feb 28 2016 21:41
gordondavidescu sends brownie points to @llandy3d :sparkles: :thumbsup: :sparkles:
:star: 274 | @llandy3d | http://www.freecodecamp.com/llandy3d
Llandy3d
@Llandy3d
Feb 28 2016 21:41
@gordondavidescu no worries
Pete
@petegarvin1
Feb 28 2016 21:44
@gordondavidescu
geocoder.geocode({
      'latLng': latlng
    }, function(results, status) {
      $scope.$apply(function() {

            if (status == google.maps.GeocoderStatus.OK) {

              if (results[0]) {
                for (var i = 0; i < results[0].address_components.length; i++) {
                  var postalCode = results[0].address_components[i].types;
                alert(postalCode);
                }

              }
            }
      });
                    }
                    );
Gordon Davidescu
@gordondavidescu
Feb 28 2016 21:44
thanks @Spacecamel100
CamperBot
@camperbot
Feb 28 2016 21:44
gordondavidescu sends brownie points to @spacecamel100 :sparkles: :thumbsup: :sparkles:
:star: 331 | @spacecamel100 | http://www.freecodecamp.com/spacecamel100
Pete
@petegarvin1
Feb 28 2016 21:44
@gordondavidescu no probs, i've lost many hours to the same issue
Gordon Davidescu
@gordondavidescu
Feb 28 2016 21:44
I did a little googling and came up with that for javascript zip code from geolocation
unfortunately, it absolutely still does not work
apparently geocoder is ruby on rails?
when I try to use the API from weather underground for latitude and longitude, it doesn't work
its api for using zip code does work, so I was hoping to find zip code using geolocation
but doing that turned into another thing that didn't worked
*didn't work
and meanwhile my 22 month old daughter (can I call her 2 years old yet) is running around the living room screaming and destroying everything when she's not sneezing on said things
Gordon Davidescu
@gordondavidescu
Feb 28 2016 21:55
she just discovered the joy of sticking a finger in my ear. joy for only one of us.
Lanitta
@DivaWeb
Feb 28 2016 22:04
hello my fellow campers
Gordon Davidescu
@gordondavidescu
Feb 28 2016 22:05
good lord absolutely nothign i have done today has worked
ZERO THINGS
nsloc22
@nsloc22
Feb 28 2016 22:06
@gordondavidescu seems about right in dev world
Gordon Davidescu
@gordondavidescu
Feb 28 2016 22:06
I'm better off deleting everything I've written today and starting again from 0
Lanitta
@DivaWeb
Feb 28 2016 22:06
@gordondavidescu close your eyes count to 50
Gordon Davidescu
@gordondavidescu
Feb 28 2016 22:06
lol thank you @DivaWeb
CamperBot
@camperbot
Feb 28 2016 22:06
gordondavidescu sends brownie points to @divaweb :sparkles: :thumbsup: :sparkles:
:star: 239 | @divaweb | http://www.freecodecamp.com/divaweb
Lanitta
@DivaWeb
Feb 28 2016 22:07
@gordondavidescu sometimes just removing your eyeballs from the screen makes difference lol
Gordon Davidescu
@gordondavidescu
Feb 28 2016 22:07
it's easier if I don't have this beautiful toddler screeching over every perceived slight
Lanitta
@DivaWeb
Feb 28 2016 22:09
@gordondavidescu yeah they have a way of being distracting lol
Orban Geoffrey
@Geo86
Feb 28 2016 22:31
Is there someone working on the symmetric difference
bonefire?
Ashraf-Farabi
@Ashraf-Farabi
Feb 28 2016 22:37
Hello guys, Can I get suggestions on how to start on "Show the local weather" Zipline. I am feeling lost :worried:
Noah Wilkie
@vultureroast
Feb 28 2016 22:46
Can somebody help me with the bootstrap thumbnails and why its giving me huge padding on the sides? http://codepen.io/vultureroast/full/QNWdgv/
Lanitta
@DivaWeb
Feb 28 2016 22:49
@vultureroast are trying to create a thumbnail or image
Noah Wilkie
@vultureroast
Feb 28 2016 22:50
@DivaWeb I just want to put an image with the quote underneath it
caption*
Lanitta
@DivaWeb
Feb 28 2016 22:52
@vultureroast I think you probably want to look at media image vs thumbnail
@vultureroast a thumbnail is a little bit different of a property in bootstrap
Noah Wilkie
@vultureroast
Feb 28 2016 22:56
@DivaWeb do you mean img-thumbnail vs thumbnail?
Lanitta
@DivaWeb
Feb 28 2016 22:58
@vultureroast no if you look at the bootstrap page and click on media image it will allow you to add your photo that fills your jumbotron
Noah Wilkie
@vultureroast
Feb 28 2016 23:01
Lanitta
@DivaWeb
Feb 28 2016 23:01

@vultureroast so you would leave out the stuff that positions it and and just do <div class="media>

<div class = "media object">
<img src="#" alt"#">
</div>
</div>

<div class="media>
<div class = "media object">
<img src="#" alt"#">
</div>
</div>
@vultureroast yes
Noah Wilkie
@vultureroast
Feb 28 2016 23:03
@DivaWeb but i want it to look like this http://codepen.io/FreeCodeCamp/full/wMQrXV/
Lanitta
@DivaWeb
Feb 28 2016 23:05
@vultureroast then you would just add class="caption" to your code
Joshua McKenzie
@mckenzieja
Feb 28 2016 23:08
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
  var lat = position.coords.latitude;
  var lon = position.coords.longitude;
  loadWeather(lat,lon);
  });

 } else {
   document.getElementbyId("city").innerHTML = "Either you did not allow your browser to ping your location or this browser is not supported.";
    }
var loadWeather = function(lat,lon){
var api = "&APPID=5074a9ca80f555b1f11ec89d51897dab";
var apiurl = "http://api.openweathermap.org/data/2.5/weather&lat="+lat+"&lon="+lon+api;
  $.ajax({
    type: 'GET',
    url: apiurl,
    dataType: 'jsonp',
    success: function(json){
        $("#city").text(json.name);
    };
});
};
Submitted for your review.
Joshua McKenzie
@mckenzieja
Feb 28 2016 23:25
For some reason it's not displaying the city name from the API.
Joshua McKenzie
@mckenzieja
Feb 28 2016 23:44
api url was off by one character
took me 2 hours.
Heather Kusmierz
@HKuz
Feb 28 2016 23:46
Anyone want to quickly test my Twitch app - I think I got it working properly. I know it looks a lot like the example, the creative juices were not flowing on this one... http://codepen.io/HKuz/pen/WwNdKY
Dan Stockham
@DanStockham
Feb 28 2016 23:56
Here I am thinking I am finished with this, and it's more broke then ever :(
A draw comes out when it is supposed to be a win and it's giving out the wrong winner.
Lanitta
@DivaWeb
Feb 28 2016 23:58
@DanStockham I tried playing and did not come up with issues
Dan Stockham
@DanStockham
Feb 28 2016 23:59
Try going into a forced draw and it will start screwing up.