These are chat archives for FreeCodeCamp/HelpFrontEnd

22nd
Jun 2016
Bailey
@coder7215
Jun 22 2016 00:08
Hi! How do I resize the grey "More to Come" box next to the embedded pen so that it is still in its column, but doesn't go all the way to the edges (so it takes up a similar amount of space to the embedded pen) Here is my current pen. I am referring to the "Projects" section: https://codepen.io/coder7215/pen/ezdoXr
Michael Karpinski
@karpimpski
Jun 22 2016 00:28
setTimeout(function(){ 
        time();
    }, 1000);
hey guys, haven't used JS in a long time. when I put this in my code, why doesn't it keep going? it only does the function one time
@coder7215 when i tried it, it worked to assign your <p> tag the id of "more" and manually set the size in CSS
for smaller screens you'd have to fix your bootstrap a lot
@coder7215 actually, it's not a hard thing to fix. it seems like switching your bootstrap columns from col-sm to col-xs works fine!
Ken Haduch
@khaduch
Jun 22 2016 00:32
@coder7215 - I just took a look at your page - I cannot see what you were asking about - the "More to come" box looks like it is not going to the edge?
Bailey
@coder7215
Jun 22 2016 00:32
thanks for your help @karpimpski I think I got it
CamperBot
@camperbot
Jun 22 2016 00:32
coder7215 sends brownie points to @karpimpski :sparkles: :thumbsup: :sparkles:
:cookie: 366 | @karpimpski |http://www.freecodecamp.com/karpimpski
Michael Karpinski
@karpimpski
Jun 22 2016 00:32
@khaduch I think he means on smaller screens, like in the preview. for me, using xs columns works
Amelia Pang
@AMPANG
Jun 22 2016 00:33
Hi there! Can anyone tell me why the links in my dropdown menu don’t work? http://codepen.io/ameliapang/pen/WwMxOX
Bailey
@coder7215
Jun 22 2016 00:35
@AMPANG Check this out: http://www.w3schools.com/bootstrap/bootstrap_navbar.asp If you scroll down it talks about dropdown menus
Amelia Pang
@AMPANG
Jun 22 2016 00:38
@coder7215 I still don't understand what I’m doing wrong to get the actual links working (linking to different parts of the page)
Ken Haduch
@khaduch
Jun 22 2016 00:41
@AMPANG - it's like those links are not clickable at all - I think that you have some strange construction of your HTML, with the <body> tag down below that. I wonder if somehow those links are "behind" the body? It doesn't make much sense?
@AMPANG - yeah, just on a whim, I set the CSS property "z-index: 10;" on your .dropdown-content class rules, and it makes the link clickable... So I think that it is "hidden" behind your page content?
Amelia Pang
@AMPANG
Jun 22 2016 00:44
OOH interesting! Thanks so much @KeniseCodes !
CamperBot
@camperbot
Jun 22 2016 00:44
ampang sends brownie points to @kenisecodes :sparkles: :thumbsup: :sparkles:
:cookie: 402 | @kenisecodes |http://www.freecodecamp.com/kenisecodes
Ken Haduch
@khaduch
Jun 22 2016 00:50
@AMPANG - I'm not sure how the bootstrap CSS code would handle something like this - it might be worth investigating to see if they use a z-index setting there?
Luke
@lukenetti3
Jun 22 2016 00:53
Hey guys quick question...I am working on the Local Weather project. I am using the API that FCC suggests, and it says I need a key, so I created the account and used the key, but do I need to make another call for the city location or is that the only url I need? ( the one with the api key).
Ken Haduch
@khaduch
Jun 22 2016 00:55
@lukenetti3 - you do have to make a call to get the location. You can use navigator.geolocation, but beware that it does not work in the Chrome browser unless you are using https://, and the openweather free api does not support https://. So you can use http://ip-api.com for location because you can then run both transactions in HTTP:
Luke
@lukenetti3
Jun 22 2016 00:59
@khaduch So should I not use the geolocation then? The API suggests using the city ID but not sure how I would go about locating that for each city. So for the http://ip-api.com is that after I use the weather api key?
Ken Haduch
@khaduch
Jun 22 2016 01:00
@lukenetti3 - no, you need to get the location somehow. I don't think that you can just get the city ID from anywhere? It might be fine if you know the city, like if you have the user enter their city name? I think that using a location site is the easiest way to go - call ip-api.com/json and get the latitude and longitude, then you can feed that into the openweather API query.
Luke
@lukenetti3
Jun 22 2016 01:04
@khaduch Okay, I think I see what you are saying. So by using the geolocation I can then use that info for the ip-api.com/json? Would I need to use a certain function to iterate the api to find the latitude and longitude match for whatever geolocation found?
@khaduch So, your saying don't use the open weather api then?
newBorn
@nafiskarim
Jun 22 2016 01:04
@/all hello all :) I have an problem idea and wondering if anyone can tell me what kina tool/library should i use to solve this
Problem : if I have an api that i will collect some data from, and i want to show the data in a graphical way on a web page. data is about traffic to a particullar website/page
Ken Haduch
@khaduch
Jun 22 2016 01:07
@lukenetti3 - no, the sequence of events is to make a JSON request to the ip-api.com (you can just click on the URL http://ip-api.com/json to see the return that you get. You access that with javascript code to get the "lat" and "lon" values, and then there is a way to feed that into the openweather API call to get the weather for that location. I don't think that you have to use openweather, but you have to find another free weather API service out there, which you can probably just google for and see what you can find. weatherunderground.com is something that I've seen a couple people use - not sure if it's any better?
Luke
@lukenetti3
Jun 22 2016 01:10
@khaduch Okay I think that makes sense. Sorry for the confusion. So why do I need that url to get the lat and long values, if I can just use the geolocation like I did in the FCC code challenge?
Ken Haduch
@khaduch
Jun 22 2016 01:40
@lukenetti3 - IF you are using the Chrome browser, you have to be using https:// transport to access the geolocation, but then you cannot use the openweather site, because the free version does not support https://, and you cannot mix the two transport mechanisms. Firefox does support the geolocation on http:// as far as I know, but you do not know which browser a user is going to be using to access your site. So you can get more complex and see if you cannot use geolocation, you can use the ip-api, if it's worth the extra trouble (might be a good learning experience, so maybe worth it?)
IndiraShrestha
@IndiraShrestha
Jun 22 2016 01:40
Hi all, I am working on the random quote generator
I wanted to know how to post the quote on twitter
Luke
@lukenetti3
Jun 22 2016 01:43
@khaduch Okay, so I am using the ip-api and I can get the long and lat values and then do I need to use the api to call the key first and then another getJSON to get the weather because it won't work without the key.
DJ Pelland
@dna113p
Jun 22 2016 01:47
@IndiraShrestha Hey, check out this link https://twitter.com/intent/tweet?hashtags=thisisatest&text=hello <<<< note the structure of the query... '?hashtags=thisisatest&text=hello'
Ken Haduch
@khaduch
Jun 22 2016 01:51
@lukenetti3 - no, there is a way in the call to openweather to use the latitude, longitude, and pass the api key (which is necessary to access the API site) all in one shot - look for that example on the http://openweathermap.org/current documentation page - look for "By geographic coordinates", an example link they give is this: api.openweathermap.org/data/2.5/weather?lat=35&lon=139 - and you'd have to add the parameter with your key in there, as well. http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=b1b15e88fa797225412429c1c50c122a is the example for that link, using their appid. And that link doesn't work, but if you plug a valid API key in there, then it should... but you'll get it in your app...
Luke
@lukenetti3
Jun 22 2016 01:52
@khaduch Yeah I just found that. Thanks for all the help! really appreciate it!
CamperBot
@camperbot
Jun 22 2016 01:52
lukenetti3 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1362 | @khaduch |http://www.freecodecamp.com/khaduch
Gabriel Alexandre
@GabrielShaad
Jun 22 2016 01:58
Hey people! Is anybody available to answer a question?
Ryan
@ispeakcomputer
Jun 22 2016 01:59
Hello everyones
@GabrielShaad post it up . ill help if and can. im not good though
Gabriel Alexandre
@GabrielShaad
Jun 22 2016 01:59
I am trying to apply a hsla transparency over my image on the portfolio project, but it is not applying. Why? http://codepen.io/gabrielshaad/pen/BzLRdm?editors=1100
Greg Duncan
@GregatGit
Jun 22 2016 02:00
@IndiraShrestha I just implemented that and found this to be a huge help http://gpiot.com/blog/elegant-twitter-share-button-and-dialog-with-jquery/
Ryan
@ispeakcomputer
Jun 22 2016 02:02
ah man you got me there. I hope someone else can help you here.
im interested to know as well
Gabriel Alexandre
@GabrielShaad
Jun 22 2016 02:02
@needsMoreCoffee no worries, thanks anyway!
CamperBot
@camperbot
Jun 22 2016 02:02
gabrielshaad sends brownie points to @needsmorecoffee :sparkles: :thumbsup: :sparkles:
:cookie: 312 | @needsmorecoffee |http://www.freecodecamp.com/needsmorecoffee
David Liendo
@DavLiendoProgramming
Jun 22 2016 02:05
hey guys
i have a question
im on the tribute step, and i want to share my progress with a friend
how do i do that?
JamesQuillin
@JamesQuillin
Jun 22 2016 02:06

Hi everyone! I'm hoping someone might help me with my portfolio on a bug.

I am pretty satisfied so far with my portfolio (and any criticism is welcome!) but when i am on mobile (like pulling it up in my phone) the collapsed menu appears and disappears correctly but the links to different parts of the page do not work. It DOES work on all sizes (collapsed and regular) in the browser though.
There might be some connection to this S.O. post

http://stackoverflow.com/questions/17435359/bootstrap-collapsed-menu-links-not-working-on-mobile-devices

but I'm not sure if that is current or relevant. I just can't figure it out. Maybe it's a problem with the codepen platform? Any ideas on how to fix?

Here is the pen:

http://codepen.io/j1330/pen/reKzxr

Greg Duncan
@GregatGit
Jun 22 2016 02:06
@GabrielShaad are you doing it in the css?
Gabriel Alexandre
@GabrielShaad
Jun 22 2016 02:07
@DavLiendoProgramming just copy the url of your project and send to him.
Ryan
@ispeakcomputer
Jun 22 2016 02:07
guys , get this. My weather api needs http and my geolocation needs https. LAME.
looks like I can use a diff API for weather to use HTTPS . http://forum.freecodecamp.com/t/weather-app-weather-api-callback-not-working/11731/3
Greg Duncan
@GregatGit
Jun 22 2016 02:07
@needsMoreCoffee use http://ip-api.com/json to get your location
Gabriel Alexandre
@GabrielShaad
Jun 22 2016 02:08
@GregatGit Yes, I tried to use a class and apply the color-background attribute. It simply does not work and I don't know why.
@GregatGit I have done the same on a previous project and it is fine.
Luke
@lukenetti3
Jun 22 2016 02:09
Can someone show me how to access this API? I want to access the temp? Ihttp://api.openweathermap.org/data/2.5/weather?lat=43.4464&lon=-76.3971&APPID=e48ee4aaa640e2c29127ac3ccddb675c
Ryan
@ispeakcomputer
Jun 22 2016 02:09
@GregatGit yes man thanks a tons. so easy too
CamperBot
@camperbot
Jun 22 2016 02:09
needsmorecoffee sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 616 | @gregatgit |http://www.freecodecamp.com/gregatgit
David Liendo
@DavLiendoProgramming
Jun 22 2016 02:10
thank you @GabrielShaad
CamperBot
@camperbot
Jun 22 2016 02:10
:warning: could not find receiver for gabrielshaad
davliendoprogramming sends brownie points to @gabrielshaad :sparkles: :thumbsup: :sparkles:
Ryan
@ispeakcomputer
Jun 22 2016 02:10
@luke
$( document ).ready(function() {
var zipcode = 36360;
$.getJSON( "http://api.openweathermap.org/data/2.5/weather?&APPID=a5b84f49b6412d3c42bb6f8a8a3cbef8&zip=" + zipcode + ",us" , function (data){
console.log(data.weather);
but you must use over HTTP
Greg Duncan
@GregatGit
Jun 22 2016 02:10
@lukenetti3
$.getJSON(api, function(data){
    console.log(data);
}
@GabrielShaad what line in the css did you do it?
Luke
@lukenetti3
Jun 22 2016 02:12
Here is my code. Aren't I doing that?
http://codepen.io/lukenetti3/pen/ezBgvm?editors=0010
Greg Duncan
@GregatGit
Jun 22 2016 02:12
@lukenetti3 put http:// in front
Gabriel Alexandre
@GabrielShaad
Jun 22 2016 02:13
@GregatGit sorry, I forgot to save: Here it goes: http://codepen.io/gabrielshaad/pen/BzLRdm?editors=1100
Luke
@lukenetti3
Jun 22 2016 02:15
@GregatGit I did that and I am still having problems
Moisés Man
@moigithub
Jun 22 2016 02:18
@lukenetti3 probably u should add
console.log(weatherTemp) first
and check what that api returns...
Greg Duncan
@GregatGit
Jun 22 2016 02:18
@lukenetti3
var url = "http://api.openweathermap.org/data/2.5/weather?lat=43.4464&lon=-76.3971&APPID=e48ee4aaa640e2c29127ac3ccddb675c";
  $.getJSON(url, function(data) {
    console.log(data);
    $weatherTemp.html(weatherTemp.temp)
  });
}
Moisés Man
@moigithub
Jun 22 2016 02:18
:+1: @GregatGit
Greg Duncan
@GregatGit
Jun 22 2016 02:19
@GabrielShaad which line in the css is meant to change it?
Moisés Man
@moigithub
Jun 22 2016 02:20
@lukenetti3 i have installed a json view addon on my chrome browser....this is what i get
api
sooo
.temp is inside main
soo .. to access temp.. u should do
data.main.temp or weatherTemp.data.temp (whatever variable u use)
Luke
@lukenetti3
Jun 22 2016 02:21
@moigithub @GregatGit I tried the console.log(weatherTemp) before the $weatherTemp.html call and I still can't seem to display anything.
Moisés Man
@moigithub
Jun 22 2016 02:22
u need to open ur browser console to see it...
F12 or control +shift + J
also.. console.log(...) should be inside ur callback.. only place ur data is available
Greg Duncan
@GregatGit
Jun 22 2016 02:22
@lukenetti3 thats because you haven't put anything in #weather
buckshot307
@buckshot307
Jun 22 2016 02:23
can someone tell me why this is too wide? I can't get the horizontal scrollbar to go away
Luke
@lukenetti3
Jun 22 2016 02:24
@GregatGit Aren't I doing that when I create the variable $weatherTemp?
Greg Duncan
@GregatGit
Jun 22 2016 02:24
@lukenetti3 this $weatherTemp.html(weatherTemp.temp) will not do anything until weatherTemp.temp has some value
@lukenetti3 Aren't I doing that when I create the variable $weatherTemp? No
JamesQuillin
@JamesQuillin
Jun 22 2016 02:26
I know no one replied but in case anyone can read this log and has the same problem it turns out Bootstrap is broken and that's why I had the problem
at least up to 3x. Idk about 4x.
Luke
@lukenetti3
Jun 22 2016 02:27
@GregatGit Okay I see what your saying. Why doesn't weatherTemp.temp contain the number in the link when I open it?
@GregatGit I got it. Thanks!
CamperBot
@camperbot
Jun 22 2016 02:27
lukenetti3 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 617 | @gregatgit |http://www.freecodecamp.com/gregatgit
Moisés Man
@moigithub
Jun 22 2016 02:28
@lukenetti3 check the console... ur json object dont contain a temp.. but a main --> temp
Luke
@lukenetti3
Jun 22 2016 02:28
@GregatGit Sorry I was so confused, realized what I was missing.
@moigithub Thanks!
CamperBot
@camperbot
Jun 22 2016 02:28
lukenetti3 sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 1491 | @moigithub |http://www.freecodecamp.com/moigithub
Greg Duncan
@GregatGit
Jun 22 2016 02:30
@lukenetti3 try to give things clearly different names - so that data you get from getJSON - call it data or json - rather than weatherTemp
Luke
@lukenetti3
Jun 22 2016 02:32
@GregatGit Okay, thanks! I appreciate it
CamperBot
@camperbot
Jun 22 2016 02:32
lukenetti3 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:warning: lukenetti3 already gave gregatgit points
Is there a better way to call props from multiple JSON objects?
buiphuking
@buiphuking
Jun 22 2016 02:33
how to unclick a button, guys ?????????
Gabriel Alexandre
@GabrielShaad
Jun 22 2016 02:35
@GregatGit line 51
Ken Haduch
@khaduch
Jun 22 2016 02:43

@buckshot307 - a couple things - your image is coming from imgur, and imgur does not allow you to cross-link images. The next thing is that you might be developing on another platform and just uploading to codepen, but you are not allowed to have the <html>, <head>, <body> tags in the HTML panel. Codepen uses a template that provides those and fills in the information from all of the editor panels and external resource settings. (Just so you know about it. It generates invalid HTML for your page when you have the codepen page set up the way you have it.)

So without seeing the image, it is hard to tell if it still had the behavior that you are asking about. You need to use another on-line accessible source for your image.

Arsalan Sabir
@aayanqazi
Jun 22 2016 02:44
Hey
Ken Haduch
@khaduch
Jun 22 2016 02:44
@buiphuking - I'm sorry, I don't understand what you are asking? "Unclick a button"? please explain
Arsalan Sabir
@aayanqazi
Jun 22 2016 02:44
How can i make a default submit button ??
When i click enter button clicked ??
?????
Norvin Burrus
@ndburrus
Jun 22 2016 02:47
@moigithub ...nice addon... :sparkles: nifty...
Greg Duncan
@GregatGit
Jun 22 2016 02:52
@GabrielShaad so you want it when it hovers over "TESTING" to affect the image but not "TESTING"
Gabriel Alexandre
@GabrielShaad
Jun 22 2016 03:00
@GregatGit Not necessarily. I just want to make the transparency over the image
Greg Duncan
@GregatGit
Jun 22 2016 03:03
@GabrielShaad you should be selecting the image and not the div below it
Gabriel Alexandre
@GabrielShaad
Jun 22 2016 03:04
@GregatGit Oh I see
@GregatGit And do you think I will be able to write over it?
Greg Duncan
@GregatGit
Jun 22 2016 03:05
because you have only one image for now just use
img{
   // and start playing around in here
}
@GabrielShaad that image is deceptively large it takes a whole page
Gabriel Alexandre
@GabrielShaad
Jun 22 2016 03:09
@GregatGit Should I modify it to be smaller?
Greg Duncan
@GregatGit
Jun 22 2016 03:10
If it's your image i would crop it right down -its way too big (if you just want the circle part)
Arsalan Sabir
@aayanqazi
Jun 22 2016 03:11
Some one help me please
?
JD Tadlock
@jdtdesigns
Jun 22 2016 03:16
@aayanqazi You have to post a question to get an answer
Gabriel Alexandre
@GabrielShaad
Jun 22 2016 03:29
@GregatGit I was trying to make it the background and the transparency over it, with some text about me.
Arsalan Sabir
@aayanqazi
Jun 22 2016 03:31
I am using wikipedia api ... If No Result found so i want to show that no result found
Is any method to indicate that property not found in json ??
JD Tadlock
@jdtdesigns
Jun 22 2016 03:32
if ( data.query ) {
  //show result
} else {
  // show not found
}
@aayanqazi
Arsalan Sabir
@aayanqazi
Jun 22 2016 03:33
I did it .. but not working ...
JD Tadlock
@jdtdesigns
Jun 22 2016 03:33
post your codepen
buckshot307
@buckshot307
Jun 22 2016 03:37
@khaduch yeah I was building it for my website but it's got the extra width on both my website and on codepen, the <head> tags work though because some of the css is only in those tags. The image thing shouldn't matter though since it's just a placeholder for the one hosted on my site.
JD Tadlock
@jdtdesigns
Jun 22 2016 03:43
@aayanqazi You're using the .each() below the if/else which is overriding the if/else
append the html for the results in the if and append the not found in the else
still not working
JD Tadlock
@jdtdesigns
Jun 22 2016 03:47
Still the same @aayanqazi
Arsalan Sabir
@aayanqazi
Jun 22 2016 03:48
Wait..
now check it
buckshot307
@buckshot307
Jun 22 2016 03:51
@khaduch got it. One of the rows was too wide for some reason. Setting the width to 100% fixed it.
your datatab variable was failing and causing the js to break
you need to set it from within the the if so it has content
Arsalan Sabir
@aayanqazi
Jun 22 2016 03:54
That greatt Thank youu SOoo Much @jdtdesigns
CamperBot
@camperbot
Jun 22 2016 03:54
aayanqazi sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 543 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Jun 22 2016 03:55
;)
buiphuking
@buiphuking
Jun 22 2016 04:18
hi guys, i want #led over #strict, help me guys......
http://codepen.io/buiphuking/pen/aZmWbx?editors=1100
Lemmy
@imnotlammy
Jun 22 2016 04:25
description = status === "online" ? ': ' + data.status : "";
Can someone explain what's happening here?
JD Tadlock
@jdtdesigns
Jun 22 2016 04:25
@buiphuking Totally not something you should build with boostrap. Just so you're aware, it's completely broken.
@imnotlammy it's a ternary expression
like a logical setter
Lemmy
@imnotlammy
Jun 22 2016 04:26
like if statement?
I'll look it up
thanks
@jdtdesigns ty
CamperBot
@camperbot
Jun 22 2016 04:26
imnotlammy sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 544 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Jun 22 2016 04:27
if status equals 'online', description will equal ': ' + data.status, else it will equal an empty string
@imnotlammy welcome ;)
Lemmy
@imnotlammy
Jun 22 2016 04:45
var channels = ["freecodecamp", "storbeck", "terakilobyte", "habathcx","RobotCaleb","thomasballinger","noobs2ninjas","beohoff","brunofin","comster404","test_channel","cretetion","sheevergaming","TR7K","OgamingSC2","ESL_SC2"];

function getInfo() {
  channels.forEach(function(channel) {
    function makeURL (type, name) {
      return 'https://api.twitch.tv/kraken/' + type + '/' + name;
    };
    $.getJSON(makeURL("streams", channel), function(data) {
      var game, status;
      if (data.stream === null) {
        game = "offline";
        status = "offline"
      }
      else if (data.stream === undefined) {
        game = "account closed";
        status = "offline";
      }
      else {
        game = data.stream.game;
        status = "online";
      }
    })
    $.getJSON(makeURL("channels", channel),function(data) {
      var logo = data.logo != null ? data.logo : "http://s.jtvnw.net/jtv_user_pictures/hosted_images/GlitchIcon_WhiteonPurple.png";
      var description = status === "online" ? data.status : "offline";
      var html = "<div class='media'><a class='media-left' href="+data.url+"><img class='media-object' src="+logo+"></a><div class='media-body media-middle'><h4 class='media-heading'>"+data.name+"</h4>"+description+"</div></div>";
      status === "online" ? $('#output').prepend(html) : $('#output').append(html);
    })
  })
}

$(document).ready(function () {
  getInfo();
})
not working :worried:
JD Tadlock
@jdtdesigns
Jun 22 2016 04:58
@imnotlammy You're setting the variables game and status inside the first getJSON, so they will scoped to that function and not accessible from outside the function. Also, you're missing a few semicolons.
Lemmy
@imnotlammy
Jun 22 2016 05:14
@jdtdesigns but I am not calling game or status in the second JSON?
unless you're referring to when am setting var description
JD Tadlock
@jdtdesigns
Jun 22 2016 05:14
var description = status === "online"
status === "online" ?
Lemmy
@imnotlammy
Jun 22 2016 05:16
I commented that line out
but still doesn't work :(
should I declare the var status at the very beginning?
@jdtdesigns
JD Tadlock
@jdtdesigns
Jun 22 2016 05:18
@imnotlammy Try creating it at the top of the getInfo function (var status;),
Lemmy
@imnotlammy
Jun 22 2016 05:19
@jdtdesigns moot
var channels = ["freecodecamp", "storbeck", "terakilobyte", "habathcx","RobotCaleb","thomasballinger","noobs2ninjas","beohoff","brunofin","comster404","test_channel","cretetion","sheevergaming","TR7K","OgamingSC2","ESL_SC2"];

function getInfo() {
  var status;
  channels.forEach(function(channel) {
    function makeURL (type, name) {
      return 'https://api.twitch.tv/kraken/' + type + '/' + name;
    };
    $.getJSON(makeURL("streams", channel), function(data) {

      if (data.stream === null) {
        status = "offline"
      }
      else if (data.stream === undefined) {
        status = "account closed";
      }
      else {
        game = data.stream.game;
        status = "online";
      }
    })
    $.getJSON(makeURL("channels", channel),function(data) {
      var logo = data.logo != null ? data.logo : "http://s.jtvnw.net/jtv_user_pictures/hosted_images/GlitchIcon_WhiteonPurple.png";
      var description = data.status
      var html = "<div class='media'><a class='media-left' href="+data.url+"><img class='media-object' src="+logo+"></a><div class='media-body media-middle'><h4 class='media-heading'>"+data.name+"</h4>" + description + "</div></div>";
      $('#output').append(html);
    });
  });
};

$(document).ready(function () {
  getInfo();
});
JD Tadlock
@jdtdesigns
Jun 22 2016 05:21
@imnotlammy Any of the variables you're using inside the first getJSON will not be viewable to the second getJSON because you're not calling it in order. This data is async so it will not load instantly.
Lemmy
@imnotlammy
Jun 22 2016 05:22
@jdtdesigns I already changed the code so the second getJSON doesn't call any values from the frist
var description = data.status;
@jdtdesigns hahah fixed it
JD Tadlock
@jdtdesigns
Jun 22 2016 05:23
@imnotlammy You got it working?
Lemmy
@imnotlammy
Jun 22 2016 05:23
problem was in my html 😅😅
JD Tadlock
@jdtdesigns
Jun 22 2016 05:24
@imnotlammy You need semi-colons lol
Kenzo Mendoza
@KenzoM
Jun 22 2016 05:26
hello all
maybe I am way over thinking , but I spent couple days on tic tac toe with no progress. Essentially I keep re-writing my entire code because I am trying to implement with Object Oriented, as well AI(minmax) but I just can't seem to get it..
what helped you guys organize your code in OO? Conceptually I understand OO, but execution is another story for me
Utkarsh Bhimte
@Utkarshbhimte
Jun 22 2016 05:42
Review for this and any suggestions. https://utkarshbhimte.github.io/DashBoard-Prototype-2
Shukrullah shirzad
@Shukrullahshirzad
Jun 22 2016 05:43
hi guys
i have problem with my first project
Lemmy
@imnotlammy
Jun 22 2016 05:43
@jdtdesigns haha will add them
@jdtdesigns thanks for the help!
CamperBot
@camperbot
Jun 22 2016 05:43
imnotlammy sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 545 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Shukrullah shirzad
@Shukrullahshirzad
Jun 22 2016 05:44
how can i find my mistakes in my work
kirbyedy
@kirbyedy
Jun 22 2016 05:46
@Shukrullahshirzad be more specific, we dont know what are you working on
Utkarsh Bhimte
@Utkarshbhimte
Jun 22 2016 05:50
https://utkarshbhimte.github.io/DashBoard-Prototype-2 Also I can get the #logo to go 'height : 100%;', If you decrease the screen width of your browser you will know what I am talking about.
Muhammad Farhan Bin Brohan
@FarhanBrohan
Jun 22 2016 05:55
How do I form submit ?
Shukrullah shirzad
@Shukrullahshirzad
Jun 22 2016 05:58
im working in building a tribute page
and i cant bring the list into the middle of the page
i tried align= center it doesnt work
kirbyedy
@kirbyedy
Jun 22 2016 06:00
can we see your code ?
Shukrullah shirzad
@Shukrullahshirzad
Jun 22 2016 06:00
yeh
Shukrullah shirzad
@Shukrullahshirzad
Jun 22 2016 06:06
@kirbyedy r u there?
kirbyedy
@kirbyedy
Jun 22 2016 06:07
@Shukrullahshirzad it is centered on the page, or you mean the bullets ?
Shukrullah shirzad
@Shukrullahshirzad
Jun 22 2016 06:07
yes
the bullets
and i also have problem with div
i dont know the functionality of this element
kirbyedy
@kirbyedy
Jun 22 2016 06:10
try adding this to ul list
display: inline-block;
        text-align:left;
but you should really consider moving all styling to the css part of the codepen
Shukrullah shirzad
@Shukrullahshirzad
Jun 22 2016 06:11
but they say in the video the they didnt use CSS
purnendutiwari
@purnendutiwari
Jun 22 2016 06:12
@Shukrullahshirzad there is something called offset in bootstrap
in grid system
this will help you make the around the center
search grid system in google
this will help you make list appear the around the center
kirbyedy
@kirbyedy
Jun 22 2016 06:16
@Shukrullahshirzad check this: http://jsfiddle.net/fNFYr/25/
Shukrullah shirzad
@Shukrullahshirzad
Jun 22 2016 06:17
they have used some div and class= col
kirbyedy
@kirbyedy
Jun 22 2016 06:18
@Shukrullahshirzad thats bootstrap framework most probably
you might consider learning about that, as @purnendutiwari said
Shukrullah shirzad
@Shukrullahshirzad
Jun 22 2016 06:20
ok thank guys i'll try it
;)
purnendutiwari
@purnendutiwari
Jun 22 2016 06:22
@Shukrullahshirzad :smile:
Tim
@t1flanagan
Jun 22 2016 06:24
Hey gang. I'm going to start my Random Quote Machine tomorrow. Is it best to build the functionality of the site first and then give it some style?
Shukrullah shirzad
@Shukrullahshirzad
Jun 22 2016 06:25
when i submit my work the page accept it without any reply whether its right or wrong
purnendutiwari
@purnendutiwari
Jun 22 2016 06:26
@t1flanagan can't say ...stuck at my portfolio
kirbyedy
@kirbyedy
Jun 22 2016 06:26
@t1flanagan its up to you
I did the js part first, then the styling
Shukrullah shirzad
@Shukrullahshirzad
Jun 22 2016 06:27
@purnendutiwari :+1:
Tim
@t1flanagan
Jun 22 2016 06:27
Hmm okay. I think the functionality of the site will be the hardest, so it makes sense to me to do that first.
@purnendutiwari I've been there :) Just keep trucking.
Randy Goldsmith
@Dueldrawer8
Jun 22 2016 06:29
@t1flanagan for earlier projects i think you should focus on the fuctionality since learning how make the javascript work is the most important to learn. But I learned recently that we should create the markup first and then focus on functionality and then style it the way you want
purnendutiwari
@purnendutiwari
Jun 22 2016 06:29
@t1flanagan hmm :smile:
@Shukrullahshirzad : i too didn't get the reply about completion, you can post the link and keep improving it until its similar to page by FCC
Lemmy
@imnotlammy
Jun 22 2016 06:35
`
var channels = ["freecodecamp", "storbeck", "terakilobyte", "habathcx","RobotCaleb","thomasballinger","noobs2ninjas","beohoff","brunofin","comster404","test_channel","cretetion","sheevergaming","TR7K","OgamingSC2","ESL_SC2", "SuperMCGamer"];

function getInfo() {
  var status;
  channels.forEach(function(channel) {
    function makeURL (type, name) {
      return 'https://api.twitch.tv/kraken/' + type + '/' + name + "?callback=?";
    };
    $.getJSON(makeURL("streams", channel), function(data) {    
      if (data.stream == null) {
        status = "offline"
      }
      else if (data.status == 422) {
        status = "account closed";
      }
      else if (data.status == 404) {
        status = "error";
      }
      else {
        status = "online";
      };
    });
    $.getJSON(makeURL("channels", channel),function(data) {
      var description = status == "online" ? data.status : status;
      var logo = data.logo != null ? data.logo : "http://s.jtvnw.net/jtv_user_pictures/hosted_images/GlitchIcon_WhiteonPurple.png";
      var html = "<div class='media "+ status +"'><a class='media-left' href='" + data.url + "'><img class='media-object' src='" + logo + "'></a><div class='media-body media-middle'><h4 class='media-heading'>" + data.display_name + "</h4>" + description + "</div></div>";
      status === "online" ? $('#output').prepend() : $('#output').append(html);
    });
  });
};

$(document).ready(function () {
  getInfo();
});
seems my code can't interate past the first if statement
it only display's channels that are offline
kirbyedy
@kirbyedy
Jun 22 2016 06:37
the if hits the first offline and quits
Lemmy
@imnotlammy
Jun 22 2016 06:37
@kirbyedy how to fix
kirbyedy
@kirbyedy
Jun 22 2016 06:38
I think I used forEach instead of if
Lemmy
@imnotlammy
Jun 22 2016 06:39
Can you provide example? @kirbyedy
It was actually working earlier,
Lemmy
@imnotlammy
Jun 22 2016 06:41
@kirbyedy Do I have to call forEach twice then?
since I already called it before
Randy Goldsmith
@Dueldrawer8
Jun 22 2016 06:43
@imnotlammy can u provide a link to your codepen?
kirbyedy
@kirbyedy
Jun 22 2016 06:43
@imnotlammy I dont think so, call json inside forEach
Islam Ibakaev
@dagman
Jun 22 2016 06:48
very useful tips if you are using codepen as playground -> http://www.hongkiat.com/blog/codepen-tips-beginners/
Lemmy
@imnotlammy
Jun 22 2016 06:58
:(:(
@Dueldrawer8 any luck?
Randy Goldsmith
@Dueldrawer8
Jun 22 2016 06:59
@imnotlammy not yet..
Abdullah Hoosen
@abdullahhoosen
Jun 22 2016 07:01

Hi..can need help with this.. returns true for some only

function confirmEnding(str, target) {
// "Never give up and good luck will find you."
// -- Falcor

 if(str.substr(-1) === target){
   return true;
 }
 else{
   return false;
 }

}

confirmEnding("Bastian", "n");

Chris Cullen
@123xylem
Jun 22 2016 07:04
function checkCashRegister(price, cash, cid) {
var val;
  var cost=arguments[0];
  var money=arguments[1];
var till= arguments[2];
  var count=0;
  var arr=[];
  var change= money-cost;
 var tillCount=0;
  var chgCount=0;
var convertedTill=[];
  var jCount=0;

  var denoms = [0.01,0.05, 0.1, 0.25, 1, 5, 10, 20, 100];
for (var t = 0;t < till.length; t++) {
  till[t].push(denoms[t]);}

  if(change<0){
  change=Math.abs(change);}//this makes change positive if its negative value
else change=change;


  for(i=0; i<till.length;i++){
   count+=till[i][1];}
    if(change>count){ 
    return "Insufficient Funds";
// Make a count that totals till values. If change is more than till then say so

  }  else{
    var chgArr=[];
  for(j=till.length-1;j>=0;j--){  
    var amountOfType=till[j][1]/till[j][2];//How many of each coin do u have?
    till[j].push(amountOfType);


    while(change>chgCount&& till[j][1]>0 &&change!==chgCount ){// HOW DO I MAKE till[i][1]<=change NOT FAIL on while loop? I can use if but not sure how to use an if here??      
      change = Math.round(change * 100) / 100;

  if(till[j][1]<=change){
      chgCount+=till[j][2];  
      change-=till[j][2];
    jCount+=1;



    }
    else{j--;}}
        }  return chgArr;
  }
}
checkCashRegister(19, 20.00, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.10], ["QUARTER", 4.25], ["ONE", 90.00], ["FIVE", 55.00], ["TEN", 20.00], ["TWENTY", 60.00], ["ONE HUNDRED", 100.00]]);
ANy1 know why this says 1 is undefined? It seems to work and not work at different change numbers... It works but the last thing I need to do is delete duplicates when it returns array.
Steve Wilcox
@ThinknBoutStuff
Jun 22 2016 07:32
This message was deleted
NatixDev
@NatixDev
Jun 22 2016 08:09
Hi guys, like everyday, there is now another bug in my weather app to change Celsius to Fahrenheit and reverse it, I tried everything, if else, .toggle(), addclass and removeclass, It won't work... https://codepen.io/NatixDev/pen/beVdPp
manasibs
@manasibs
Jun 22 2016 08:14
Hi!! anyone had a problem in implementing Tweet button in Random Quote machine? I am not able to replace data-text of Tweet button with the quote
Daniel O'Mahony
@OMahonyD
Jun 22 2016 08:54
Hey all! Having some trouble with the final part of the pomodoro project. Basically all I have now is a stopwatch but for some reason, no matter what I do I can't set up a user defined choice for the length of the session. Would anyone have any suggestions or pointers on how to proceed? Thanks as always! http://codepen.io/danomah/pen/oLxmdw?editors=0010
Daniel O'Mahony
@OMahonyD
Jun 22 2016 09:01
@manasibs I remember having some trouble with that yes. Can't remember how I fixed it but have a look at my pen here and it might be of some help. http://codepen.io/danomah/pen/MyYWbo
manasibs
@manasibs
Jun 22 2016 09:02
@OMahonyD Thanks
CamperBot
@camperbot
Jun 22 2016 09:02
manasibs sends brownie points to @omahonyd :sparkles: :thumbsup: :sparkles:
:cookie: 407 | @omahonyd |http://www.freecodecamp.com/omahonyd
Daniel O'Mahony
@OMahonyD
Jun 22 2016 09:07
@manasibs np
Jwolf
@snowjames007
Jun 22 2016 09:15
anybody knows how to get "random quote"?
Faisal Zulfiqar
@faisal1337
Jun 22 2016 09:17
Hello. I made the tribute page. I coded it myself but I pulled the content from the example page. Will it get accepted or rejected? I haven't copied the code from original tribute page.
Faisal Zulfiqar
@faisal1337
Jun 22 2016 09:22
Somebody?
Daniel O'Mahony
@OMahonyD
Jun 22 2016 09:23
@faisal1337 That's great! We all borrow from each other's experience so I wouldn't be worried. Well done!
@faisal1337 Why not try giving it a bit of personal flair? Maybe, put some extra columns in to separate the lists or change heading colors etc?
Faisal Zulfiqar
@faisal1337
Jun 22 2016 09:28
@OMahonyD Alright. But someone said that FCC don't give certificate if your project looks like a copy.
I will personalize it more.
Marco Mazzeo
@Doko85
Jun 22 2016 09:28
if you copy the whole project and skip the challenge I guess
Faisal Zulfiqar
@faisal1337
Jun 22 2016 09:31
@Doko85 What if my code is different?
Marco Mazzeo
@Doko85
Jun 22 2016 09:31
that's what I meant, if your code is different then you are ok
if you just opened the example page and copied the whole code and completed the challenge that way they won't give you the certificate I guess
'cause you aren't showing them you have proven hard yourself trying to figure out how to do it
Faisal Zulfiqar
@faisal1337
Jun 22 2016 09:37
@Doko85 I just compared the two. And my code is different but not much. Because it was simple page and the approach was same. The thing that's different is the assigning column classes to the <ul> he used some complicated bootstrap classes and I used simple column class. And my CSS is different. I think I should change the content. Just to be on the safe side.
Marco Mazzeo
@Doko85
Jun 22 2016 09:37
yeah
Marco Mazzeo
@Doko85
Jun 22 2016 09:52
guys what would you use to design a few blocks of divs that have two contents that overlays? like the chat avatars here on the right, with a square div for the personal image and a circle one showing the online status
Joshua Whalen
@CyberSurferX
Jun 22 2016 09:55
@Doko85 Are you trying to implement this elsewhere? I wouldn't use divs to accomplish the task.
Marco Mazzeo
@Doko85
Jun 22 2016 09:55
yes
there are the three big circles, each of them contains a span with a little circle, all of them are overlaying on the first big circle tho
Ken Haduch
@khaduch
Jun 22 2016 09:59
@abdullahhoosen - some of the ending values that they give are longer than one character, so you must account for that in your code
Sorin Ruse
@sorinr
Jun 22 2016 10:02
@Doko85 for me the "switch" button changing from c to f does not work and the app its not media responsive
muckmack
@muckmack
Jun 22 2016 10:04
hey guys nice to meet you. freecodecamp is great. it helps me like i need it. i just finished the html course.now i am on the point where you build ur own project with codepen. but i think i am not ready enough for the projects they give me. wont i come back to the editor where they explain how to use code? from now i will code only with codepen ? i dont hope so because i am not ready for building a personal portfolio webpage. i hoped they will continue explaning html, css and js?
Marco Mazzeo
@Doko85
Jun 22 2016 10:04
yeah it still doesn't do its job
they will continue to explain JS and other languages from that point on
you gotta learn the extra HTML and CSS on your own
muckmack
@muckmack
Jun 22 2016 10:05
im on exercise 120
i have no idea how to build the portfolio^^ i know...maybe i should have enough knowledge now but im not safe enough
the norman burlog page was not that hard...but i wanna learn more of html and js by explaining
Sorin Ruse
@sorinr
Jun 22 2016 10:07
@muckmack don't have to feel safe. go on and try, try, try, ask, learn, try again...
muckmack
@muckmack
Jun 22 2016 10:07
will they only continue with codepen now?
Marco Mazzeo
@Doko85
Jun 22 2016 10:07
yes
muckmack
@muckmack
Jun 22 2016 10:07
hm maybe this is the best way
Marco Mazzeo
@Doko85
Jun 22 2016 10:07
do you know how to use the basics of bootstrap?
muckmack
@muckmack
Jun 22 2016 10:07
hm
Marco Mazzeo
@Doko85
Jun 22 2016 10:07
did you complete that part of the course yet?
muckmack
@muckmack
Jun 22 2016 10:07
i made the exercises till 120
and now they want to do projects
but i have no idea of js
i just followed the exercises and on exercise 119 they wanted me to do this "norman burlog" page
should i just continue? hoped for more html and js exercises
and explaining
Marco Mazzeo
@Doko85
Jun 22 2016 10:09
wait a second
both portfolio and tribute page don't want you to use JS if you don't know that language yet
they are simple html and css projects
now: how to build a portfolio
check the example code
muckmack
@muckmack
Jun 22 2016 10:10
i kno how to use some classes yea
Marco Mazzeo
@Doko85
Jun 22 2016 10:10
it's a navigation bar and three sections with a footer
muckmack
@muckmack
Jun 22 2016 10:10
like jumbotron and so on
Marco Mazzeo
@Doko85
Jun 22 2016 10:10
that's a good start
jumbotron will more likely be the opening section
muckmack
@muckmack
Jun 22 2016 10:10
but i have not enough knowledge for doing the portfolio exercise
Marco Mazzeo
@Doko85
Jun 22 2016 10:10
with a full width background image and some text over it
muckmack
@muckmack
Jun 22 2016 10:10
ah kk
i just loved the firt 119 exercises because freecodecamp explained what kind of classes there are in html, how to use jquery and css
but just basics. they wont continue this way of explaining?
the little catphoto app ^^
i started for 2 days...
Marco Mazzeo
@Doko85
Jun 22 2016 10:14
yes they will continue with more difficult stuffs
like javascript algorythms
anyway
muckmack
@muckmack
Jun 22 2016 10:14
thats not my question...sry
from now on...will i just continue with codepen?
exercise 120..
they tell me to build this protfolio with bootstrap but i got too less knowledge after their exercises to do that
Marco Mazzeo
@Doko85
Jun 22 2016 10:18
getboostrap.com
there is a CSS guide
that explains each class
anyway yes, FCC projects are built on codepen
muckmack
@muckmack
Jun 22 2016 10:20
k so i have no choice and just have to start
this will be hard but i think with google and enough time everyone can get this challenges
Faisal Zulfiqar
@faisal1337
Jun 22 2016 10:20

<ul id="buttons" class="nav navbar-nav navbar-right">
<li><a href="#" class="active">Home</a></li>
<li><a href="#">Details</a></li>
<li><a href="#">Contact Me</a></li>
</ul>

buttons > a:link {

color: white;

}

I want to make the links text color 'white' by default
But this code doesn't work. Suggestions?

Marco Mazzeo
@Doko85
Jun 22 2016 10:20
@muckmack of course, determination and research
muckmack
@muckmack
Jun 22 2016 10:20
thanks marco! can i ask you at which exercise you are on freecodecamp?
Marco Mazzeo
@Doko85
Jun 22 2016 10:21
@faisal1337 #buttons > a:link
Faisal Zulfiqar
@faisal1337
Jun 22 2016 10:22
@Doko85 sorry # couldn't appear here. But it is present in the original code
Marco Mazzeo
@Doko85
Jun 22 2016 10:23
uhm
@muckmack yes sure
@faisal1337 I added a new class at my navbar
called topnav
and styled that class
accordingly to my design preferences
muckmack
@muckmack
Jun 22 2016 10:24
is anyone on exercise 120 here?
Laurendv
@Laurendv
Jun 22 2016 10:24
Hello I have a bootstrap question :)
Why is my menu covering my navbar-brand? :(
Faisal Zulfiqar
@faisal1337
Jun 22 2016 10:27
@Doko85 can you tell me about selectors? How to access a child element from parent. Something like this ' p > li {}' what does this do?
Marco Mazzeo
@Doko85
Jun 22 2016 10:29
it should access all of the li inside a p
muckmack
@muckmack
Jun 22 2016 10:29
ok sry but this cant be. they want me to use js at exercise 120 (building your own portfolio) but they didnt explain js till now.
Marco Mazzeo
@Doko85
Jun 22 2016 10:29
if I remember correctly
@muckmack you don't have to use js, I told you already
just use html and css
muckmack
@muckmack
Jun 22 2016 10:31
i want back to the cat photo editor :(
i have way to less knowledge to build such a page
i dont get it. maybe i passed a few challenges accidently
kirbyedy
@kirbyedy
Jun 22 2016 10:33
@muckmack google is your friend, search for stuff you want to learn
muckmack
@muckmack
Jun 22 2016 10:34
i will try
you know this feeling of having no idea how to start the code?
Marco Mazzeo
@Doko85
Jun 22 2016 10:35
wait a second
it tells which classes to use for the navbar, the sections, etc
how to make an image responsive
be sure to load bootstrap on both CSS and Javascript section on your Pen's settings.
muckmack
@muckmack
Jun 22 2016 10:36
oh nice. thanks. looks good!
yea i allready load it, thanks
i love coder communities. every communities should be like this
DumeD
@DumeD
Jun 22 2016 10:49
how can i make a background image responsove?
ayaancoder
@ayaancoder
Jun 22 2016 10:51
This message was deleted
This message was deleted
Marco Mazzeo
@Doko85
Jun 22 2016 10:59
@DumeD you can insert that image into a jumbotron or flex-box
Chris Cullen
@123xylem
Jun 22 2016 11:00
Can some1 tell me how to get these duplicates out of my answer? Its correct but I just need to remove duplicates!
["QUARTER, 0.25","QUARTER, 0.5","QUARTER, 0.75","QUARTER, 1","QUARTER, 1.25","QUARTER, 1.5","QUARTER, 1.75","QUARTER, 2","QUARTER, 2.25","QUARTER, 2.5","QUARTER, 2.75","DIME, 2.3000000000000003","DIME, 2.4000000000000004","DIME, 2.5","DIME, 2.6","DIME, 2.7","DIME, 2.8000000000000003","DIME, 2.9000000000000004","DIME, 3","DIME, 3.1","DIME, 3.2","DIME, 3.3000000000000003","DIME, 3.4000000000000004","DIME, 3.5","DIME, 3.6","DIME, 3.7","DIME, 3.8000000000000003","DIME, 3.9000000000000004","DIME, 4","DIME, 4.1000000000000005","DIME, 4.2","DIME, 4.3","DIME, 4.4","DIME, 4.5","DIME, 4.6"]
Here is The CODE! :
function checkCashRegister(price, cash, cid) {
var val;
  var cost=arguments[0];
  var money=arguments[1];
var till= arguments[2];
  var count=0;
  var arr=[];
  var change= money-cost;
 var tillCount=0;
  var chgCount=0;
var convertedTill=[];
  var jCount=0;

  var denoms = [0.01,0.05, 0.1, 0.25, 1, 5, 10, 20, 100];
for (var t = 0;t < till.length; t++) {
  till[t].push(denoms[t]);}

  if(change<0){
  change=Math.abs(change);}//this makes change positive if its negative value
else change=change;
   change = Math.round(change * 100) / 100;

  for(i=0; i<till.length;i++){
   count+=till[i][1];}
    if(change>count){ 
    return "Insufficient Funds";
// Make a count that totals till values. If change is more than till then say so

  }  else{
    var chgArr=[];
  for(j=till.length-1;j>=0;j--){  
    var amountOfType=till[j][1]/till[j][2];//How many of each coin do u have?
    till[j].push(amountOfType);


    while(change>chgCount&& till[j][1]>0 &&change!==chgCount ){

  if(till[j][1]<=change){
      chgCount+=till[j][2]; 
      till[j][1]-=till[j][2];
    jCount++;
      chgArr.push(""+till[j][0]+ ""+", "+""+till[j][2]*jCount+"");
    }
    else{j--;}}
        }          
return chgArr;
  }
}
checkCashRegister(12, 20.00, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.10], ["QUARTER", 4.25], ["ONE", 90.00], ["FIVE", 55.00], ["TEN", 20.00], ["TWENTY", 60.00], ["ONE HUNDRED", 100.00]]);
How do i remove duplicates form answers?
ayaancoder
@ayaancoder
Jun 22 2016 11:40
how should i get </> this line
i got </> but how should i get a line
srishti-learner
@srishti-learner
Jun 22 2016 11:50
i am solving 'Everything Be True' algorithm question and i am stuck! till now i wrote this-

function truthCheck(collection, pre) {
// Is everyone being true?
for(var i=0;i<collection.length;i++){
if(!(pre in collection[i])||collection[i][pre]===undefined||isNaN(collection[i][pre])||collection[i][pre]===""||collection[i][pre]===null||collection[i][pre]===0)
{
return false;
}
}
return true;
}

truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");

but it's not working for some true cases as for the shown one
please,if anyone could help me on this.
David Liendo
@DavLiendoProgramming
Jun 22 2016 12:16
Morning everybody!
im on the tribute page step
can somebody give me their opinion?
Marco Mazzeo
@Doko85
Jun 22 2016 12:29
the whole <style> part should be placed into the css tab
also the image

photo1 {

width: ;
height: ;
}
David Liendo
@DavLiendoProgramming
Jun 22 2016 12:35
oh
so i just copy paste it in css?
@Doko85 but, does it look good enough?
Marco Mazzeo
@Doko85
Jun 22 2016 12:37
the whole styling must be done via css
yep it's nice
David Liendo
@DavLiendoProgramming
Jun 22 2016 12:38
Thanks dude! @Doko85
CamperBot
@camperbot
Jun 22 2016 12:38
davliendoprogramming sends brownie points to @doko85 :sparkles: :thumbsup: :sparkles:
:cookie: 398 | @doko85 |http://www.freecodecamp.com/doko85
Marco Mazzeo
@Doko85
Jun 22 2016 12:49
so guys, codepen doesn't allow to link unsecure (not SSH) connection to external files?
I have a self hosted CSS file and it doesn't load it
kirbyedy
@kirbyedy
Jun 22 2016 13:02
yep
Marco Mazzeo
@Doko85
Jun 22 2016 13:04
thanks @kirbyedy
CamperBot
@camperbot
Jun 22 2016 13:04
doko85 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1145 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Thabani Manzini
@ThabaniM
Jun 22 2016 13:05
hello everybody, i would like some help with my portfolio thumbnail images, they are not showing up http://codepen.io/ThabaniM/pen/YwzbNq
kirbyedy
@kirbyedy
Jun 22 2016 13:06
@Doko85 I use dropbox and it works
Marco Mazzeo
@Doko85
Jun 22 2016 13:06
@ThabaniM the image link is not an image link
it links to another pen
Thabani Manzini
@ThabaniM
Jun 22 2016 13:08
@Doko85 ha ha oh ya why didn't I think of that
Marco Mazzeo
@Doko85
Jun 22 2016 13:08
<a href="pen url" target="_blank"><img src="img url"></a>
you can even use the img class="img-responsive"
Thabani Manzini
@ThabaniM
Jun 22 2016 13:08
@Doko85 so where do i get an image of my different works
img url that is
Marco Mazzeo
@Doko85
Jun 22 2016 13:09
just use google and find images that you think will suit for them
anyway there is a bootstrap class that helps you have your navbar always displayed on the top
Thabani Manzini
@ThabaniM
Jun 22 2016 13:09
so i can't use the thumbnails as previews
Marco Mazzeo
@Doko85
Jun 22 2016 13:10
so you don't have to duplicate your navbar at the bottom
@ThabaniM just screenshot your project and use that screenshot as thumbnail
John Delaney
@jdpunk1
Jun 22 2016 13:11
Hi all, I'm doing the Simon game task, I've got a bunch of jquery on click functions for the buttons, they should be inactive before switching on the game, can anyone point me in the right direction as to how to do this easily? like having different modes.. I tried googling but can't really find what I'm after..
Thabani Manzini
@ThabaniM
Jun 22 2016 13:11
yeah that could work
Marco Mazzeo
@Doko85
Jun 22 2016 13:19
which CSS property should I use to align some contents into a div?
neither I tried worked so far
Chris Cullen
@123xylem
Jun 22 2016 13:28
function checkCashRegister(price, cash, cid) {
var val;
  var cost=arguments[0];
  var money=arguments[1];
var till= arguments[2];
  var count=0;
  var arr=[];
  var change= money-cost;
 var tillCount=0;
  var chgCount=0;
var convertedTill=[];
  var jCount=0;

  var denoms = [0.01,0.05, 0.1, 0.25, 1, 5, 10, 20, 100];
for (var t = 0;t < till.length; t++) {
  till[t].push(denoms[t]);}

  if(change<0){
  change=Math.abs(change);}//this makes change positive if its negative value
else change=change;

  for(i=0; i<till.length;i++){
   count+=till[i][1];}
    if(change>count){ 
    return "Insufficient Funds";
// Make a count that totals till values. If change is more than till then say so

  }  else{
    var chgArr=[];
  for(j=till.length-1;j>=0;j--){  
    var amountOfType=till[j][1]/till[j][2];//How many of each coin do u have?
    till[j].push(amountOfType);


    while(change>chgCount&& till[j][1]>0 &&change!==chgCount ){

  if(till[j][1]<=change){
      chgCount+=till[j][2]; 
      till[j][1]-=till[j][2];

    jCount++;
      chgArr.push(""+till[j][0]+ ""+", "+""+jCount*till[j][2]+"");
    }
    else{j--;}}
        }                

return chgArr;
  }
}
checkCashRegister(17, 20.00, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.10], ["QUARTER", 4.25], ["ONE", 90.00], ["FIVE", 55.00], ["TEN", 20.00], ["TWENTY", 60.00], ["ONE HUNDRED", 100.00]]);
How do i make the numbers rounded up or down a decimal?
IM getting odd decimals
Bảo Cường
@SomeThigWrong
Jun 22 2016 13:29
Can someone help me challenge 130 Build a Personal Portfolio Webpage
Marco Mazzeo
@Doko85
Jun 22 2016 13:30
@SomeThigWrong what's wrong
@123xylem Math.floor(Math.random etc etc)
Chris Cullen
@123xylem
Jun 22 2016 13:31
@Doko85 Yea its where to put it thats the problem
I get infi k=loops
if its in the wrong place
infi looops
Marco Mazzeo
@Doko85
Jun 22 2016 13:34
I don't know
Bảo Cường
@SomeThigWrong
Jun 22 2016 13:37
@Doko85 I don't know where I should start??
Marco Mazzeo
@Doko85
Jun 22 2016 13:37
look at the example page
and then you can get some extra documentation at http://getbootstrap.com/css
sorry there was a typo in the link, now it works
Bảo Cường
@SomeThigWrong
Jun 22 2016 13:41
@Doko85 I haven
@Doko85 I haven't leant JS yet , so why it has in my project??
Marco Mazzeo
@Doko85
Jun 22 2016 13:43
it's there by default
just close that tab
so you'll work on html and css alone
Bảo Cường
@SomeThigWrong
Jun 22 2016 13:45
@Doko85 OK thanks. I'm gonna try my best!!
CamperBot
@camperbot
Jun 22 2016 13:45
somethigwrong sends brownie points to @doko85 :sparkles: :thumbsup: :sparkles:
:cookie: 399 | @doko85 |http://www.freecodecamp.com/doko85
Marco Mazzeo
@Doko85
Jun 22 2016 13:47
I'm sure you'll do it!
purnendutiwari
@purnendutiwari
Jun 22 2016 13:59
@SomeThigWrong i am also stuck in same challenge
flindip
@flindip
Jun 22 2016 13:59
I'm doing the "weather app" project. I decided to write the JS code first. I have some placeholders in place for when I put in the HTML CSS. I'm just trying to get the methods down. Would anyone care to take a look at my code and give some feedback? I have comments in place to show what I want it to do. If it looks ok then I'll start figuring out the temp button
lilyliterate
@lilyliterate
Jun 22 2016 14:00
@flindip post your pen.
@lilyliterate The issue I'm having though. I can't seem to figure out a place to test the code so far in a compiler. repel.it doesn't recognize query. Jsfiddle doesn't take weather API
@lilyliterate So, it kinda feels like I'm writing a little blind. I had to research the methods and then plug them in
Normally, I would just take it bit by bit and see how it works...
Marco Mazzeo
@Doko85
Jun 22 2016 14:05
mine isn't fully working yet but you can take a look if you want
at least it displays data
lilyliterate
@lilyliterate
Jun 22 2016 14:06
Can't run with jquery and fiddle at the same time? Sec, I'm not too familiar with jsfiddle.
(Also I'm rendering in blender so my computer is slow as heck, even changing FFox tabs)
flindip
@flindip
Jun 22 2016 14:07
@lilyliterate No, fiddle can use Jquery. It just doesn't recognize API's. At least open weather API
@lilyliterate it ends up blocking it
greg
@wearenotgroot
Jun 22 2016 14:09
@flindip did you get the geolocation to work?
lilyliterate
@lilyliterate
Jun 22 2016 14:09
@flindip rudimentary googling brings up jsfiddle.net/5pjha/
Does that help? Like I said, computer's running on severely reduced functionality atm.
greg
@wearenotgroot
Jun 22 2016 14:10

@flindip at line 18, you wrote

navigator.geolocation.showPosition(position);

//i think you meant to write


navigator.geolocation.getCurrentPosition(showPosition);

showPosition is your own written function. while getCurrentPosition is from geolocation itself. Also you should declare showPosition outside the if statement

flindip
@flindip
Jun 22 2016 14:13
@wearenotgroot ahh. Yeah good catch. That would have been frustrating. Thanks
CamperBot
@camperbot
Jun 22 2016 14:13
flindip sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1152 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Marco Mazzeo
@Doko85
Jun 22 2016 14:13
the position parameter is not being passed up to that point , yeah that may be the problem
flindip
@flindip
Jun 22 2016 14:13
@lilyliterate thanks
CamperBot
@camperbot
Jun 22 2016 14:13
flindip sends brownie points to @lilyliterate :sparkles: :thumbsup: :sparkles:
:cookie: 270 | @lilyliterate |http://www.freecodecamp.com/lilyliterate
Marco Mazzeo
@Doko85
Jun 22 2016 14:14
any of you guys knows of a way to align the text and the icons on the circles of my weather app I linked just a moment ago?
flindip
@flindip
Jun 22 2016 14:15
@wearenotgroot Other than that does it look alright? Obviously, its going to need to be fine tuned(cause I don't have the HTML done yet). But, I'm hoping that the bulk of the JS is more or less alright...
@wearenotgroot also, do you think I need more background image values?
greg
@wearenotgroot
Jun 22 2016 14:16
@flindip you got couple of typo. you have a variable called log and you meant to write lon
flindip
@flindip
Jun 22 2016 14:17
@wearenotgroot oh you mean for longitude?
greg
@wearenotgroot
Jun 22 2016 14:17
@flindip yeah
@flindip you declared it log then you wrote lon on the url as parameter
flindip
@flindip
Jun 22 2016 14:18
@wearenotgroot curious, does it matter if its just a declared variable? Is log some sort of build in value?
vichus1995
@vichus1995
Jun 22 2016 14:18
hey guys,im doing the javascript calculator.i was trying to implement nested click functions for the same element, button so as to alter behaviour after = is pressed,but it's not working properly.please help
http://codepen.io/vichus1995/pen/NxLqyb
greg
@wearenotgroot
Jun 22 2016 14:18
@flindip different name variable will not have same values :smile:
Hamza Anwer
@ImHamzaAnwer
Jun 22 2016 14:18
can anyone help me on switch challenge ?
flindip
@flindip
Jun 22 2016 14:19
@wearenotgroot yeah, I know where I screwed up. I used the waypoint geolocation thing as a template. I guess I overlooked the variable I already declared. Easy fix
greg
@wearenotgroot
Jun 22 2016 14:19
@flindip another thing is that getting the current location is an async function
flindip
@flindip
Jun 22 2016 14:21
@wearenotgroot so I should move the "});" near the end of the code
?
cause it has to nest all around everything else?
greg
@wearenotgroot
Jun 22 2016 14:21
@flindip you should move the $.getJSON inside the showPosition function
@flindip something like
function showPosition(position)
{

    ...
    $.getJSON(url).done(callback).fail(errorCallback);
}

function callback(data)
{
   handle data...
}


function errorCallback(data)
{
   handle error...
}

//this goes inside the .ready otherwise the rest goes outside
if(...geolocation)
{
    navigator.geolocation.getCurrentPosition(showPosition);
}
Laurendv
@Laurendv
Jun 22 2016 14:32
Hello guys, need your help :)
I'd like to put my background image in my col-lg-8 without cutting anypart of the picture :(
Vadali Soumitri
@svadali2
Jun 22 2016 14:33
hey guys i am having a problem implementing an async call in javascript, i need to make 8 getJSON calls in a for loop but they are all being processed when the loop is already over, how do i get it to process at the right time?
Laurendv
@Laurendv
Jun 22 2016 14:33
@svadali2 maybe the HelpJavaScript chat would be more appropriate :)
Vadali Soumitri
@svadali2
Jun 22 2016 14:34
yes @Laurendv sure, will post it there as well
Vamshi Gudipati
@vamshikrishna144
Jun 22 2016 14:37
why Im I not getting notifications when I minimize my window?
anybody?
flindip
@flindip
Jun 22 2016 14:40
@wearenotgroot oh, I was moving the semi colons that Ajax was actually in the function. But, I need callbacks as well?
greg
@wearenotgroot
Jun 22 2016 14:40
@flindip you can use name function or anonymous ones your choice. the the format i use make it look cleaner
@flindip remove the document.onload and declare the showPosition outside that if statement, as shown here :point_up: June 22, 2016 4:21 PM
flindip
@flindip
Jun 22 2016 14:44
@wearenotgroot oh, ok. So that just essentially replaces document.onload? I thought you needed that to display it to the HTML?
@wearenotgroot thanks for your help again
CamperBot
@camperbot
Jun 22 2016 14:44
flindip sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: flindip already gave wearenotgroot points
Chiara
@chiara-f
Jun 22 2016 14:51
Hello everyone! Could anyone please help me with my wikipedia viewer? I don't understand why the search results are not in order by relevance :worried:
http://codepen.io/chiara-f/full/mEOpQb/
greg
@wearenotgroot
Jun 22 2016 14:52
@flindip use it as a guide
/*****separate function for update display****/
function updateDisplay(json)
{

  //updating body background image on returned weather description
  var weather=json.weather[0];
if(weather.indexOf("snow")>=0){
  $('myOjbect').css('background-image', 'url("' + imageUrl + '")');
}
if(weather.indexOf("rain")>=0){
  $('myOjbect').css('background-image', 'url("' + imageUrl + '")');
}
if(weather.indexOf("sunny")>=0){
  $('myOjbect').css('background-image', 'url("' + imageUrl + '")');
}
if(weather.indexOf("thunder")>=0){
  $('myOjbect').css('background-image', 'url("' + imageUrl + '")');
} 
 //clear day default
  else{
  $('myOjbect').css('background-image', 'url("' + imageUrl + '")');
}
//temperature button


}

function showPosition(position){
  var lat=position.coords.latitude; 
  var lon=position.coords.longitude;

    //Ajax
   //added ?callback=? to buypass crossorigin issue
    $.getJSON("https://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon="+ lon + "&units=metric&appid=44db6a862fba0b067b1930da0d769e98&?callback=?", function(data){
   //var json=JSON.parse(JSON.stringify(data));
      updateDisplay(data);    
    }); 
}

$(document).ready(function(){

  //Return users location using geolocation.  

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

});
Ivan Tsud
@IvaTsu
Jun 22 2016 14:53
who can help me with api for random quote app?
flindip
@flindip
Jun 22 2016 14:53
@wearenotgroot gotcha. I'm rewriting and moving what you suggested earlier. I'll display it in a little bit.
Philip Krück
@pkrueck
Jun 22 2016 14:54
Hi Guys, I'm having trouble with a random white space between my image and my nav bar. can anyone help pls http://codepen.io/pkrueck/pen/OXbzgL
greg
@wearenotgroot
Jun 22 2016 14:54
@flindip :+1:
flindip
@flindip
Jun 22 2016 14:54
@wearenotgroot I get though, as I was looking at it, why you move the if geolocations. Its more efficient code. Its not glob of semi colons
@wearenotgroot thats been a real problem for me
NagarajuGunda
@NagarajuGunda
Jun 22 2016 14:55
Hi Guys, how do we change background color of body using jQuery
Here is my pen
Sorin Ruse
@sorinr
Jun 22 2016 14:56
@svadali2 try use $.each instead of for
Hamza Anwer
@ImHamzaAnwer
Jun 22 2016 14:57
im stuck on switch challenge can anyone help
Dylan
@dhcodes
Jun 22 2016 14:57
@NagarajuGunda
$('body').css('background-color','pink');
to do pink
@NagarajuGunda also make sure jquery is enabled in your codepend settings
@ImHamzaAnwer what's your question or code?
Luke
@lukenetti3
Jun 22 2016 14:58
Hey guys, quick question. I am working on the local weather app challenge. I found CSS code that contains the cloud animations for each description of the weather. Is that cheating to use? I would still have to link it to my description which I get from my API though.
Hamza Anwer
@ImHamzaAnwer
Jun 22 2016 14:58
@dhcodes Write a switch statement which tests val and sets answer for the following conditions:
1 - "alpha"
2 - "beta"
3 - "gamma"
4 - "delta"
Dylan
@dhcodes
Jun 22 2016 14:59
@lukenetti3 nope, you are free to use libraries and plug-ins. I think it even says so on the project page
@ImHamzaAnwer they give you an example of a switch right?
do you have any code?
Luke
@lukenetti3
Jun 22 2016 14:59
@dhcodes Okay, thanks! Just wanted to make sure. I want to do as much as I can on my own.
CamperBot
@camperbot
Jun 22 2016 14:59
lukenetti3 sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1090 | @dhcodes |http://www.freecodecamp.com/dhcodes
Hamza Anwer
@ImHamzaAnwer
Jun 22 2016 15:00
@dhcodes yes but i dont understand what statement should i give
NagarajuGunda
@NagarajuGunda
Jun 22 2016 15:00
Hi @dhcodes , its working if i give the color directly
Dylan
@dhcodes
Jun 22 2016 15:00
@lukenetti3 you could write your own if you really wanted to use the three digit weather code
NagarajuGunda
@NagarajuGunda
Jun 22 2016 15:00
how do i give if store the color in a var
Dylan
@dhcodes
Jun 22 2016 15:00
@NagarajuGunda above your jquery assignment, do var color = yourcolor;
then use yourcolor in the jquery
Luke
@lukenetti3
Jun 22 2016 15:01
@dhcodes Whats the three digit weather code?
NagarajuGunda
@NagarajuGunda
Jun 22 2016 15:01
@dhcodes $("body").css('background-color',colors[color].toString());
this is not working
Hamza Anwer
@ImHamzaAnwer
Jun 22 2016 15:02
@dhcodes what am i doing wrong?

function caseInSwitch(val) {
  var answer = "";
  // Only change code below this line
  switch (answer) {
    case 1:
    console.log ("alpha");
    break;

    case 2:
    console.log("beta");
    break;
  }


  // Only change code above this line  
  return answer;  
}

// Change this value to test
caseInSwitch(1);
Philip Krück
@pkrueck
Jun 22 2016 15:02
how can i get rid of white space between two divs
NagarajuGunda
@NagarajuGunda
Jun 22 2016 15:02
i made a mistake
now its working
Dylan
@dhcodes
Jun 22 2016 15:04
@ImHamzaAnwer the switch should be the val because that is what is changing... switch(val)
@ImHamzaAnwer then instead of console.log you want to set answer to equal alpha,beta, etc.
great @NagarajuGunda
@pkrueck remove the margin

div {

margin: 0 auto;
}
#div
@lukenetti3 openweather shoots out a three digit code for the type of weahter
you can write a series of if statements that change something based on those digits
ex. i used it to change the background of my weather app
Philip Krück
@pkrueck
Jun 22 2016 15:07
its not working
here's my code
Hamza Anwer
@ImHamzaAnwer
Jun 22 2016 15:07
@dhcodes Thanks Man !
CamperBot
@camperbot
Jun 22 2016 15:07
imhamzaanwer sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1091 | @dhcodes |http://www.freecodecamp.com/dhcodes
Dylan
@dhcodes
Jun 22 2016 15:07
you're welcome
Philip Krück
@pkrueck
Jun 22 2016 15:07
i mean the space between the image and the nav-bar
i got it
Dylan
@dhcodes
Jun 22 2016 15:08
@pkrueck that space is there because you have a stray '
"
Philip Krück
@pkrueck
Jun 22 2016 15:08
thanks
haha
just saw it myself
Dylan
@dhcodes
Jun 22 2016 15:08
no worries
Philip Krück
@pkrueck
Jun 22 2016 15:08
thanks @dhcodes
CamperBot
@camperbot
Jun 22 2016 15:08
pkrueck sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1092 | @dhcodes |http://www.freecodecamp.com/dhcodes
lampros nestoras
@lanestoras
Jun 22 2016 15:13
Can somebody help me? When in Chrome everything works fine. If i visit from Android its all messed up. Why??
Here's the pen http://codepen.io/lanestoras/full/mEPXLL/
Gavin Broekema
@GavinGoneWild
Jun 22 2016 15:33
http://codepen.io/GavinGoneWild/pen/MebrMr?editors=0100
Can't seem to get an output for this Sass... Terminal outputs no red flags. Would anyone mind sifting through this to see where I may have gone wrong?
OrkaAethyr
@OrkaAethyr
Jun 22 2016 15:35
Hey everyone
NagarajuGunda
@NagarajuGunda
Jun 22 2016 15:36
Hi Everyone, pls provide me feedback
http://codepen.io/nagarajugunda/full/gMLXXK/
Matthew Boland
@mattboland
Jun 22 2016 15:40
@NagarajuGunda looks good but first thing i noticed is no tweet button
lampros nestoras
@lanestoras
Jun 22 2016 15:43
@NagarajuGunda isnt this the same as the one provided in FCC page?
David Liendo
@DavLiendoProgramming
Jun 22 2016 15:53
hey guys, i have a question. Does anybody knoes how to make a button fade? like its part of the bar and when youre going to click if gets darker?
lampros nestoras
@lanestoras
Jun 22 2016 15:53
@DavLiendoProgramming I think you need jquery to do that
OrkaAethyr
@OrkaAethyr
Jun 22 2016 15:54
you mean hovering?
or clicking?
Ryan
@ispeakcomputer
Jun 22 2016 16:02
@NagarajuGunda sweet design
JD Tadlock
@jdtdesigns
Jun 22 2016 16:05
@GavinGoneWild Small, medium and large are your options for map-get. You have an 'xmall' option which is throwing an error.
NagarajuGunda
@NagarajuGunda
Jun 22 2016 16:07
Hi @mattboland , i tried to reproduce similar design. But built from scrath
*scratch
started today itself... took some time to figure out everything
will add tweet button tommorow
btw, i have added an icon animation :D
Thanks @needsMoreCoffee
CamperBot
@camperbot
Jun 22 2016 16:07
nagarajugunda sends brownie points to @needsmorecoffee :sparkles: :thumbsup: :sparkles:
:cookie: 313 | @needsmorecoffee |http://www.freecodecamp.com/needsmorecoffee
Gavin Broekema
@GavinGoneWild
Jun 22 2016 16:09
@jdtdesigns In the terminal I get nothing, but in codepen I removed the xsmall option, and I got this:
$map: ("small" (width: 480px, gutter: 0px)) is not a map for `map-get'
JD Tadlock
@jdtdesigns
Jun 22 2016 16:09
@NagarajuGunda Add 'transition: background .7s;' to your body in the css
afani martin
@whiz25
Jun 22 2016 16:12
hi there. i just completed the html, css part yesterday n i hope to find some help here
OrkaAethyr
@OrkaAethyr
Jun 22 2016 16:13
hi, what kind of help would you need @whiz25 ?
Melanie
@MelanieLeAnn
Jun 22 2016 16:15
Question: If I want to use a personal photo on my Personal Portfolio Webpage, where would I store the photo to link into my webpage? Do I need to purchase a service? Are there free services?
OrkaAethyr
@OrkaAethyr
Jun 22 2016 16:16
hey @MelanieLeAnn well, you'd need to store it online to get a link i think, and there are free services to do that (if I'm understanding it right)
Melanie
@MelanieLeAnn
Jun 22 2016 16:17
You are understanding correctly. I'm not familiar with what on-line services are available or what is considered "best for the price" or "best for free". :)
OrkaAethyr
@OrkaAethyr
Jun 22 2016 16:18
I'm guessing the portfolio is on codepen?
Melanie
@MelanieLeAnn
Jun 22 2016 16:18
@OrkaAethyr, correct. It is on codepen
OrkaAethyr
@OrkaAethyr
Jun 22 2016 16:19
http://www.hostingpics.net/ you could use some service like hostingpics, imageshacks and such
it would provide you with a link ( if i'm not mistaking) and then you could put the link in an <img>
JD Tadlock
@jdtdesigns
Jun 22 2016 16:19
@GavinGoneWild Trying to learn sass or is this your workflow? A standard breakpoint mixin would be better imo.
Melanie
@MelanieLeAnn
Jun 22 2016 16:20
Thank you, @OrkaAethyr. That is exactly what I'm looking for.
CamperBot
@camperbot
Jun 22 2016 16:20
melanieleann sends brownie points to @orkaaethyr :sparkles: :thumbsup: :sparkles:
:cookie: 122 | @orkaaethyr |http://www.freecodecamp.com/orkaaethyr
OrkaAethyr
@OrkaAethyr
Jun 22 2016 16:20
oh it's nothing, I hope it helped ( and I didn't say anything wrong (but normally it should work ^^).
oh wasn't necessary to send points (or is it an automatic thing?)
JD Tadlock
@jdtdesigns
Jun 22 2016 16:22
@mixin breakpoint ($size) {
    @if $size == small{
        @media screen and (max-width: 425px) {
            @content;
        }
    }
        @if $size == medium{
        @media screen and (max-width: 768px) {
            @content;
        }
    }
}
@GavinGoneWild
Melanie
@MelanieLeAnn
Jun 22 2016 16:22
I think it sends points every time someone says "thank you" with an @.
OrkaAethyr
@OrkaAethyr
Jun 22 2016 16:23
oh okay thanks for the explanation :3
JD Tadlock
@jdtdesigns
Jun 22 2016 16:23
or you could use that for any other 'sizing' need @GavinGoneWild
Gavin Broekema
@GavinGoneWild
Jun 22 2016 16:23

@jdtdesigns I'm trying to learn Sass. So what you're saying is rather than use
'''scss
$breakpoints: (
xsmall: (
width : 0px,
gutter : 0px
),
small: (
width : 480px,
gutter : 0px
),
medium: (
width : 768px,
gutter : 0px
),
large: (
width : 1024px,
gutter : 0px
)
) !default;
'''
I should use these?
'''scss
$breakpoint--xs : 0px;
$breakpoint--sm : 479px;
$breakpoint--md : 768px;
$breakpoint--lg : 1024px;

@mixin mq($break) {
@if $break == "small" {
@media (min-width: $breakpoint--xs) and (max-width: $breakpoint--sm) {
@content;
}
}
@else if $break == "medium" {
@media (min-width: $breakpoint--sm + 1) {
@content;
}
}
@else if $break == "large" {
@media (min-width: $breakpoint--md) {
@content;
}
}
@else {
@error "No value could be retrieved for #{$break}. "
}
}
'''

CamperBot
@camperbot
Jun 22 2016 16:23
:bulb: to format code use backticks! ``` more info
Gavin Broekema
@GavinGoneWild
Jun 22 2016 16:24
Shoot...
Samuel Plumppu
@Greenheart
Jun 22 2016 16:25
Hi! Could someone help me with my portfolio page? I'm trying to make it responsive but the viewport meta tag (that tells the mobile browser to adjust the webpage width) isn't working properly
JD Tadlock
@jdtdesigns
Jun 22 2016 16:25
@GavinGoneWild Your gutter isn't changing from 0, so you don't need that
Samuel Plumppu
@Greenheart
Jun 22 2016 16:25
OrkaAethyr
@OrkaAethyr
Jun 22 2016 16:25
@Greenheart you should only need to use bootstrap's col classes if i'm not saying something wrong ^^
Gavin Broekema
@GavinGoneWild
Jun 22 2016 16:26
I left it as 0 for the moment. Was looking to create more responsive values for each breakpoint.
Samuel Plumppu
@Greenheart
Jun 22 2016 16:26
Yeah but i want to learn CSS properly
Gavin Broekema
@GavinGoneWild
Jun 22 2016 16:26
@jdtdesigns
Samuel Plumppu
@Greenheart
Jun 22 2016 16:26
@OrkaAethyr So I built it from scratch :blush:
OrkaAethyr
@OrkaAethyr
Jun 22 2016 16:27
@Greenheart oh, well yes if you have time and such you can do it ^^. also, if you want to have an item taking 1/3 of the page you can use width:30%. not exactly the "same" thing as bootstrap buuut
Samuel Plumppu
@Greenheart
Jun 22 2016 16:28
@OrkaAethyr Yeah I know, it takes time but it's worth it in the long run :blush:
OrkaAethyr
@OrkaAethyr
Jun 22 2016 16:29
No problem with that hehe ^^
JD Tadlock
@jdtdesigns
Jun 22 2016 16:29
```
@mixin breakpoint ($size) {
        @if $size == xsmall {
        @media screen and (max-width: 0px) {
            margin: 0 10px; // you can set the gutters to be outputted here
            @content;
        }
    }
    @if $size == small {
        @media screen and (max-width: 479px) {
            @content;
        }
    }
        @if $size == medium {
        @media screen and (max-width: 768px) {
            @content;
        }
    }
         @if $size == large{
        @media screen and (max-width: 1024px) {
            @content;
        }
    }
}
```
@GavinGoneWild
Samuel Plumppu
@Greenheart
Jun 22 2016 16:30
I'd be really happy if anyone could test my webpage on their phone/tablet and tell me if it works. It doesn't work for me :P
JD Tadlock
@jdtdesigns
Jun 22 2016 16:31
@include breakpoint(small) {
  // your styles
}
@GavinGoneWild use it like this
Gavin Broekema
@GavinGoneWild
Jun 22 2016 16:32
Got it. I'll test it out.
Mitul Shah
@mitul-s
Jun 22 2016 16:37
@Greenheart Lots of bugs on mobile, try wrapping everything in a fluid container div
Ken Haduch
@khaduch
Jun 22 2016 16:37
@Greenheart - I just tried your site on my iphone - it "works", that is, displays your page, but it is not very easy to read. It opened in the safari browser - not sure if it would do anything different in Chrome? But it looks like a full-screen page on a mobile phone display. I would say that it is not responsive, or at least not responding... Are you set up with bootstrap? I wonder if I can look at your code?
Samuel Plumppu
@Greenheart
Jun 22 2016 16:38
@mitul-s @khaduch Thanks a lot! That's about what I can see on my screen too but I'm unsure of how to fix it :smile:
CamperBot
@camperbot
Jun 22 2016 16:38
greenheart sends brownie points to @mitul-s and @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1363 | @khaduch |http://www.freecodecamp.com/khaduch
:cookie: 208 | @mitul-s |http://www.freecodecamp.com/mitul-s
Mitul Shah
@mitul-s
Jun 22 2016 16:38
@Greenheart are you using bootstrap?
Samuel Plumppu
@Greenheart
Jun 22 2016 16:39
@mitul-s I'm using vanilla CSS to learn the fundamentals :blush:
Gavin Broekema
@GavinGoneWild
Jun 22 2016 16:39
@jdtdesigns Should I define my variable in the @include breakpoint() ?
Variables
Samuel Plumppu
@Greenheart
Jun 22 2016 16:40
@khaduch @mitul-s If you've got time, we could talk about this in a google hangout?
Ken Haduch
@khaduch
Jun 22 2016 16:41
@Greenheart - I have to leave the computer for a while, I'll check back in later?
Samuel Plumppu
@Greenheart
Jun 22 2016 16:41
@mitul-s @khaduch My code is available at https://github.com/Greenheart/greenheart.github.io
JD Tadlock
@jdtdesigns
Jun 22 2016 16:41
@Greenheart You have a semi-colon after width=device-width in the <head>
Mitul Shah
@mitul-s
Jun 22 2016 16:41
@Greenheart sa
JD Tadlock
@jdtdesigns
Jun 22 2016 16:41
needs to be a comma instead @Greenheart
Samuel Plumppu
@Greenheart
Jun 22 2016 16:42
@khaduch Okay, thanks for your help!
CamperBot
@camperbot
Jun 22 2016 16:42
greenheart sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: greenheart already gave khaduch points
Samuel Plumppu
@Greenheart
Jun 22 2016 16:42
@jdtdesigns I'll try to change that! Thanks for spotting :blush:
CamperBot
@camperbot
Jun 22 2016 16:42
greenheart sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 546 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Jun 22 2016 16:43
@GavinGoneWild You use include to call the mixin. In the mixin you setup arguments (small, medium, large). You call the mixin and pass in one of those arguments. @include breakpoint(small) {}
the @content places whatever you type in the include at the point where you used @content;
@Greenheart Fixed it for my phone ;)
Gavin Broekema
@GavinGoneWild
Jun 22 2016 16:47
@jdtdesigns Right, so something like this?
'''
@include breakpoint(small) {
$namespace: small;
$gutter: 8px;
}
'''
Or something along those lines?
CamperBot
@camperbot
Jun 22 2016 16:47
:bulb: to format code use backticks! ``` more info
Samuel Plumppu
@Greenheart
Jun 22 2016 16:48
@jdtdesigns Really? :O The web platform is crazy some days ^^
Gavin Broekema
@GavinGoneWild
Jun 22 2016 16:48
Sorry everyone, just switched to dvorak last week... Backtics are a keyrow up lol.
Samuel Plumppu
@Greenheart
Jun 22 2016 16:50
@jdtdesigns My phone is still looking the same but I guess an old iOS7-device isn't supposed to work anymore... :P
JD Tadlock
@jdtdesigns
Jun 22 2016 16:50
@GavinGoneWild That could work, but like i was saying, i don't think it's necessary to have all the different dynamic types. Just do all the stuff you need in the one mixin.
@Greenheart Zoom back out on the phone. It doesn't refresh to the correct size.
Priscilla
@nerrrdd
Jun 22 2016 16:51
I need help on my Tribute Project.. I'm almost done, but I have a container that is perfect on the top, bottom, and left sides.. it's just the right side is stretching over my border slightly and I don't know why. I'm read and researched but I couldn't find a solution
JD Tadlock
@jdtdesigns
Jun 22 2016 16:53
@Greenheart There's something off about the code. I tried it on my other phone and it's broken.
Samuel Plumppu
@Greenheart
Jun 22 2016 16:53
@jdtdesigns I think it's something with the viewport
@jdtdesigns My screen is zoomed in to the top left corner and displaying a messy navbar
NagarajuGunda
@NagarajuGunda
Jun 22 2016 16:59
@jdtdesigns Added. THanks
CamperBot
@camperbot
Jun 22 2016 16:59
nagarajugunda sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 547 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Monique
@mrobinson99
Jun 22 2016 17:13
Hi all. I've been fumbling through my personal portfolio page and I'm almost done. I have a question on how to add a picture from my pc. Is there a way to do that using freecodecamp?
greg
@wearenotgroot
Jun 22 2016 17:18
@mrobinson99 you have to host the image somewhere. (imgur doesnt work with codepen)
Yerramsetty Ganesh Durga Surya Prakash
@prakarshsurya
Jun 22 2016 17:21
hey all. I'm trying to build the tribute page and no matter how long i wait in codepen it won't showw any result. it keeps showing loading...
greg
@wearenotgroot
Jun 22 2016 17:22
@prakarshsurya link it?
Ken Haduch
@khaduch
Jun 22 2016 17:22
@prakarshsurya - check to see if you have any javascript errors - check the JS panel for a red question mark (that seems to be one cause of this - error parsing javascript.)
Yerramsetty Ganesh Durga Surya Prakash
@prakarshsurya
Jun 22 2016 17:22
there is no problem with the JS
Ken Haduch
@khaduch
Jun 22 2016 17:24
@mrobinson99 - as @wearenotgroot said, you have to have the photo hosted on a site that will allow you to cross-link to it. There are a few sites that let you do that. I used my flickr account for some photos, and just linked to the static copy of it. Others have mentioned using dropbox.
@mrobinson99 postimg.org is one that will allow you to upload photos and use them. I haven't used it, I've seen it mentioned here.
@prakarshsurya - if you can post a link, we can look at it and try to help.
Sorin Ruse
@sorinr
Jun 22 2016 17:27
@mrobinson99 you should find a free hosting for your photos upload them there and then change your links into your codepen accordingly
Patrick
@cyas87
Jun 22 2016 17:27
hello everyone. I'm building my tribute page and am trying to do two things: 1) stretch my cover photo across the entire screen. 2) center the thumbnail. for some reason my "center-block" class won't center the thumbnail when I add css. Thanks for the help. http://codepen.io/cyas87/pen/mEOEWX
Jonathan
@JonKaric
Jun 22 2016 17:29
@cyas87 Add the image as a background image instead, and make give it a property of background-size:cover.
The reason the class center block isnt working is because you have added extra margin to that image (margin-50px;) remove that and it will center
flindip
@flindip
Jun 22 2016 17:30

@wearenotgroot I think I'm done with JS component if you wanna take a look at it. I just did JS functionality for the button. I'm using "myObject" again as an element placeholder:

https://codepen.io/flindip/pen/RRGEWd?editors=0010

I think I have the framework pretty much finished at this point for the JS. Obviously, I'll have to rework it once I get the HTML/CSS stuff finished to make them read off each other. Thanks again, big help. My code looks way more organized than it did before(at least to me)...

CamperBot
@camperbot
Jun 22 2016 17:30
flindip sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1153 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Monique
@mrobinson99
Jun 22 2016 17:30
@sorinr thank you!
CamperBot
@camperbot
Jun 22 2016 17:30
mrobinson99 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 376 | @sorinr |http://www.freecodecamp.com/sorinr
Ken Haduch
@khaduch
Jun 22 2016 17:31

@cyas87 - are you developing this on another location and just pasting to CodePen? The way CodePen works is not really compatible with doing things this way. But that's just FYI.

The thing that is conflicting with the center-block is the .img-overlap class that you have, it is cancelling out the auto margins on the center-block.

Jonathan
@JonKaric
Jun 22 2016 17:31
@cyas87 Another thing to note is: alt description is the alternative to the image. it should describe the image for people with blindness/screen readers
Patrick
@cyas87
Jun 22 2016 17:31
@JonKaric thanks for the help!
CamperBot
@camperbot
Jun 22 2016 17:31
cyas87 sends brownie points to @jonkaric :sparkles: :thumbsup: :sparkles:
:cookie: 105 | @jonkaric |http://www.freecodecamp.com/jonkaric
Monique
@mrobinson99
Jun 22 2016 17:31
@khaduch @wearenotgroot Thank u!
CamperBot
@camperbot
Jun 22 2016 17:31
mrobinson99 sends brownie points to @khaduch and @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1364 | @khaduch |http://www.freecodecamp.com/khaduch
:star2: 1154 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Sorin Ruse
@sorinr
Jun 22 2016 17:32
@mrobinson99 welcome
Ken Haduch
@khaduch
Jun 22 2016 17:32
@mrobinson99 - you're welcome - hope you find something that works for you!
Patrick
@cyas87
Jun 22 2016 17:32
@khaduch I see, thank you. No I've been building this on codepen.
CamperBot
@camperbot
Jun 22 2016 17:32
cyas87 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1365 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Jun 22 2016 17:39

@cyas87

@khaduch I see, thank you. No I've been building this on codepen.

Well, CodePen uses a template-based system to generate your HTML output. Anything in the HTML box goes into the <body> section, and you should not have <html>, <head>, <style> or <body> tags in the HTML panel. All of the CSS should got into the CSS panel (without <style> tags - the CodePen template will put that in.) Any JS should go into the JS panel. External library / resources should be specified in the config panels for each thing - CSS (bootstrap.css, etc.) in the CSS panel, JS (jquery.js, bootstrap.js, etc.) in the JS panel.

That being said - browsers handle malformed HTML (which you will have - extra tags, etc.) but I've seen times when mobile browsers don't handle it very well. Just a heads up - but if you're using CodePen exclusively, you can make it better by cooperating with their system, knowing fully that if you are doing this outside of codepen, then you have to do all of that coding on your own... too bad CodePen does not have a mode where you can just paste your fully fleshed-out HTML code and leave the template out of the picture...

CamperBot
@camperbot
Jun 22 2016 17:39
khaduch sends brownie points to @cyas87 :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @cyas87 |http://www.freecodecamp.com/cyas87
Sorin Ruse
@sorinr
Jun 22 2016 17:41
@mrobinson99 if you don't find a way to upload your photos somewhere just pm me and i'll give u free access on my server. but you should know how to use ftp
sahil chahar
@sahil1995
Jun 22 2016 17:49
hi i am doing the import google font challenge i just want to know what this line is doing
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
Adam Lichter
@spot1000
Jun 22 2016 17:50
taht line there is accessing the font from googles font api
Mike Moore
@moorejmike
Jun 22 2016 17:50
I'm working on the navbar for my portfolio and for some reason the brand is above the other navbar elements, and I can't for the life of me figure it out.
sahil chahar
@sahil1995
Jun 22 2016 17:51
what does the attribute rel and type for and how is it callikng the api
so just declaring a link and providing value to href will connect me to that url??
miriam-z
@miriam-z
Jun 22 2016 17:52
display social icons inline?
Jonathan
@JonKaric
Jun 22 2016 17:53
@miriam-z Float left
miriam-z
@miriam-z
Jun 22 2016 17:53
@JonKaric :+1:
Jonathan
@JonKaric
Jun 22 2016 17:53
@moorejmike post code and ill take a look
Adam Lichter
@spot1000
Jun 22 2016 17:53
@sahil1995 it's like adding a stylesheet to your webpage that's specifically that font
Adam Lichter
@spot1000
Jun 22 2016 17:54
I was just about to post that link!
miriam-z
@miriam-z
Jun 22 2016 17:54
@JonKaric would that be as a class= float-left or am I adding this to a seperate div?
Randy Goldsmith
@Dueldrawer8
Jun 22 2016 17:54
@spot1000 hahaha thats funny
sahil chahar
@sahil1995
Jun 22 2016 17:54
thanks
Jonathan
@JonKaric
Jun 22 2016 17:55
@miriam-z For each icon (or its parent container) youll need to style them in your css
miriam-z
@miriam-z
Jun 22 2016 17:55
@JonKaric cool
Jonathan
@JonKaric
Jun 22 2016 17:56
so .social-icons li {float:left; display:block}
miriam-z
@miriam-z
Jun 22 2016 17:56
@JonKaric is this in css or html? That looks like css :)
Randy Goldsmith
@Dueldrawer8
Jun 22 2016 17:56
@miriam-z yes css
Mike Moore
@moorejmike
Jun 22 2016 17:57
@JonKaric can you refresh my memory on how to post code?
miriam-z
@miriam-z
Jun 22 2016 17:57
@moorejmike back ticks
Jonathan
@JonKaric
Jun 22 2016 17:57
@moorejmike If you have a codepen post that link, otherwise it's like 4 back ticks start and end of code
Randy Goldsmith
@Dueldrawer8
Jun 22 2016 17:58
@miriam-z you can tell by the dot (.) which is used to select classes in your css and you can select id's by # in css
Mike Moore
@moorejmike
Jun 22 2016 17:58
 <nav class="navbar navbar-default navbar-fixed-top">
    <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><a href="#">Page 1</a></li>
        <li><a href="#">Page 2</a></li>
        <li><a href="#">Page 3</a></li>
      </ul>
      </div>
    </div>
  </nav>
@JonKaric @miriam-z thank you!
CamperBot
@camperbot
Jun 22 2016 17:58
moorejmike sends brownie points to @jonkaric and @miriam-z :sparkles: :thumbsup: :sparkles:
:cookie: 106 | @jonkaric |http://www.freecodecamp.com/jonkaric
:cookie: 121 | @miriam-z |http://www.freecodecamp.com/miriam-z
Mike Moore
@moorejmike
Jun 22 2016 17:58
@JonKaric here's the codepen link http://codepen.io/moorejmike/pen/OXbvjw
Jonathan
@JonKaric
Jun 22 2016 18:01
@moorejmike its because there is navbar class inside the div with navbar attatched to it. ill find you a link to display a company logo
MikeBeers
@MikeBeers
Jun 22 2016 18:01
Looking for help on my Simon project. I am unable to get the colors to flash one right after another. I was only able to get them to flash at the same time. I am now trying to log the diffrent colors to the console but am only getting the first. Looking for help with setTimeout
Line 103
nebastion
@nebastion
Jun 22 2016 18:03
Sup all is this the right place for feedback on a project?
Jonathan
@JonKaric
Jun 22 2016 18:05
@nebastion go for it ill have a look over it
CamperBot
@camperbot
Jun 22 2016 18:06
nebastion sends brownie points to @jonkaric :sparkles: :thumbsup: :sparkles:
:cookie: 108 | @jonkaric |http://www.freecodecamp.com/jonkaric
Jonathan
@JonKaric
Jun 22 2016 18:06
@MikeBeers try help/javascript room. they will probably be able to help more, dont know javascript that well
@nebastion Code wise its all good apart from the abbr element youve got in there for the line seperator
Mike Moore
@moorejmike
Jun 22 2016 18:09
@JonKaric I'm still not seeing it
nebastion
@nebastion
Jun 22 2016 18:11
@JonKaric Ha, didnt think that would get noticed. Thats not allowed, or its not standard practice?
Jonathan
@JonKaric
Jun 22 2016 18:11
@moorejmike html: line 3 - remove the class 'navbar' from lement
@nebastion http://www.w3schools.com/tags/tag_abbr.asp - all youll need is a div to do the same thing
Anurag Sharma
@anu0012
Jun 22 2016 18:12
Hey all, I have a doubt in random quote generator. do i have to use api key in order to generate quote ? I have not much experience with api.
Mike Moore
@moorejmike
Jun 22 2016 18:13
@JonKaric I was missing a hyphen. Thanks for straightening me out!
CamperBot
@camperbot
Jun 22 2016 18:13
moorejmike sends brownie points to @jonkaric :sparkles: :thumbsup: :sparkles:
:warning: moorejmike already gave jonkaric points
IndiraShrestha
@IndiraShrestha
Jun 22 2016 18:16
Hi, Can anyone help me why the font is gray instead of white out here
Marco Mazzeo
@Doko85
Jun 22 2016 18:16
it's "color: #FFF;"
Robert Friedman
@robfr77
Jun 22 2016 18:18
@MikeBeers I used a global variable to keep track of what turn it is and an array to keep track of what buttons have already been selected. Each turn the computer selects a new button and that is added to the array. a local variable loops through the array and the function recursively calls itself if it has not reached the end of the loop. prior to calling the function recursively I used a counter variable to make sure that the local variable will start at the next index position once the function starts again
Marco Mazzeo
@Doko85
Jun 22 2016 18:20
@IndiraShrestha I can't make it work O_O
Robert Friedman
@robfr77
Jun 22 2016 18:20
@anu0012 the one that free code camp suggests requires an api key. I used weather underground which also requires one but I had an easier time with it
Jonathan
@JonKaric
Jun 22 2016 18:20
@IndiraShrestha Marco is right, you font-color doesnt exist. Use color:white instead
IndiraShrestha
@IndiraShrestha
Jun 22 2016 18:21
@JonKaric eekk
yeah
Marco Mazzeo
@Doko85
Jun 22 2016 18:21
it's not just that
Anurag Sharma
@anu0012
Jun 22 2016 18:21
@robfr77 Thanks for the help ^_^
CamperBot
@camperbot
Jun 22 2016 18:21
anu0012 sends brownie points to @robfr77 :sparkles: :thumbsup: :sparkles:
:cookie: 317 | @robfr77 |http://www.freecodecamp.com/robfr77
Marco Mazzeo
@Doko85
Jun 22 2016 18:21
every single edit I make doesn't work
the page is always the same
IndiraShrestha
@IndiraShrestha
Jun 22 2016 18:21
get confused
thank you
Jonathan
@JonKaric
Jun 22 2016 18:21
@Doko85 tried clicking the run button?
Robert Friedman
@robfr77
Jun 22 2016 18:21
@anu0012 np
Marco Mazzeo
@Doko85
Jun 22 2016 18:22
lmao I feel so noob now
btw still grey text
that pen is broken
I just copied and pasted the whole code to a new pen of mine and it works
Jonathan
@JonKaric
Jun 22 2016 18:26
@Doko85 i could edit his fine so might just be a problem with your browser or somthin
Marco Mazzeo
@Doko85
Jun 22 2016 18:27
 <p>
      <h1>Free Code Camp Weather App</h1>  
      <h1>Weather App</h1>
    </p>

body {
  background: #000;
}

h1 {
  color: #FFFFFF;
  font-size: 5em;
  text-align: center;
}
this works
afk
Ryan
@ispeakcomputer
Jun 22 2016 18:39
This has saved my butt more then once . Curious about any other tools like this that will point out syntax errors / etc http://jshint.com/
Venus Vavadiya
@venusvavadiya
Jun 22 2016 18:41
Ryan
@ispeakcomputer
Jun 22 2016 18:43
Nice thank @venusvavadiya ill give that a whirl soon.
CamperBot
@camperbot
Jun 22 2016 18:43
needsmorecoffee sends brownie points to @venusvavadiya :sparkles: :thumbsup: :sparkles:
:cookie: 18 | @venusvavadiya |http://www.freecodecamp.com/venusvavadiya
Venus Vavadiya
@venusvavadiya
Jun 22 2016 18:44
Thanks @needsMoreCoffee
CamperBot
@camperbot
Jun 22 2016 18:44
venusvavadiya sends brownie points to @needsmorecoffee :sparkles: :thumbsup: :sparkles:
:cookie: 314 | @needsmorecoffee |http://www.freecodecamp.com/needsmorecoffee
Taylor Morgan
@tmdesigned
Jun 22 2016 18:44
@ohiosierra
Does anyone know what it is called in javascript when the function is written in-line as part of more code? i.e. json.forEach(function(val) {
var keys = Object.keys(val);
I would like to read more about it but don't know what that technique is called
Gavin Broekema
@GavinGoneWild
Jun 22 2016 18:44
@jdtdesigns But then I can't use @extends.
elminsterrr
@elminsterrr
Jun 22 2016 18:46
Hello, Guys. Can anyone please tell me what do I do wrong? I'm trying to take input from user from textbox from html and change it to variable inside JS and then to print it to console.log. But I'm getting blank values...
Here is my CodePen: http://codepen.io/elminsterrr/pen/vKyjeb
It should be so simple but it is my first try and I messed something up...
Ryan
@ispeakcomputer
Jun 22 2016 18:46
anonymous function or call back function. read this last night @ohiosierra
@ohiosierra check out that article. It does not disappoint.
Taylor Morgan
@tmdesigned
Jun 22 2016 18:49
Many thanks @needsMoreCoffee
CamperBot
@camperbot
Jun 22 2016 18:49
ohiosierra sends brownie points to @needsmorecoffee :sparkles: :thumbsup: :sparkles:
:cookie: 315 | @needsmorecoffee |http://www.freecodecamp.com/needsmorecoffee
Ryan
@ispeakcomputer
Jun 22 2016 18:50
no problem , im finally helping others . Thats a sign i hope .
Adam Lichter
@spot1000
Jun 22 2016 18:53
@elminsterrr just try removing it from it's own function and put it right in the console.log

'<script>

function mySweetButtonFunction() {
console.log("@");
console.log(document.getElementById("bravo").value);
}

</script>'

like so

'''

<script>

function mySweetButtonFunction() {
console.log("@");
console.log(document.getElementById("bravo").value);
}

</script>
'''

CamperBot
@camperbot
Jun 22 2016 18:55
:bulb: to format code use backticks! ``` more info
Adam Lichter
@spot1000
Jun 22 2016 18:56
I still can't get that right...
elminsterrr
@elminsterrr
Jun 22 2016 18:56
@spot1000 Thanks
CamperBot
@camperbot
Jun 22 2016 18:56
elminsterrr sends brownie points to @spot1000 :sparkles: :thumbsup: :sparkles:
:cookie: 303 | @spot1000 |http://www.freecodecamp.com/spot1000
elminsterrr
@elminsterrr
Jun 22 2016 18:56
:)
Adam Lichter
@spot1000
Jun 22 2016 18:57
no problem!
i think the reason why it wasn't working is because you were trying to call it from outside the function
Sorin Ruse
@sorinr
Jun 22 2016 19:02
@elminsterrr where is your js code that trigger the onclik event for doing what u want?
Adam Lichter
@spot1000
Jun 22 2016 19:02
he had it in the script tags on the HTML window
amir
@aizen3
Jun 22 2016 19:16
hello world
CamperBot
@camperbot
Jun 22 2016 19:16

welcome to FreeCodeCamp @aizen3!

amir
@aizen3
Jun 22 2016 19:16
guys in this part
Use CSS Selectors to Style Elements
i did every thing right except one thing this
Your h2 element should be blue.
i dont know whats the problem here
Adam Lichter
@spot1000
Jun 22 2016 19:17
what does your code look like?
amir
@aizen3
Jun 22 2016 19:18
<style> h2 {color: blue;} CatphotoAPP </style>
this is how i wrote it
but still giving me that Your h2 element should be blue. is x
Eric
@wiltbit
Jun 22 2016 19:21
Hi, Can anyone suggest a work around for my fixed navbar that covers up part of my section content? https://codepen.io/wiltbit/full/xOOJrX/
Adam Lichter
@spot1000
Jun 22 2016 19:22
ah, when you're trying to do an inline style change like that it should look something like this:
<h2 style = "color:blue">CatphotoApp</h2>
Sorin Ruse
@sorinr
Jun 22 2016 19:23
@wiltbit what do u mean by it covers up part of your section content?
Samuel Plumppu
@Greenheart
Jun 22 2016 19:24
@jdtdesigns Thanks a lot man! :smile:
CamperBot
@camperbot
Jun 22 2016 19:24
greenheart sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 548 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Eric
@wiltbit
Jun 22 2016 19:24
The section titles
amir
@aizen3
Jun 22 2016 19:24
in fact i already did that right but iam talking about the next part
ok
Sanne
@sannek
Jun 22 2016 19:24
@aizen3 @spot1000 You should put your styling inside the style tags according to the assignment. Don't put the 'CatphotoApp' inside the style tag though. Did you remember to remove the inline style in the html?
amir
@aizen3
Jun 22 2016 19:24
Use CSS Selectors to Style Elements
Eric
@wiltbit
Jun 22 2016 19:25
@sorinr You can see my portfolio but not the title above it...
Sanne
@sannek
Jun 22 2016 19:25
@amir can you copy-paste your full code, not just the snippet?
amir
@aizen3
Jun 22 2016 19:25
aha now i got
i just wanna try by my self
Sanne
@sannek
Jun 22 2016 19:26
Ok, good
Eric
@wiltbit
Jun 22 2016 19:26
@sorinr I've added padding-top to the body but it looks strange
Abdoul rachid ayouba
@abdoul-rachid
Jun 22 2016 19:26
it isn't working
amir
@aizen3
Jun 22 2016 19:27
thnx for helping sanne
Sanne
@sannek
Jun 22 2016 19:28
@abdoul-rachid What isn't?
amir
@aizen3
Jun 22 2016 19:28
i did it right now
Sanne
@sannek
Jun 22 2016 19:28
Good, glad you got it to work
amir
@aizen3
Jun 22 2016 19:28
thnx D
Eric
@wiltbit
Jun 22 2016 19:28
@sorinr Also tried moving the anchor tags around and that doesn't work either
Sorin Ruse
@sorinr
Jun 22 2016 19:31
@wiltbit no. the problem is that you have navbar fixed to the top and when u navigate to the portfolio section the title is going actually under your navbar
Eric
@wiltbit
Jun 22 2016 19:32
@sorinr Yes but I still want to use the "fixed" navbar
Sorin Ruse
@sorinr
Jun 22 2016 19:33
@wiltbit give your section a margin-top like 50px
Eric
@wiltbit
Jun 22 2016 19:35
@sorinr will give it a try
@sorinr still doesn't work
Taylor Morgan
@tmdesigned
Jun 22 2016 19:44
Quick question - for callback functions, are the default available arguments just val and index? Are there others?
to be clear, I may not even know what I am asking. But it seems that callback functions have some default arguments
like index
I guess it just depends on what the callback function is?
JD Tadlock
@jdtdesigns
Jun 22 2016 19:50
@ohiosierra callbacks don't have default arguments
you can give them arguments
Taylor Morgan
@tmdesigned
Jun 22 2016 19:50
not even "arguments" as an array of arguments?
JD Tadlock
@jdtdesigns
Jun 22 2016 19:53
@ohiosierra if you don't give the function arguments, arguments will equal 0
Eric
@wiltbit
Jun 22 2016 19:53
@sorinr Thanks for taking a look
CamperBot
@camperbot
Jun 22 2016 19:54
wiltbit sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 377 | @sorinr |http://www.freecodecamp.com/sorinr
JD Tadlock
@jdtdesigns
Jun 22 2016 19:56
@ohiosierra When you are referring to a function that takes index and value as arguments, you are referencing a function that has been created to take those two arguments, not a standard callback
DJ Pelland
@dna113p
Jun 22 2016 19:56
@ohiosierra Callbacks are a separate idea. You have probably only encountered them so far with array methods like forEach or map. YOU are in charge of creating the callback function for those, but in the case of something like array.forEach... it will call your callback function with some arguments so that you can use them. Callback functions are a widely used idea in javascript though, which comes down to the fact that you can pass any function as an argument.
Colin
@finkbeca
Jun 22 2016 20:03
Can some one help me I am trying to add font awesome icons to my buttons (The empty circle buttons) None of them show up. What am I doing wrong?
DJ Pelland
@dna113p
Jun 22 2016 20:04
@finkbeca post your codepen?
Sorin Ruse
@sorinr
Jun 22 2016 20:04
@finkbeca have u loaded the fa library?
Colin
@finkbeca
Jun 22 2016 20:04
sorry
and yes @sorinr
Sorry again I thought I posted it
Sorin Ruse
@sorinr
Jun 22 2016 20:06
@finkbeca what is this? <link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
@finkbeca where is your path to fa?
Colin
@finkbeca
Jun 22 2016 20:06
I got it at Font Awesome. Why? @sorinr
What should i be using?
Colin
@finkbeca
Jun 22 2016 20:08
put this into a link?
Sorin Ruse
@sorinr
Jun 22 2016 20:09
@finkbeca yes
Colin
@finkbeca
Jun 22 2016 20:09
Thanks
Can i ask you two other quick questions
One why is their a wacky margin on the right?
Sorin Ruse
@sorinr
Jun 22 2016 20:11
@finkbeca what do u mean by "wacky" margin?
Melanie
@MelanieLeAnn
Jun 22 2016 20:12
My question isn't a technical one. It's more of an etiquette question. What if you like someone's picture/graphic that they've used on their blog and you would like to use it yourself. Do you ask them first?
Ryan
@ispeakcomputer
Jun 22 2016 20:13
@MelanieLeAnn Yes you would and then if its their photo you would give them credit. Photographers are crazy about who gets to use their work. I have heard of businesses getting sued before for this .
Colin
@finkbeca
Jun 22 2016 20:14
how there is the gap on the right side beyond the portfolio @sorinr Sorry again
Melanie
@MelanieLeAnn
Jun 22 2016 20:14
Thank you, @needsMoreCoffee!
CamperBot
@camperbot
Jun 22 2016 20:14
melanieleann sends brownie points to @needsmorecoffee :sparkles: :thumbsup: :sparkles:
:cookie: 316 | @needsmorecoffee |http://www.freecodecamp.com/needsmorecoffee
UtkarshShukla7
@UtkarshShukla7
Jun 22 2016 20:14
@finkbeca use overflow-x: hidden; style on your body
DJ Pelland
@dna113p
Jun 22 2016 20:14
@finkbeca Hey I had trouble with weird margins popping up too. If you put overflow-x: hidden on your body element it will go away
Ryan
@ispeakcomputer
Jun 22 2016 20:14
being that most likely you are not making any profit from your website they could ask you to cease and desist should they find out typically allowing you a time to remove the photo.
but better not to .
Melanie
@MelanieLeAnn
Jun 22 2016 20:15
got it
Ryan
@ispeakcomputer
Jun 22 2016 20:15
@MelanieLeAnn check the licenses for creative commons photos on flicker . there are some there you can use.
Colin
@finkbeca
Jun 22 2016 20:15
@UtkarshShukla7 @dna113p Thanks
CamperBot
@camperbot
Jun 22 2016 20:15
finkbeca sends brownie points to @utkarshshukla7 and @dna113p :sparkles: :thumbsup: :sparkles:
:cookie: 330 | @dna113p |http://www.freecodecamp.com/dna113p
:cookie: 684 | @utkarshshukla7 |http://www.freecodecamp.com/utkarshshukla7
UtkarshShukla7
@UtkarshShukla7
Jun 22 2016 20:15
@finkbeca np
Colin
@finkbeca
Jun 22 2016 20:16
@UtkarshShukla7 @dna113p Either of you know why the background isnt showing up around the buttons? (Class Footer-box)
Ryan
@ispeakcomputer
Jun 22 2016 20:16
and that license says its free to use some even will let you use it if its commercial but i have heard of people changing the licenses way after posting it on the net which makes using them iffy even @MelanieLeAnn
glad i could help !
DJ Pelland
@dna113p
Jun 22 2016 20:22
@finkbeca Hey you have a weird bracket above your .footer-box class
@finkbeca that is messing things up
@finkbeca an extra closing curly bracket '}'
@finkbeca but also I don't think "frey" is a color?
Tyler Moeller
@TylerMoeller
Jun 22 2016 20:25
@finkbeca Another spare bracket at line 80. Click the gear icon next to "CSS" and click the "Analyze CSS" button - there is also a missing colon and "grey" spelled as "frey"
Suzanne Atkinson
@AdventureBear
Jun 22 2016 20:31
posted this in the wrong room today. I'm moderately (very) pleased with my CSS on simon so far. Nothing super fancy, just pleased i have it mostly done. On to the game programming...
Colin
@finkbeca
Jun 22 2016 20:35
@TylerMoeller Thankyou I didn't know I could do that
CamperBot
@camperbot
Jun 22 2016 20:35
finkbeca sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 618 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Ken Haduch
@khaduch
Jun 22 2016 20:41
<