These are chat archives for FreeCodeCamp/HelpFrontEnd

6th
Jun 2017
Gulsvi
@gulsvi
Jun 06 2017 00:00
@tylerjj17 You'll have to move your if/else into your getJSON and use temp, or wrap it into a function and send temp as an argument to that function. Make sure it's a number not text too - should work fine after that
Right now, you're doing var far; which sets it to undefined and then asking if far > 80 or undefined > 80
r0ulito
@r0ulito
Jun 06 2017 00:01
and i think there's an other pb sky
Look @
.css('background-image','url(http://res.cloudinary.com/dh8lrmygd/image/upload/v1496705892/pexels-photo-29724_gwrog9.jpg)'
is http://res.cloudinary.com/dh8lrmygd/image/upload/v1496705892/pexels-photo-29724_gwrog9.jpghave to be quoted ? ;)
.css('background-image','url("http://res.cloudinary.com/dh8lrmygd/image/upload/v1496705892/pexels-photo-29724_gwrog9.jpg")'
Isn't it better? ;)
Ingram Jones
@Iggy1906
Jun 06 2017 00:09
Alright, so I got the banner and the navbar functioning properly. The order is the problem now. I need to the banner to get on top of the navbar. In the code, the header where the banner pic is come before the navbar but in the display the navbar is on top of the banner. Any suggestions as to what might be the reason for this?
Amit Patel
@AmitP88
Jun 06 2017 00:19
@SkyC0der I see. I think I saw somewhere that my css was already minified, but I'll check again. A lot of the problems seem to stem from the fact that I use several URIs, including Google Fonts, minified bootstrap, etc
Ingram Jones
@Iggy1906
Jun 06 2017 00:20
oops, I see I forgot to include the link. Alright, so I got the banner and the navbar functioning properly. The order is the problem now. I need to the banner to get on top of the navbar. In the code, the header where the banner pic is come before the navbar but in the display the navbar is on top of the banner. Any suggestions as to what might be the reason for this? https://codepen.io/iggy1906/pen/WjLwWK?editors=1100
Tyler Johnson
@tylerjj17
Jun 06 2017 00:22
@SkyC0der i moved the if/else but it says unexpected token if
https://codepen.io/tylerjj17/pen/XgWpRj
Eric Voigt
@ericvoigt
Jun 06 2017 00:23
@LordMathis awesome thanks.. have never heard of that but will check it out
CamperBot
@camperbot
Jun 06 2017 00:23
ericvoigt sends brownie points to @lordmathis :sparkles: :thumbsup: :sparkles:
:cookie: 342 | @lordmathis |http://www.freecodecamp.com/lordmathis
Eric Voigt
@ericvoigt
Jun 06 2017 00:27
is there a way to view codepen without the side panel?
and never mind
Gulsvi
@gulsvi
Jun 06 2017 00:32
@AmitP88 I didn't look, but I saw "style.css" and assumed it wasn't minified
@tylerjj17 Just a copy/paste error - your brackets are out of place
Ideally, however, you'll want that if/else code in your ajax success function where you define temp
Andrew Hickman
@ahickman3
Jun 06 2017 00:37
My background picture takes like 4 seconds to load, is there anyway to speed it up?
nvm, i think its the website, gunna host it myself
Gulsvi
@gulsvi
Jun 06 2017 00:39
If anyone knows how to get that DeepWarp eye gaze effect, I want to try it out :p
Long Nguyen
@longnt80
Jun 06 2017 00:41
@SkyC0der that looks so creepy
Gulsvi
@gulsvi
Jun 06 2017 00:41
I know lol, going to give me nightmares
Eric Voigt
@ericvoigt
Jun 06 2017 00:41
glad i dont have the api or whatever lol
Gulsvi
@gulsvi
Jun 06 2017 00:41
stop looking at my mouse pointer
Long Nguyen
@longnt80
Jun 06 2017 00:42
@SkyC0der it should work for horror movie's poster
Gulsvi
@gulsvi
Jun 06 2017 00:44
lol, would be great for that
Eric Voigt
@ericvoigt
Jun 06 2017 00:45
how can i move an image so it stays fixed on the page and doesn't move around when resize
Gulsvi
@gulsvi
Jun 06 2017 00:47
make it a background image and specify an exact size
Ravi Kishore Thella
@ravikishorethella
Jun 06 2017 00:47
@ericvoigt position: fixed
Gulsvi
@gulsvi
Jun 06 2017 00:48
define: "move around" - I thought you meant resize :)
Eric Voigt
@ericvoigt
Jun 06 2017 00:49
ahh sheeeet lol.. yeah not resize.. tried position: fixed and it jump down to the bottom (original position) also have.. top: #; right: #;
can i do relative, fixed?
think i got i
t
thanks
@ravikishorethella @SkyC0der my image is fixed but now it is moving up and down with the scroll.. thought relative, fixed would do it but not sure
what do to
r0ulito
@r0ulito
Jun 06 2017 00:55
I don't manage to do what i want to do
Give me hints
How can I do for JS to "listen" to my checkbox to change temperature units ? :)
Andrew Hickman
@ahickman3
Jun 06 2017 00:57
so im having a hell of a time changing text color on the bootstrap nav bar, anyone mind helping me out?
r0ulito
@r0ulito
Jun 06 2017 00:58
@fullmetal7777 explain ;)
Andrew Hickman
@ahickman3
Jun 06 2017 00:59
@R0ulito alright so first issue, i get the thing on codepen from sublime and a couple of color changes ive made arent showing up. Otherwise, im just trying to get colors changed and getting to targeting it in css is a huge pain in the ass lol Actually, ive found targeting anything in css with bootstrap is a ton harder than without it. Still, the gain much outweights the troubles lol
but, ive got it up on codepen :D @R0ulito https://codepen.io/fullmetal7777/pen/KqwByL
@R0ulito just so you get an idea of what it looks like now http://prntscr.com/fgd208
Gulsvi
@gulsvi
Jun 06 2017 01:01
That uses background-attachment: fixed
Andrew Hickman
@ahickman3
Jun 06 2017 01:01
@R0ulito i hate codepen btw lol
Sidafa Conde
@sconde
Jun 06 2017 01:07
Hello All,
Gulsvi
@gulsvi
Jun 06 2017 01:07
@R0ulito You're very close - just set up a click function for your toggle switch
Sidafa Conde
@sconde
Jun 06 2017 01:07

Hello All,

I could use some feedback on my FCC: wikipedia project
https://codepen.io/sconde/full/LLYJYr/

Andrew Hickman
@ahickman3
Jun 06 2017 01:08
@R0ulito Some very solid input there lol :P
r0ulito
@r0ulito
Jun 06 2017 01:09
i didn't get it @fullmetal7777
What's the problem (i'm french, maybe i didn't get it cause of it)
Andrew Hickman
@ahickman3
Jun 06 2017 01:09
@R0ulito its in the chat, you didnt?
@R0ulito ah french, yesh that explains everything lol https://codepen.io/fullmetal7777/pen/KqwByL
r0ulito
@r0ulito
Jun 06 2017 01:11
What are the color you want to change ?
I'm done :)
thank again @SkyC0der
CamperBot
@camperbot
Jun 06 2017 01:14
r0ulito sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1624 | @skyc0der |http://www.freecodecamp.com/skyc0der
r0ulito
@r0ulito
Jun 06 2017 01:14
I just have to change append method to html
And i'm good
Andrew Hickman
@ahickman3
Jun 06 2017 01:16
@R0ulito prettty much everything. The color when i hover, background colors, both disabled and active, that sort of thing. Ive even looked in the bootstrap css and copied the way they do it and notta
Brian
@Cornielle
Jun 06 2017 01:16
Hellow Worldw
r0ulito
@r0ulito
Jun 06 2017 01:17
You have to overpass it
like
.the-class-you-want-to-change {
prop1:value!important;
prop2:value!important;
kirontoo
@kirontoo
Jun 06 2017 01:19
@fullmetal7777 if you want to change color while hovering try .class-you-want-to-change:hover
Andrew Hickman
@ahickman3
Jun 06 2017 01:21
@R0ulito !important did it lol thanks buddy, i appareciate it.
CamperBot
@camperbot
Jun 06 2017 01:21
fullmetal7777 sends brownie points to @r0ulito :sparkles: :thumbsup: :sparkles:
:cookie: 272 | @r0ulito |http://www.freecodecamp.com/r0ulito
r0ulito
@r0ulito
Jun 06 2017 01:21
That's the way it is @fullmetal7777 ;)
Some people help me
I help some people ;)
In fact @SkyC0der helps everyone and we help some people :tongue:
Dax
@djfrakes
Jun 06 2017 01:24
hello I m working on personal portfolio webpage. I am working in code pen. I am trying to add background but its not work here is my code
html{ background: url(../images/office.jpg);}
r0ulito
@r0ulito
Jun 06 2017 01:25
@SkyC0der thanks again for the hint !!! Tomorrow i'll put the weather icons and i'm done with that
CamperBot
@camperbot
Jun 06 2017 01:25
r0ulito sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: r0ulito already gave skyc0der points
r0ulito
@r0ulito
Jun 06 2017 01:25
@djfrakes you're trying to reach a local picture
Ken Haduch
@khaduch
Jun 06 2017 01:25
@Fullmetal777 - you should be able to do it without !important.
Gulsvi
@gulsvi
Jun 06 2017 01:26
And then I jump in and help people when you're trying to help people lol
but thank you too for being helpful @R0ulito :)
CamperBot
@camperbot
Jun 06 2017 01:26
skyc0der sends brownie points to @r0ulito :sparkles: :thumbsup: :sparkles:
:cookie: 273 | @r0ulito |http://www.freecodecamp.com/r0ulito
Ken Haduch
@khaduch
Jun 06 2017 01:26
I'm at the gym, but I could look at it later unless it's all working
Gulsvi
@gulsvi
Jun 06 2017 01:27
I have to agree with Ken on that @fullmetal7777 !important is for the weak :) always a way around it
Dax
@djfrakes
Jun 06 2017 01:27
@R0ulito yes Im trying to use a picture from my images folder that I download
r0ulito
@r0ulito
Jun 06 2017 01:27
The point is, when i use codepen i don't code anywhere else
=)
So i have no problems like these
just to try
Gulsvi
@gulsvi
Jun 06 2017 01:28
@fullmetal7777 The problem is that you aren't using codepen correctly :p All of your resources must go in the settings or nothing will work as expected
Dax
@djfrakes
Jun 06 2017 01:30
@R0ulito I used unsplash.com
fdemaa
@fdemaa
Jun 06 2017 01:30
@djfrakes whats your problem?
r0ulito
@r0ulito
Jun 06 2017 01:30
link your codepen tho :)
Dax
@djfrakes
Jun 06 2017 01:32
https://codepen.io/djfrakes/pen/MoYzpM @fdemaa I trying add a background image that I download from unsplash.com
fdemaa
@fdemaa
Jun 06 2017 01:33
you cant upload a image from your computer to codepen, unless you have a premium account
r0ulito
@r0ulito
Jun 06 2017 01:34
@djfrakes first :
Don't apply bg to html but body instead
then already told you you can't use local ressource ;)
i changed it
Dax
@djfrakes
Jun 06 2017 01:34
oohhhh
r0ulito
@r0ulito
Jun 06 2017 01:34
body{background: url("https://cdn.pixabay.com/photo/2014/09/11/18/23/london-441853_960_720.jpg");}
fdemaa
@fdemaa
Jun 06 2017 01:35
@djfrakes use a image from the web
r0ulito
@r0ulito
Jun 06 2017 01:35
Works fine
Dax
@djfrakes
Jun 06 2017 01:35
ohhh
why you can't use local resource ?
fdemaa
@fdemaa
Jun 06 2017 01:35
@djfrakes you have to pay
Long Nguyen
@longnt80
Jun 06 2017 01:36
@djfrakes because it's private
Sergio Rodriguez
@sergrdz7
Jun 06 2017 01:36
@djfrakes You can do it if you use codepen projects which allows you to store actual files of your project. But you're only allowed one project on the free version.
Long Nguyen
@longnt80
Jun 06 2017 01:36
nobody can access your computer
Dax
@djfrakes
Jun 06 2017 01:36
ok
Sergio Rodriguez
@sergrdz7
Jun 06 2017 01:38
@djfrakes I recommend using http://cloudinary.com to upload your images and then it gives you a url which you can paste on codepen.
fdemaa
@fdemaa
Jun 06 2017 01:38
@longnt80 hi man!
Long Nguyen
@longnt80
Jun 06 2017 01:38
@fdemaa hello!
Dax
@djfrakes
Jun 06 2017 01:43
@sergrdz7 @longnt80 @fdemaa @R0ulito thank you all
CamperBot
@camperbot
Jun 06 2017 01:43
djfrakes sends brownie points to @sergrdz7 and @longnt80 and @fdemaa and @r0ulito :sparkles: :thumbsup: :sparkles:
:cookie: 137 | @fdemaa |http://www.freecodecamp.com/fdemaa
:cookie: 328 | @longnt80 |http://www.freecodecamp.com/longnt80
:cookie: 274 | @r0ulito |http://www.freecodecamp.com/r0ulito
:cookie: 281 | @sergrdz7 |http://www.freecodecamp.com/sergrdz7
fdemaa
@fdemaa
Jun 06 2017 01:43
@longnt80 i finish my portfolio man
Long Nguyen
@longnt80
Jun 06 2017 01:44
@fdemaa good job! can I have a look
what do you think ?
Ccs99817
@ccs99817
Jun 06 2017 01:46
@fdemaa WOW! How did u make it? It is absolutely elegant!
@fdemaa I am struggling on how to make it! haha
fdemaa
@fdemaa
Jun 06 2017 01:46
you are being too nice :smile:
Sidafa Conde
@sconde
Jun 06 2017 01:46
@fdemaa looks great. Maybe you should center the contact
fdemaa
@fdemaa
Jun 06 2017 01:47
@sconde yes it might look much better centering ! thanks!
CamperBot
@camperbot
Jun 06 2017 01:47
fdemaa sends brownie points to @sconde :sparkles: :thumbsup: :sparkles:
:cookie: 295 | @sconde |http://www.freecodecamp.com/sconde
fdemaa
@fdemaa
Jun 06 2017 01:48
@ccs99817 on what are you having problems?
Long Nguyen
@longnt80
Jun 06 2017 01:49
@fdemaa still have room for improvement for sure, but at this stage, it's good enough!
fdemaa
@fdemaa
Jun 06 2017 01:50
@longnt80 thanks man!
CamperBot
@camperbot
Jun 06 2017 01:50
fdemaa sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 329 | @longnt80 |http://www.freecodecamp.com/longnt80
Marius Nicolae
@bytao7mao
Jun 06 2017 01:54
@fdemaa nice portfolio man, gj
fdemaa
@fdemaa
Jun 06 2017 01:57
@bytao7mao thanks man!
CamperBot
@camperbot
Jun 06 2017 01:57
fdemaa sends brownie points to @bytao7mao :sparkles: :thumbsup: :sparkles:
:cookie: 122 | @bytao7mao |http://www.freecodecamp.com/bytao7mao
r0ulito
@r0ulito
Jun 06 2017 02:00
going sleep
Bye mates ;)
fdemaa
@fdemaa
Jun 06 2017 02:02
bye!
Dax
@djfrakes
Jun 06 2017 02:14
so my profile pic that trying to include above my name is not showing up https://codepen.io/djfrakes/pen/MoYzpM
Alvin-Capello
@Alvin-Capello
Jun 06 2017 02:20
Hey everyone. I'm taking a first crack at the Twitch API project and I decided to try to use a for loop combined with string concatenation to output the streaming status. The code I have right now does is not working, but could anyone tell me if the JavaScript code that I already have is perhaps close to working, or do I need to make radical changes to it? I will post a link to the CodePen below.
Marius Nicolae
@bytao7mao
Jun 06 2017 02:21
@dax change the scr into src
and add to class= the line - between prof and pic
Hamza Saleemi
@Azmah21
Jun 06 2017 02:26
hey guys!
Marius Nicolae
@bytao7mao
Jun 06 2017 02:29
@Azmah21 hello
Dax
@djfrakes
Jun 06 2017 02:29
@bytao7mao thank you
CamperBot
@camperbot
Jun 06 2017 02:29
djfrakes sends brownie points to @bytao7mao :sparkles: :thumbsup: :sparkles:
:cookie: 123 | @bytao7mao |http://www.freecodecamp.com/bytao7mao
Hamza Saleemi
@Azmah21
Jun 06 2017 02:31
can you guys please tell me how to use a scaled down version of an image as my background?
I want to make my portfolio responsive so that the image has similar proportions on different screen sizes
Joe Skowronek
@jskowronek
Jun 06 2017 02:32
Why isnt my background image showing up?
Alvin-Capello
@Alvin-Capello
Jun 06 2017 02:33
@jskowronek Try adding in background-size: cover; to your CSS and see if that does the trick.
@jskowronek Ah nevermind, I see that you already have it. Maybe you have to make the picture height smaller?
Hamza Saleemi
@Azmah21
Jun 06 2017 02:37
here's my pen
Joe Skowronek
@jskowronek
Jun 06 2017 02:37
Yup tried that :( is my page 1 in the wrong spot on HTML
Hamza Saleemi
@Azmah21
Jun 06 2017 02:37
how can I stretch my image so that it covers the entire div?
Joe Skowronek
@jskowronek
Jun 06 2017 02:38
@Azmah21 try
background-size:cover;
Hamza Saleemi
@Azmah21
Jun 06 2017 02:39
@jskowronek already using it
Joe Skowronek
@jskowronek
Jun 06 2017 02:39
Maybe increase the height
Marius Nicolae
@bytao7mao
Jun 06 2017 02:40
@jskowronek the link is not valid for image
Gulsvi
@gulsvi
Jun 06 2017 02:40
@jskowronek Your URL to that background image is a web page, not an image
Hamza Saleemi
@Azmah21
Jun 06 2017 02:40
If I increase the height wouldn't my image appear differently on different screen sizes?
1code1
@1code1
Jun 06 2017 02:41
Hey guys
Marius Nicolae
@bytao7mao
Jun 06 2017 02:41
@jskowronek and organize the divs and tags better, you have some divs which is not closed
1code1
@1code1
Jun 06 2017 02:41
I'm on my portfolio project now!
question is should I use bootstrap 3 or 4?
Alvin-Capello
@Alvin-Capello
Jun 06 2017 02:41
@Alvin-Capello
Hey everyone. I'm taking a first crack at the Twitch API project and I decided to try to use a for loop combined with string concatenation to output the streaming status. The code I have right now does is not working, but could anyone tell me if the JavaScript code that I already have is perhaps close to working, or do I need to make radical changes to it? I will post a link to the CodePen below.
https://codepen.io/AlvinCapello/pen/EXaeQQ?editors=0010
1code1
@1code1
Jun 06 2017 02:42
4 is still in alpha stage and I want to make my project live with a. host when I'm done
so should I use 3?
Alvin-Capello
@Alvin-Capello
Jun 06 2017 02:43
@1code1 3 is what I used. Here is the URL for it...
Joe Skowronek
@jskowronek
Jun 06 2017 02:43
ha ha it was not a jpg I used a different image and it worked
Gulsvi
@gulsvi
Jun 06 2017 02:43
Right, it was a .html :)
1code1
@1code1
Jun 06 2017 02:44
Thanks
Im gonna use this one @Alvin-Capello
Gulsvi
@gulsvi
Jun 06 2017 02:44
You can still use that other image @jskowronek https://cdn.pixabay.com/photo/2017/04/10/10/08/universe-2218012_960_720.jpg
Alvin-Capello
@Alvin-Capello
Jun 06 2017 02:45
@1code1 No problem. Just go to Pen Settings and paste that link in the Add External CSS section.
Alvin-Capello
@Alvin-Capello
Jun 06 2017 02:45
@jskowronek Nice!
1code1
@1code1
Jun 06 2017 02:45
@Alvin-Capello ohh you can do that I was just gonna link it in the header
here is my first project
tribute page
if anyone cares loll
Marius Nicolae
@bytao7mao
Jun 06 2017 02:48
@1code1 very nice maybe you can add a footer and a link to the information about.
1code1
@1code1
Jun 06 2017 02:50
@bytao7mao can do a footer, good idea. What do you mean information about?
@bytao7mao I did a little different than the example from FCC I wanted to be creative and have a magazine vibe to it
Marius Nicolae
@bytao7mao
Jun 06 2017 02:51
i mean a link to Kobe Bryant
1code1
@1code1
Jun 06 2017 02:51
@bytao7mao ohh ok I put one to him in the first paragraph
@bytao7mao link is his name (first words)
Marius Nicolae
@bytao7mao
Jun 06 2017 02:52
@1code1 found it :)) nice, gj
1code1
@1code1
Jun 06 2017 02:53
@bytao7mao thanks
CamperBot
@camperbot
Jun 06 2017 02:53
1code1 sends brownie points to @bytao7mao :sparkles: :thumbsup: :sparkles:
:cookie: 124 | @bytao7mao |http://www.freecodecamp.com/bytao7mao
JazzLiberation
@JazzLiberation
Jun 06 2017 03:20
Hey guys, I'm doing the tribute page challenge and was wondering could anyone tell me how to link my image on codepen? I mean it's in my root folder on my desktop but how do i get it online? Does that makes sense? Thank you (:
Marius Nicolae
@bytao7mao
Jun 06 2017 03:25
upload it on some uploading site and get the link from there
Gulsvi
@gulsvi
Jun 06 2017 03:25
@JazzLiberation Most people use https://postimage.org
1code1
@1code1
Jun 06 2017 03:25
@JazzLiberation it has to be online, try finding it online
Gulsvi
@gulsvi
Jun 06 2017 03:25
It will give you a link to use for your tribute page
JazzLiberation
@JazzLiberation
Jun 06 2017 03:29
Thanks so much @1code1 @SkyC0der!!! seems obvious now :O (:
CamperBot
@camperbot
Jun 06 2017 03:29
jazzliberation sends brownie points to @1code1 and @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: @1code1's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
:star2: 1625 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 06 2017 03:29
It's all obvious once you figure it out :)
Have fun writing your tribute page :p
JazzLiberation
@JazzLiberation
Jun 06 2017 03:30
Exactly! haha thank you!!
1code1
@1code1
Jun 06 2017 03:30
enjoy
Im having trouble with a background image for my portfolio page
this is my code for it
but it won't pop up on the screen
Marius Nicolae
@bytao7mao
Jun 06 2017 03:31
give codepen url
Marius Nicolae
@bytao7mao
Jun 06 2017 03:33
@1code1 the code is a mess :)))
1code1
@1code1
Jun 06 2017 03:33
really
omg
I'm very new
Hamza Saleemi
@Azmah21
Jun 06 2017 03:33
could you also please help me with my background image?
https://codepen.io/Azmah21/pen/gRbQrX?editors=1000
Gulsvi
@gulsvi
Jun 06 2017 03:34
height: 100% only works when the element outside has a specific height already set.
Marius Nicolae
@bytao7mao
Jun 06 2017 03:34
@1code1 wait 1 min , i'm editing right now to set it up
1code1
@1code1
Jun 06 2017 03:35
man im so lost
I thought I was doing good lol
I'm less than a week in tho
Hamza Saleemi
@Azmah21
Jun 06 2017 03:36
@SkyC0der what should I set the outside height to?
1code1
@1code1
Jun 06 2017 03:36
@Azmah21 your code looks better than mine
Hamza Saleemi
@Azmah21
Jun 06 2017 03:36
@1code1 thanks man but it still doesn't run
CamperBot
@camperbot
Jun 06 2017 03:36
azmah21 sends brownie points to @1code1 :sparkles: :thumbsup: :sparkles:
:warning: @1code1's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
Gulsvi
@gulsvi
Jun 06 2017 03:36
@Azmah21 How tall do you want the background image to be?
100% of the height of the page?
Marius Nicolae
@bytao7mao
Jun 06 2017 03:37
1code1
@1code1
Jun 06 2017 03:38
@bytao7mao thanks
CamperBot
@camperbot
Jun 06 2017 03:38
1code1 sends brownie points to @bytao7mao :sparkles: :thumbsup: :sparkles:
:warning: 1code1 already gave bytao7mao points
1code1
@1code1
Jun 06 2017 03:38
@bytao7mao how would I break it up when I want to put a second image underneath
Hamza Saleemi
@Azmah21
Jun 06 2017 03:39
@SkyC0der I want to divide the page into three sections and make it a single scroll page. The idea is that the image will cover their screen when they open the webpage kind of like the first image in this portfolio https://youtu.be/V72o34gY4Lw
1code1
@1code1
Jun 06 2017 03:39
I want a continuous scrolling page
@Azmah21 thats what I want to!!!
Hamza Saleemi
@Azmah21
Jun 06 2017 03:39
@1code1 that's cause we're both working on the same project
1code1
@1code1
Jun 06 2017 03:40
@Azmah21 yup
@Azmah21 not everyone does it that way tho, some people do one background all the way down
I don't like that look
I'm going for a modern vibe
Hamza Saleemi
@Azmah21
Jun 06 2017 03:40
@1code1 me neither
Marius Nicolae
@bytao7mao
Jun 06 2017 03:40
If you want a second image underneath, you can simply add in HTML <div class="thumbnail"><img src="#">
Hamza Saleemi
@Azmah21
Jun 06 2017 03:41
I want to have different backgrounds for different sections
Marius Nicolae
@bytao7mao
Jun 06 2017 03:41
@1code1 and of course don;t forget to close the divs
Alvin-Capello
@Alvin-Capello
Jun 06 2017 03:41
Hey everyone. I'm taking a first crack at the Twitch API project and I decided to try to use a for loop combined with string concatenation to output the streaming status. The code I have right now does is not working, but could anyone tell me if the JavaScript code that I already have is perhaps close to working, or do I need to make radical changes to it? I will post a link to the CodePen below.
https://codepen.io/AlvinCapello/pen/EXaeQQ?editors=0010
Hamza Saleemi
@Azmah21
Jun 06 2017 03:45
@bytao7mao it didn't work for me https://codepen.io/Azmah21/pen/gRbQrX?editors=1000
Marius Nicolae
@bytao7mao
Jun 06 2017 03:47
@Azmah21 What didn't worked ? the image is there.
shivam gupta
@shivamg11000
Jun 06 2017 03:47
Hey I have completed my 2d game, https://codepen.io/shivamg11000/full/RgwwwQ/
Suggestions are encouraged, tell me of any error in the game.
Gulsvi
@gulsvi
Jun 06 2017 03:49
@Azmah21 @1code1 You'll need to set up a <section> for each different section and specify a height. You can then use a background image for each of those sections. Something like this: https://codepen.io/skycoder/pen/xrbBZw?editors=1100
Hamza Saleemi
@Azmah21
Jun 06 2017 03:49
@bytao7mao it's too big and I don't think I can edit text inside the image since it's a thumbnail
@SkyC0der thanks man this pretty much sums up what I'm trying to do
Gulsvi
@gulsvi
Jun 06 2017 03:51
I tried to make it as simple as possible to show an example
<section> for each section, then a height for each one of those sections and a background image
default bootstrap navbar from the documentation
could you take a look at my pen
instead of nav class I used ul class
for navigation
should I do <ul class and pills or <nav class and buttons
Gulsvi
@gulsvi
Jun 06 2017 03:58
If it's your main navbar, I think you should use <nav>
It's supposed to help with screen readers and search engines so they can better tell what that part of your page is for
@1code1
I used this one in my example above: http://getbootstrap.com/components/#navbar
1code1
@1code1
Jun 06 2017 04:00
thanks
@SkyC0der thanks
CamperBot
@camperbot
Jun 06 2017 04:02
1code1 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1626 | @skyc0der |http://www.freecodecamp.com/skyc0der
Alvin-Capello
@Alvin-Capello
Jun 06 2017 04:17
I could really use some help here.
hemant rao
@hemant92
Jun 06 2017 04:34
hi im creating portfolio using codepen bootstrap. but my menu is appearing vertically instead of horizontally
Ccs99817
@ccs99817
Jun 06 2017 04:35
I need help!!
What could I add if I want that when I click the nav bar, the page move to specific height?
fdemaa
@fdemaa
Jun 06 2017 04:44
@ccs99817 you mean smooth scrolling ?
you need javascript for that i think
Ccs99817
@ccs99817
Jun 06 2017 04:47
@fdemaa I see no javascript in this example(https://codepen.io/Azmah21/pen/gRbQrX?editors=1100). Sorry for copying the link directly, Azmah21!
fdemaa
@fdemaa
Jun 06 2017 04:50
@ccs99817 ah yes you can do that matching each href with an id

<li><a href="#About">About</a></li>

<div id="About"></div>

Ccs99817
@ccs99817
Jun 06 2017 04:52
@fdemaa Thanks a lot! I got it!~~~
CamperBot
@camperbot
Jun 06 2017 04:52
:cookie: 138 | @fdemaa |http://www.freecodecamp.com/fdemaa
ccs99817 sends brownie points to @fdemaa :sparkles: :thumbsup: :sparkles:
fdemaa
@fdemaa
Jun 06 2017 04:52
:+1:
!
Ccs99817
@ccs99817
Jun 06 2017 04:56
@fdemaa https://codepen.io/ccs99817/pen/owgXKz?editors=1100
Here's mine! Can you give me some feedbacks?
Don't care about the context! HAHA><
Lokesh Dudigollar
@lokeshdudigollar
Jun 06 2017 05:02
<div class=thumbnail img-responsive> why this is not adding a white background??
Johnny
@jtan3
Jun 06 2017 05:06
@MachineVision2020 can we see your link? hard to tell without it.
fdemaa
@fdemaa
Jun 06 2017 05:09
@ccs99817 nice work man! you do it in 1 day ? omg ?
Johnny
@jtan3
Jun 06 2017 05:10
@MachineVision2020 you want the background to be white?
Lokesh Dudigollar
@lokeshdudigollar
Jun 06 2017 05:12
I want a white background behind the image
can anyone help me im trying to resize the logos in my "about" but cant figure out how
Johnny
@jtan3
Jun 06 2017 05:14
@MachineVision2020 style="background-color: white"
@MachineVision2020 place it in your image div
Lokesh Dudigollar
@lokeshdudigollar
Jun 06 2017 05:14
@jtan3 will it add background only to the image or entire page??
Vicky Lai
@vickylai
Jun 06 2017 05:15
Hi all. I just pushed up a design update on my website. If you're up for it, would some of you take a look and let me know if anything's gone horribly wrong? Thanks so much! https://vickylai.io/
Johnny
@jtan3
Jun 06 2017 05:15
@MachineVision2020 should be in that div
fdemaa
@fdemaa
Jun 06 2017 05:16
@vickylaiio looks great, the only thing is cut is the about part , but other than that i really like it
Vicky Lai
@vickylai
Jun 06 2017 05:17
@fdemaa Cut? What do you mean?
Johnny
@jtan3
Jun 06 2017 05:18
@vickylaiio wow, super nice! Did you have design experience before?
Lokesh Dudigollar
@lokeshdudigollar
Jun 06 2017 05:19
@jtan3 thank you so much but one more qustion how do I set that background to be same size of the image and then both(img and background) same size of jumbotron??
CamperBot
@camperbot
Jun 06 2017 05:19
machinevision2020 sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 393 | @jtan3 |http://www.freecodecamp.com/jtan3
kirontoo
@kirontoo
Jun 06 2017 05:20
@botenga you should try using font-awesome, they have the icons for all of that stuff and you can also resize the logos using fa-2x fa-3x fa-4x in the class
Ccs99817
@ccs99817
Jun 06 2017 05:20
@fdemaa Yesterday, I got this challenge. I thought i can't do this. But, this morning, i gave it a try. I found it is not that hard if you google. Just like what you have mentioned in your personal website, google teaches us a lot. Of course, without your help, i couldnt complete so fast. You are so helpful!!πŸ‘πŸΏπŸ‘πŸΏπŸ‘πŸΏπŸ˜
Lokesh Dudigollar
@lokeshdudigollar
Jun 06 2017 05:20
@vickylaiio that's really awesome
Botenga
@Botenga
Jun 06 2017 05:23
@vickylaiio it looks great. In my opinion you should also add your links to your social at the bottom of your page around where this was made with.
Johnny
@jtan3
Jun 06 2017 05:24
@MachineVision2020 you can center the img. You can add width to the picture.
Botenga
@Botenga
Jun 06 2017 05:24
@vickylaiio when i mean add it i mean add images
/icons
@kirontoo thanks I will you font awesome instead
CamperBot
@camperbot
Jun 06 2017 05:27
botenga sends brownie points to @kirontoo :sparkles: :thumbsup: :sparkles:
:cookie: 250 | @kirontoo |http://www.freecodecamp.com/kirontoo
Aata-allah
@Atalaa
Jun 06 2017 05:39
How can i set a background for a specific city with the API OpenWeatherMap for Local Weather project ?
JD Tadlock
@jdtdesigns
Jun 06 2017 05:41
@Atalaa If you're using codepen, you won't be able to use the openweather API without paying for a premium account.
Vicky Lai
@vickylai
Jun 06 2017 05:41
Thanks @jtan3
CamperBot
@camperbot
Jun 06 2017 05:41
vickylaiio sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 394 | @jtan3 |http://www.freecodecamp.com/jtan3
Aata-allah
@Atalaa
Jun 06 2017 05:41
@jdtdesigns they have free option
Vicky Lai
@vickylai
Jun 06 2017 05:41
Thanks @Botenga
CamperBot
@camperbot
Jun 06 2017 05:41
vickylaiio sends brownie points to @botenga :sparkles: :thumbsup: :sparkles:
:cookie: 124 | @botenga |http://www.freecodecamp.com/botenga
Aata-allah
@Atalaa
Jun 06 2017 05:41
Lokesh Dudigollar
@lokeshdudigollar
Jun 06 2017 05:42
@jtan3 I don't know what's happening!! I tried all methods to center image still it not centering. what's the code to center??
Vicky Lai
@vickylai
Jun 06 2017 05:42
Thanks @MachineVision2020
CamperBot
@camperbot
Jun 06 2017 05:42
vickylaiio sends brownie points to @machinevision2020 :sparkles: :thumbsup: :sparkles:
:cookie: 119 | @machinevision2020 |http://www.freecodecamp.com/machinevision2020
JD Tadlock
@jdtdesigns
Jun 06 2017 05:43
@Atalaa Yes, they have a free option for http, not https which Codepen requires now. So in order to use the API on Codepen, you'll need the premium account. ;)
Johnny
@jtan3
Jun 06 2017 05:43
@MachineVision2020 text-center the row where your picture is
JD Tadlock
@jdtdesigns
Jun 06 2017 05:44
They offer https for free
Aata-allah
@Atalaa
Jun 06 2017 05:45
@jdtdesigns Yeah i heard there is 3 top api are Yahoo, Wunderground and openweather
@jdtdesigns and how should i do to have a specific background for each city automatically ?
JD Tadlock
@jdtdesigns
Jun 06 2017 05:46
To answer your question regarding backgrounds for a specific location, you could use https://developers.google.com/maps/documentation/javascript/places along with https://developers.google.com/places/web-service/photos to get a photo.
@Atalaa
Aata-allah
@Atalaa
Jun 06 2017 05:47
@jdtdesigns means i will use the google api as well or its aapart
JD Tadlock
@jdtdesigns
Jun 06 2017 05:48
@Atalaa Yes, you would need to register an app with your google account to use the api. The google API is challenging but offers an unlimited amount of data. ;)
Aata-allah
@Atalaa
Jun 06 2017 05:50
@jdtdesigns thank you
CamperBot
@camperbot
Jun 06 2017 05:50
atalaa sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star2: 1010 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Aata-allah
@Atalaa
Jun 06 2017 05:50
is it an google weather api u sent me right now ? @jdtdesigns
@jdtdesigns
JD Tadlock
@jdtdesigns
Jun 06 2017 05:51
@Atalaa No, you would still use either apixu or weatherunderground for weather. Use the google API to get a photo for a city.
Aata-allah
@Atalaa
Jun 06 2017 05:52
@jdtdesigns ok, i will use google for photo and https://darksky.net/dev/docs for my weather api
JD Tadlock
@jdtdesigns
Jun 06 2017 05:52
;)
Aata-allah
@Atalaa
Jun 06 2017 05:54
@jdtdesigns youy google link u sent me is in french wich its ok cuz im french, but is it in english for u ?
JD Tadlock
@jdtdesigns
Jun 06 2017 05:54
@Atalaa Google knows all
Aata-allah
@Atalaa
Jun 06 2017 05:54
@jdtdesigns hahahahaha it change it auto right
JD Tadlock
@jdtdesigns
Jun 06 2017 05:54
right ;)
Aata-allah
@Atalaa
Jun 06 2017 05:55
@jdtdesigns thank u my friend
CamperBot
@camperbot
Jun 06 2017 05:55
atalaa sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:warning: atalaa already gave jdtdesigns points
JD Tadlock
@jdtdesigns
Jun 06 2017 05:55
welcome
Lawanu Borthakur
@Lawanu
Jun 06 2017 06:02
how to do source-over and destination-over with canvas background as black so,that black background doesnot take part in global composition?
<script type="text/javascript"> 
var canvas;
 var cvasCntext;
 window.onload=function() 
{ 
canvas=document.getElementById('cArea'); cvasCntext=canvas.getContext('2d'); cvasCntext.fillStyle="black"; 
cvasCntext.fillRect(0,0,400,400);
 cvasCntext.fillStyle='green'; 
cvasCntext.fillRect(25,0,100,100); cvasCntext.globalCompositeOperation='destination-over';//here my yellow rectangle disappears.I want my yellow rectangle to be visible and not overlap by black rectangle. 
cvasCntext.fillStyle='yellow';
 cvasCntext.fillRect(50,0,100,100); 
cvasCntext.restore();
} 
</script>
help!!
Danny R.
@DRick504
Jun 06 2017 06:08
Hey, could someone take a look at my code and let me know why its malfunctioning? https://codepen.io/DRick504/pen/XgWpaj
fdemaa
@fdemaa
Jun 06 2017 06:26
@DRick504 you are on the last project?
Danny R.
@DRick504
Jun 06 2017 06:26
No, still one more after this one I believe
@fdemaa still one more, I believe
fdemaa
@fdemaa
Jun 06 2017 06:27
@DRick504 you are so close :smile:
Danny R.
@DRick504
Jun 06 2017 06:28
@fdemaa which makes it all the more frustrating that I'm stuck lol
fdemaa
@fdemaa
Jun 06 2017 06:29
@DRick504 lol
Amit Patel
@AmitP88
Jun 06 2017 06:34
hey guys, I'm trying to get a pagespeed score above 90% and I'm kind of stuck. It says that my styles.css and media_queries.css files are render blocking. Is the only way to get around this is to inline all css from these two files? or is there another way to unblock it while keeping the css in their own files?
pagespeed.png
J-Mag Guthrie
@baseballpoetess
Jun 06 2017 07:56
about @AmitP88
CamperBot
@camperbot
Jun 06 2017 07:56
:cookie: 293 | @amitp88 |http://www.freecodecamp.com/amitp88
J-Mag Guthrie
@baseballpoetess
Jun 06 2017 07:56
which challenge is this for, @AmitP88 I can't read images cuz I'm visually-impaired.
Alexander Domikov
@AlexanderDom
Jun 06 2017 08:20
did you looked at link Optimize css delivery @AmitP88 ?
YozhikM
@YozhikM
Jun 06 2017 08:57
I need your help. I need to make sure that the block with pictures on the right is scrolled, and all other blocks remain in their places http://mysolaris.xyz/slide1.html Please help me
Ankur
@noobcoder007
Jun 06 2017 09:41
Hi guys! Can you please tell me why the navbar is not showing in my page,
h1tag
@h1tag
Jun 06 2017 09:53
@noobcoder007 you're using Bootstrap 3 classes but adding Bootstrap 4
kylehopev
@kylehopev
Jun 06 2017 09:57
can someone help me with bootstrap container
Does anyone know if it is possible to change the .container's background into an image?
Ankur
@noobcoder007
Jun 06 2017 10:04
@h1tag thanks!
CamperBot
@camperbot
Jun 06 2017 10:04
noobcoder007 sends brownie points to @h1tag :sparkles: :thumbsup: :sparkles:
:cookie: 834 | @h1tag |http://www.freecodecamp.com/h1tag
Manjula Konappanavar
@manjulam83
Jun 06 2017 10:10
Hi Guys i am working on weather application i want to change the background image as per the weather condition how to approach on this
h1tag
@h1tag
Jun 06 2017 10:11
@manjulam83 point_up :point_up:
or u can use an array for the images and change it based on the weather condition
@kylehopev yes, you can
Michiel
@MichielHuijse
Jun 06 2017 10:15
Michiel @MichielHuijse 12:13
Hi I want to use the localweather json api. But I think I am doing something wrong with parenthesis. Can someone tell me what I am doing wrong! thanks https://codepen.io/michiel-huijse/pen/eBWBVz
CamperBot
@camperbot
Jun 06 2017 10:15
sorry michielhuijse, you can't send brownie points to yourself! :sparkles: :sparkles:
Manjula Konappanavar
@manjulam83
Jun 06 2017 10:18
@h1tag my api sends back some weather condition and codes , so u mean to say i need to decide some weather conditions like sunny, could, rain.
h1tag
@h1tag
Jun 06 2017 10:18
@MichielHuijse if you check the browser console, you'll find a mixed content error
@manjulam83 yes
Manjula Konappanavar
@manjulam83
Jun 06 2017 10:18
how many conditions we need to decide
h1tag
@h1tag
Jun 06 2017 10:18
as many as u can, or the main ones
JohnGalt
@osirisseye
Jun 06 2017 10:21
when building a code Pen - i want to use bootstrap, but it tells me not to include anything in the <head> of the html document - how can I use bootstrap in codepen then?
Michiel
@MichielHuijse
Jun 06 2017 10:22
@h1tag the console of codepen gives no errors
h1tag
@h1tag
Jun 06 2017 10:22
@MichielHuijse this error happens basically when there's http and https urls in the same page. And you're loading the pen using https and using a http url in your code
the browser one, not the codepen one (you can launch it using ctrl+shift+i or j on windows/linux)
@osirisseye from the css settings
JohnGalt
@osirisseye
Jun 06 2017 10:24
@h1tag can you elaborate? (I should change sth in the css settings in CodePen?)
JohnGalt
@osirisseye
Jun 06 2017 10:24
@h1tag thanks !
CamperBot
@camperbot
Jun 06 2017 10:24
osirisseye sends brownie points to @h1tag :sparkles: :thumbsup: :sparkles:
:cookie: 835 | @h1tag |http://www.freecodecamp.com/h1tag
Michiel
@MichielHuijse
Jun 06 2017 10:30
@h1tag ok, but when I change everything to https it is not working, what is the best workarround?
h1tag
@h1tag
Jun 06 2017 10:31
@MichielHuijse it's working
you can do something like console.log(lat + long) to test it
Michiel
@MichielHuijse
Jun 06 2017 10:32
@h1tag ok thanks
@h1tag thanks
CamperBot
@camperbot
Jun 06 2017 10:33
michielhuijse sends brownie points to @h1tag :sparkles: :thumbsup: :sparkles:
:cookie: 836 | @h1tag |http://www.freecodecamp.com/h1tag
Vicky Lai
@vickylai
Jun 06 2017 10:41
Question for anyone with a personal website hosted on GitHub pages: Did you include a license in your repo? If so, which?
Calvin
@oakypokey
Jun 06 2017 10:42

Hey guys! I’ve been pouring over this for hours and I can’t figure out what wrong. The console is printing out this error:

Uncaught TypeError: Cannot read property 'id' of undefined
at getUserIDs (VM409 pen.js:26)
at VM409 pen.js:47
getUserIDs @ VM409 pen.js:26
(anonymous) @ VM409 pen.js:47

  //List of channels
  var channelList = ["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"];

  //Getting the user information using the list above
  var getUser = function(){
    var api = "https://cors-anywhere.herokuapp.com/https://wind-bow.gomix.me/twitch-api/users/";
    var result = [];
    for (var j = 0; j < channelList.length; j++){
     $.getJSON(api+channelList[j],function(data){
        result.push({
          "id":data["_id"],
          "username":data["display_name"],
          "logo":data["logo"]
        });
      })
     }
    return result;
    };

  //Getting user IDs from the information we requested
  function getUserIDs(users){
    var IDs = [];
    for (var i =0; i < channelList.length; i++){
    IDs.push(users[i]["id"]);
  }
    return IDs;
  }

  //Getting the stream information from the userIds we collected
  var getStream = function(userIDs){
    var api = "https://cors-anywhere.herokuapp.com/https://wind-bow.gomix.me/twitch-api/streams/channel/"
    var streamData = []
    for( var i = 0; i < channelList.length; i++){
     $.getJSON(api+userIDs[i], function(data){
      streamData.push(data.stream[i]);
    })
    }
    return streamData;
  };

  console.log(getStream(getUserIDs(getUser())));
I don’t know why though :/
Zhanibek
@zhann1982
Jun 06 2017 10:56
@oakypokey Hello! My console shows that : users[i] is undefined , and your getUser returns empty array
Calvin
@oakypokey
Jun 06 2017 10:57
@zhann1982 my console shows that too: but when I change the return result in the getUser function, it outputs an array with 8 objects as it should?
*when i change it from return result to console.log(result);
Luigi Benvenuti
@lbluigi
Jun 06 2017 10:59
Hi guys, I'm stuck at the javascript calculator project. I can't figure out the logic, do I need to work with strings, arrays, objects or what? the problem is that I can't understand how to multiply, divide, add and substract user's inputs following expressions order
some hints?
h1tag
@h1tag
Jun 06 2017 11:06
@oakypokey can you share the pen?
Right now the JS isn’t interacting with the DOM, I just want to be able to log something correctly to the console before I do anything else
Manjula Konappanavar
@manjulam83
Jun 06 2017 11:07
@MichielHuijse why are u using http as code pen works as https ,it will be problem which i had faced and redo my application
h1tag
@h1tag
Jun 06 2017 11:07
@oakypokey you fixed the error?
Manjula Konappanavar
@manjulam83
Jun 06 2017 11:08
using https://api.apixu.com for api
Calvin
@oakypokey
Jun 06 2017 11:08
@h1tag no :/
h1tag
@h1tag
Jun 06 2017 11:08
@oakypokey I don't see it
Calvin
@oakypokey
Jun 06 2017 11:08
@h1tag what are you looking for?
h1tag
@h1tag
Jun 06 2017 11:08
the error
Manjula Konappanavar
@manjulam83
Jun 06 2017 11:09
@MichielHuijse https://freegeoip.net/json/ for lat and long and
Calvin
@oakypokey
Jun 06 2017 11:09
check the Javascript console
h1tag
@h1tag
Jun 06 2017 11:09
I did
Manjula Konappanavar
@manjulam83
Jun 06 2017 11:09
https://api.apixu.com for api weather
Calvin
@oakypokey
Jun 06 2017 11:09
the browser one not hte codepen one
h1tag
@h1tag
Jun 06 2017 11:09
yes, I did
make sure you saved your progress
Calvin
@oakypokey
Jun 06 2017 11:10
yeah i did
try now?
Screen Shot 2017-06-06 at 3.10.28 pm.png
This is the error that I am getting:/
but when I log result to the console from getUser, it has all the objects:
Screen Shot 2017-06-06 at 3.09.57 pm.png
h1tag
@h1tag
Jun 06 2017 11:12
@oakypokey I can see it when I launch it using ctrl+shift+j but not when I use ctrl+shift+i, weird
h1tag
@h1tag
Jun 06 2017 11:19
Could be a synchronization error, a line of code executes before you get the result from the API
Calvin
@oakypokey
Jun 06 2017 11:19
:worried:
h1tag
@h1tag
Jun 06 2017 11:25
@oakypokey do you know at which line the error happens?
Calvin
@oakypokey
Jun 06 2017 11:25
it would be line 21
but I’m calling the function at the very end
Zhanibek
@zhann1982
Jun 06 2017 11:27
@oakypokey I think you have problem with asynchronose loading of data. I guess you are declaring "result" before the data arrive
h1tag
@h1tag
Jun 06 2017 11:27
it's at line 24
Calvin
@oakypokey
Jun 06 2017 11:28
@zhann1982 how would i go about fixing it? I tried doing something to do with callbacks but i don’t think i did it right :/
h1tag
@h1tag
Jun 06 2017 11:30
@oakypokey what do u get when u log result inside getUser?
Calvin
@oakypokey
Jun 06 2017 11:31
This
It’s all the objects that I’m creating
Screen Shot 2017-06-06 at 3.09.57 pm.png
Zhanibek
@zhann1982
Jun 06 2017 11:31
I think you should make "result" a global variable. That would help to skip "return result" @oakypokey
@oakypokey Also the reason may be in second json call. It might shoot out first before you get "users"
Calvin
@oakypokey
Jun 06 2017 11:35
@zhann1982 okay i’ll give it a shit
*shot
hahahahahha
Zhanibek
@zhann1982
Jun 06 2017 11:36
:)
Calvin
@oakypokey
Jun 06 2017 11:36
wow i’m really tired
Thanks @zhann1982 @h1tag
CamperBot
@camperbot
Jun 06 2017 11:36
oakypokey sends brownie points to @zhann1982 and @h1tag :sparkles: :thumbsup: :sparkles:
:cookie: 837 | @h1tag |http://www.freecodecamp.com/h1tag
:cookie: 326 | @zhann1982 |http://www.freecodecamp.com/zhann1982
h1tag
@h1tag
Jun 06 2017 11:36
@oakypokey wait
Calvin
@oakypokey
Jun 06 2017 11:36
hmm?
Zhanibek
@zhann1982
Jun 06 2017 11:37
@oakypokey Using "promises" in this task is strongly recommended
Calvin
@oakypokey
Jun 06 2017 11:37
@zhann1982 yeahβ€” i just got to lean how they work :worried:
Zhanibek
@zhann1982
Jun 06 2017 11:38
@oakypokey Good Luck!
Calvin
@oakypokey
Jun 06 2017 11:38
@zhann1982 thanks!
CamperBot
@camperbot
Jun 06 2017 11:38
oakypokey sends brownie points to @zhann1982 :sparkles: :thumbsup: :sparkles:
:warning: oakypokey already gave zhann1982 points
h1tag
@h1tag
Jun 06 2017 11:39
@oakypokey maybe find a way to put all your function calls inside the first getJSON, you'll have to change other things in those functions like the parameters
and use let instead of var in loops with your getjson
Robert Ridley
@robertridley1988
Jun 06 2017 12:46

Hey guys. I'm building a pomodoro clock. I have a function, which is just two switch statements, that I can't get to work properly.

function checkNumLength(mins, seconds){
   switch(seconds.toString().length){
     case 1:
          $('#countWindow').text(mins + ':0' + seconds);
          console.log(mins + ':' + '0' + seconds);
          break;   

     case 2:
          $('#countWindow').text(mins + ':' + seconds);
          console.log(mins + ':' + seconds);
          break;
                                    }
    switch(mins.toString().length){
      case 1:
          $('#countWindow').text('0' + mins + ':' + seconds);
          break;  

      case 2:
          $('#countWindow').text(mins + ':' + seconds);
          break;
                                 }
    return mins, seconds;
  }

The idea of the switch statements is to check the length of two variables ('mins' and 'seconds') and then add a '0' in front of a single-numbered digit, similar to what a clock does. This works in the console (the console.logs output the correct value). However, the value displayed on the screen – at $('#countWindow') – always displays a single-digit number, like '25:0'; I want it to display '25:00'. Any ideas? Thanks. Also, for some reason, the minutes side seems to work well. The code is the same, so I'm confused as to what's going on.

Eric Weiss
@eweiss17
Jun 06 2017 12:56
@robertridley1988 You could try this https://www.w3schools.com/jsref/jsref_tofixed.asp
Long Nguyen
@longnt80
Jun 06 2017 12:58
@robertridley1988 it's because the second switch overwrite the first switch
Robert Ridley
@robertridley1988
Jun 06 2017 13:00
@longnt80 Haha. I just figured that to be the problem. Thanks for the spot, though. Just need to assign the value of 'seconds' to be "':0' + seconds" before running the second switch statement.
CamperBot
@camperbot
Jun 06 2017 13:00
robertridley1988 sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 330 | @longnt80 |http://www.freecodecamp.com/longnt80
Long Nguyen
@longnt80
Jun 06 2017 13:01
@robertridley1988 why don't you use if? It's shorter
if ( s < 10 ) { s = "0" + s; }
if ( m < 10 ) { m = "0" + m; }
if ( h < 10 ) { h = "0" + h; }
$('#countWindow').text(h + ':' + m + ':' + s);
Yara
@Yaroush
Jun 06 2017 13:02
hi ! how can i add fontawesome to codePen ?
Long Nguyen
@longnt80
Jun 06 2017 13:03
@robertridley1988 btw, I'm currently working on Pomodoro Clock too
Yara
@Yaroush
Jun 06 2017 13:03
please help :(
teevik
@teevik
Jun 06 2017 13:04
@Yaroush Add it to the external css resources in settings of your project
Yara
@Yaroush
Jun 06 2017 13:04
ok i know but how can i add it ?
what shall i write ?
Long Nguyen
@longnt80
Jun 06 2017 13:04
go to setting, and go to CSS tab, copy and paste the link above into
Yara
@Yaroush
Jun 06 2017 13:05
thank you so much @longnt80
CamperBot
@camperbot
Jun 06 2017 13:05
yaroush sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 331 | @longnt80 |http://www.freecodecamp.com/longnt80
Yara
@Yaroush
Jun 06 2017 13:17
how can i change a button background color ?
Ravi Kishore Thella
@ravikishorethella
Jun 06 2017 13:18
@Yaroush give the background-color to the button
teevik
@teevik
Jun 06 2017 13:18
CSS
Robert Ridley
@robertridley1988
Jun 06 2017 13:19
@longnt80 Thanks for the tip. How's the clock going for you?
CamperBot
@camperbot
Jun 06 2017 13:19
robertridley1988 sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:warning: robertridley1988 already gave longnt80 points
Long Nguyen
@longnt80
Jun 06 2017 13:21
@robertridley1988 I've been working for a few days now. I figure out how to start and pause the timer. Now I need to display it correctly.
Robert Ridley
@robertridley1988
Jun 06 2017 13:25
@longnt80 Nice. Which timer function are you using, setInterval()?
Long Nguyen
@longnt80
Jun 06 2017 13:26
@robertridley1988 that's what I tried first, but I learned the hard way that setInterval() is not reliable
SirExotic
@SirExotic
Jun 06 2017 13:26
@Yaroush The same way you change text color, but instead you use background-color
Long Nguyen
@longnt80
Jun 06 2017 13:27
@robertridley1988 now I use setTimeout() and the Date object
Robert Ridley
@robertridley1988
Jun 06 2017 13:28
@longnt80 Oh, right. I've used setInterval(). Haven't run into any issues so far – just the stop button to figure out now.
Long Nguyen
@longnt80
Jun 06 2017 13:29
@robertridley1988 that's because you haven't looked hard enough ;)
Robert Ridley
@robertridley1988
Jun 06 2017 13:30
@longnt80 Haha. Okay
Long Nguyen
@longnt80
Jun 06 2017 13:30
@robertridley1988 setInterval() will have lag so your timer actually a little bit slower than real time
@robertridley1988 when you try to setInterval in ONE millisecond, you'll see
@robertridley1988 what I learned is to use setTimeout(), it is more accurate
but the most accurate is to use the Date.now() to grab the real millisecond
Robert Ridley
@robertridley1988
Jun 06 2017 13:35
@longnt80 I see. I'll have to look at the docs to check that out.
Long Nguyen
@longnt80
Jun 06 2017 13:35
@robertridley1988 w3school and MDN didn't say anything about this though
@robertridley1988 if you want, I can send you the link discussing about this on stackoverflow.
Robert Ridley
@robertridley1988
Jun 06 2017 13:36
@longnt80 Awesome! That would be much appreciated. Thanks!!
CamperBot
@camperbot
Jun 06 2017 13:36
robertridley1988 sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:warning: robertridley1988 already gave longnt80 points
@robertridley1988 but I suggest you play around with setInterval() in 1 millisecond to see the lag effect
Thomas
@sjurs1
Jun 06 2017 13:38
Hi guys. Does the FCC Twitch API (https://wind-bow.gomix.me/twitch-api) only allow data from one stream at a time?
Long Nguyen
@longnt80
Jun 06 2017 13:39
@sjurs1 yes
you need to connect multiple APIs
Thomas
@sjurs1
Jun 06 2017 13:40
@longnt80 So I need to perform three separate ajax calls for example?
Long Nguyen
@longnt80
Jun 06 2017 13:40
yes
Thomas
@sjurs1
Jun 06 2017 13:40
Alright, simple enough. Thanks @longnt80 !
CamperBot
@camperbot
Jun 06 2017 13:40
sjurs1 sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 332 | @longnt80 |http://www.freecodecamp.com/longnt80
Long Nguyen
@longnt80
Jun 06 2017 13:40
no problem
Citrudev
@enonchong
Jun 06 2017 14:01
If you are starting out as a freelancer, join http://remoteapprentice.com today to grow in your freelance career. Get coaching and jobs!
ambuja
@ambuja
Jun 06 2017 14:08
I am trying to use this code but when use on a page all the links are changing the color , when I just want when radio button is selected to change the link background color - http://jsfiddle.net/sEwM6/148/
Any thoughts on this would be much appreciated
priyanka bhalla
@priyanka-bhalla
Jun 06 2017 14:10

$(document).ready(function(){
// https://en.wikipedia.org/w/api.php?action=opensearch&search=doggy&callback=?
$("#search").click(function(){

var searchTerm= $('#searchTerm').val();

$.ajax({

  type:'GET',
  url:'https://en.wikipedia.org/w/api.php?action=opensearch&search=' + searchTerm + '&callback=?',
  contentType: "application/json; charset=utf-8",
  async:false,
  dataType:'json',
  success:function(data){


      $('#output').html('');
for(var i=0;i<data[1].length;i++){
$('#output').prepend("<div><div class='btn-primary'><a href="+data[3][i]+"><h2>" + data[1][i] + "</h2>" + "<p>" + data[2][i] + "</p></a></div></div>");
  }
  $("#searchTerm").val('');
},

error:function(errorMessage){
 alert("ErrorMessage");
},

});

});
$("#searchTerm").keypress(function(e){
if(e.which==13){
$("#search").click();
}
});
});

please help tell me what is the error
Long Nguyen
@longnt80
Jun 06 2017 14:18
@ambuja $('h2 a').css('background-color', 'transparent')
InHo
@goceman86
Jun 06 2017 14:19

got a question.

so i created a button with a <a> but for some reason if i want to stytle the text inside the button i have to add the style directly in the <a> if i remove the style and try to add it in the css it doesnt effect it

here is the button code <button class="btn-primary cmbtn"><a href="#" class="btnfont" style="font-family:'Lobster'; font-size:1.8em">Contact Me</a></button> </div>

ambuja
@ambuja
Jun 06 2017 14:20
$('#' + dt).css('background-color', 'red')- this code is making the entire links on my page change color
@longnt80 $('#' + dt).css('background-color', 'red') this code is turning the links color on entire page I think
Gulsvi
@gulsvi
Jun 06 2017 14:23

@priyanka-bhalla Your ajax call looks fine, but it could be simplified:

    $.ajax({
      url: "https://en.wikipedia.org/w/api.php?action=opensearch&origin=*&search=" + searchTerm,
      success: function(data) {

Do you have a codepen? It's hard to tell what else might be going on - maybe an issue with IDs in your HTML

@ambuja When I click on a radio button, the relevant link is highlighted. Other links are not.
Click "Workshops" radio button, "Workshops" link background is red.
Click "Courses" radio button, "Courses" link background is red.
Click "Exclusivess" radio button, "Exclusives" link background is red.
please help
Gulsvi
@gulsvi
Jun 06 2017 14:29
@priyanka-bhalla You changed your link, it was working before. Add an & before format=json
https://en.wikipedia.org/w/api.php?action=opensearch&search=' + searchTerm + '&format=json&callback=?',
Or, simplify your $.ajax call:
    $.ajax({
      url: "https://en.wikipedia.org/w/api.php?action=opensearch&origin=*&search=" + searchTerm,
      success: function(data) {
ambuja
@ambuja
Jun 06 2017 14:29
@SkyC0der - When I use this code on another page that I am working on thats when the link are changing
Gulsvi
@gulsvi
Jun 06 2017 14:30
If you can show more code, we can try to help debug it better
The code you have shown us seems to do what you expect it to do
ambuja
@ambuja
Jun 06 2017 14:31
@SkyC0der ok let me put something up and send it over
Gulsvi
@gulsvi
Jun 06 2017 14:31

I would change this:

        $('h2 a').css('background-color', 'white')

To:

        $('h2 a').css('background-color', '')
Long Nguyen
@longnt80
Jun 06 2017 14:32
@ambuja I don't see how it change the color of other links
priyanka bhalla
@priyanka-bhalla
Jun 06 2017 14:33
@SkyC0der still not working
ambuja
@ambuja
Jun 06 2017 14:33
so when a user is on the page the CTA button needs to be grey in color and when the user selects the radio only then the CTA button changes to say Red
so I have two radio buttons
Gulsvi
@gulsvi
Jun 06 2017 14:34
@priyanka-bhalla It works fine for me. Maybe an issue with your network? I mean, the text is all blue with a blue background, but I get results shown on the page.
priyanka bhalla
@priyanka-bhalla
Jun 06 2017 14:36
thats the problem text is not visible
Gulsvi
@gulsvi
Jun 06 2017 14:37
@priyanka-bhalla Use CSS to change the color of the text
priyanka bhalla
@priyanka-bhalla
Jun 06 2017 14:38
but text is not visible
Gulsvi
@gulsvi
Jun 06 2017 14:39
@priyanka-bhalla Hover over the blue boxes with your mouse and you will see the text. It is visible.
You just need to use CSS to change the color
Gulsvi
@gulsvi
Jun 06 2017 14:47
image.png
@priyanka-bhalla Does that make sense? ^^ See the text in the picture?
@ambuja Sorry, I don't understand :/
You don't have any code for grey text. You have three radio buttons, not two.
I don't see a CTA button
priyanka bhalla
@priyanka-bhalla
Jun 06 2017 15:05
thanks alot m done
@SkyC0der thanks dear
CamperBot
@camperbot
Jun 06 2017 15:05
priyanka-bhalla sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1628 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 06 2017 15:05
Congrats :)
Danny R.
@DRick504
Jun 06 2017 15:45
Hey, can anyone help me figure out why this code is malfunctioning. When played it fills in multiple boxes instead of one: https://codepen.io/DRick504/pen/XgWpaj
MadsSN
@MadsSN
Jun 06 2017 15:51
@SkyC0der Hey Sky - How comfortable are you with React?
Gulsvi
@gulsvi
Jun 06 2017 15:59
@MadsSN I can tell what's going on when I read it, but couldn't write anything without copy/paste/modify :p
Elliot S.
@SwarmSE
Jun 06 2017 16:05
i'm having some trouble with bootstrap button groups, anyone able to take a look at my code and see what's going on?
Gulsvi
@gulsvi
Jun 06 2017 16:07
@SwarmSE Sure
Elliot S.
@SwarmSE
Jun 06 2017 16:08
https://codepen.io/swarmse/pen/qjBERQ
I'm trying to justify the buttons with the other cities on them within the centered window. i'd like them to squeeze together as the page is resized, but as it is now, they push out over the right side of the box as the window is resized to a narrower aspect.
Gulsvi
@gulsvi
Jun 06 2017 16:13
@SwarmSE This won't fix it, but there are a few issues: btn-group is meant for more than one button, your row needs a <div class="col"> inside of it, and the .buttonRow class set up in your CSS is going to override the default bootstrap row CSS and possibly cause some issues with the btn-group class.
I'll see if I can take a closer look
Elliot S.
@SwarmSE
Jun 06 2017 16:15
i was a little perplexed by wrapping each button in a button group as well. This was the method that was explained on the w3 page though.
For <button> elements, you must wrap each button in a .btn-group class:
<div class="btn-group btn-group-justified"> <div class="btn-group"> <button type="button" class="btn btn-primary">Apple</button> </div> <div class="btn-group"> <button type="button" class="btn btn-primary">Samsung</button> </div> <div class="btn-group"> <button type="button" class="btn btn-primary">Sony</button> </div> </div>
Gulsvi
@gulsvi
Jun 06 2017 16:15
The W3 page shows how to use Bootstrap 3. You are currently using Bootstrap 4 which is a completely different library - different class names, HTML, etc.
Elliot S.
@SwarmSE
Jun 06 2017 16:16
ohhhhh, that makes sense
Gulsvi
@gulsvi
Jun 06 2017 16:17
Some of the class names are the same (like btn-group), but others changed...which makes it even more confusing
Elliot S.
@SwarmSE
Jun 06 2017 16:18
right? i'll convert to bs3. that's probably the issue that was really holding things up.
Gulsvi
@gulsvi
Jun 06 2017 16:19
Good plan :) might clear things up a bit. Use this link in your settings and watch everything change :( https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css
Good luck :)
Elliot S.
@SwarmSE
Jun 06 2017 16:20
@SkyC0der thanks!
CamperBot
@camperbot
Jun 06 2017 16:20
swarmse sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1629 | @skyc0der |http://www.freecodecamp.com/skyc0der
Elliot S.
@SwarmSE
Jun 06 2017 16:21
oh it changed, but I think I can fix it now
Eric Voigt
@ericvoigt
Jun 06 2017 16:22
someone replied to this for me yesterday but it would take me an eternity to scroll back to it.. how can i have a fixed image that doesn't scroll up and down with the page? thank you
@SkyC0der do you sleep?
Gulsvi
@gulsvi
Jun 06 2017 16:25
@ericvoigt I slept 10hrs last night :) done with final exams :)
I replied to you yesterday, was asking if this is what you wanted: https://codepen.io/skycoder/pen/XgJoWp
ambuja
@ambuja
Jun 06 2017 16:29
@SkyC0der - this is pen I have created , so when user is on the page the CTA buttons needs to be grey only when the user selects the radio button needs to change to orange
Eric Voigt
@ericvoigt
Jun 06 2017 16:30
@SkyC0der nice congrats on finals!.. not sure i have a circle image that i want to keep anchored on the page at a specific location.. here is the file you will see the circle image right away.. it;s supposed to be next to portfolio blurb https://codepen.io/ericvoigt/pen/XRLQqw?editors=1000
Gulsvi
@gulsvi
Jun 06 2017 16:31
@ambuja Like this?
$('span a').css('background-color','grey')
$('input').on('change', function () {
    if ($(this).is(':checked')) {
        var dt = $(this).data('title')
        $('span a').css('background-color','grey')
        $('#' + dt).css('background-color','orange')
        console.log(dt)
    }
})
ambuja
@ambuja
Jun 06 2017 16:34
@SkyC0der yes , but I need to set default radio buttons to be unchecked and CTA buttons be grey
@ericvoigt looks good
Gulsvi
@gulsvi
Jun 06 2017 16:36
@ericvoigt It seems anchored to me, do you just want to keep it next to the text "Adjust your Altitude"?
@ambuja You can make them all unchecked with $('input').prop('checked', false);
$('span a').css('background-color','grey')
$('input').prop('checked', false);
$('input').on('change', function () {
    if ($(this).is(':checked')) {
        var dt = $(this).data('title')
        $('span a').css('background-color','grey')
        $('#' + dt).css('background-color','orange')
        console.log(dt)
    }
})
ambuja
@ambuja
Jun 06 2017 16:37
@SkyC0der yep that works , I am going to try it out
Eric Voigt
@ericvoigt
Jun 06 2017 16:38
@SkyC0der trying to keep it next to about me but same technique.. tried a few things but it would either stay in one spot and then move when i changed the size of the web page
alpox
@alpox
Jun 06 2017 16:39
@MadsSN I could maybe help
ambuja
@ambuja
Jun 06 2017 16:42
@SkyC0der one more thing If I want to call in a class that has all the button styles for the orange one
$('#' + dt).css('background-color','orange')
@SkyC0der Instead of using background-color , Is it possible to call in <a> class
Gulsvi
@gulsvi
Jun 06 2017 16:43
@ericvoigt I'm having trouble visualizing what you're trying to achieve :/
I noticed you have containers nested inside of containers and rows nested inside of rows - all of that may be contributing to the challenges you're facing with that image
Eric Voigt
@ericvoigt
Jun 06 2017 16:45
@SkyC0der just want to be able to make the image stay where I want in.. sheeeet... have lots to learn and i guess that is what i thought would be best.. but i guess not
Gulsvi
@gulsvi
Jun 06 2017 16:48
@ambuja I'm not sure I understand the question, but you can loop through all <a> elements of your page to get their background colors with something like this:
$('body a').filter(function() {
  console.log($(this).css('background-color'))
});
Eric Voigt
@ericvoigt
Jun 06 2017 16:48
@SkyC0der this is really my first go at a portfolio and thought with the divs you are just being more specific
Gulsvi
@gulsvi
Jun 06 2017 16:50
@ericvoigt The divs along with their class names make up the grid system, which is really the main benefit of using bootstrap: http://getbootstrap.com/css/#grid
ambuja
@ambuja
Jun 06 2017 16:51
@SkyC0der not all the body a element , so I have a CTA button already styled so instead of back-ground :orange
orange , I want to use a class
Gulsvi
@gulsvi
Jun 06 2017 16:51
I see, you can use the .addClass() method for that: https://api.jquery.com/addclass/
And .removeClass() to remove the class
This may take a couple of days to practice, but all of these methods will help you build what you want to achieve: https://api.jquery.com/category/manipulation/
Eric Voigt
@ericvoigt
Jun 06 2017 16:55
@SkyC0der thanks will look through that again and implement the right procedure
CamperBot
@camperbot
Jun 06 2017 16:55
ericvoigt sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1630 | @skyc0der |http://www.freecodecamp.com/skyc0der
Thomas
@sjurs1
Jun 06 2017 17:01
Man this twitch challenge is really fun!
Saeed Jassani
@saeedjassani
Jun 06 2017 17:04
hey @SkyC0der!
do you what these means in CSS transform: translate(-50%, -50%); transform: -webkit-translate(-50%, -50%); transform: -moz-translate(-50%, -50%); transform: -ms-translate(-50%, -50%);?
Gulsvi
@gulsvi
Jun 06 2017 17:07
@saeedjassani I haven't used translate() very much, but it moves the position of the element.
So, transform: translate(-50%, -50%) would move something left and up by 50%
alpox
@alpox
Jun 06 2017 17:07
It moves it relatively to itself (50% mean half of its own width or height)
Saeed Jassani
@saeedjassani
Jun 06 2017 17:09
thanks @alpox @SkyC0der !
CamperBot
@camperbot
Jun 06 2017 17:09
saeedjassani sends brownie points to @alpox and @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1143 | @alpox |http://www.freecodecamp.com/alpox
:star2: 1631 | @skyc0der |http://www.freecodecamp.com/skyc0der
Alvin-Capello
@Alvin-Capello
Jun 06 2017 17:24
Hey everyone. I'm taking a first crack at the Twitch API project and I decided to try to use a for loop combined with string concatenation to output the streaming status. The code I have right now does is not working, but could anyone tell me if the JavaScript code that I already have is perhaps close to working, or do I need to make radical changes to it? I will post a link to the CodePen below.
https://codepen.io/AlvinCapello/pen/EXaeQQ?editors=0010
Gr8Gonadini
@Gr8Gonadini
Jun 06 2017 17:24
I have a problem with (I belive) a function "compare" that stops program from going beyond first move (it shoudl theoreticly, use "start" function with updated variables https://codepen.io/Gr8Gonadini/pen/YQKqqN
Gulsvi
@gulsvi
Jun 06 2017 17:33
@Alvin-Capello As pseudo code, it looks fine. Your URL is incorrect, the stream variable isn't defined, and you'll want to avoid running async methods like getJSON inside a for loop. https://stackoverflow.com/questions/13343340/calling-an-asynchronous-function-within-a-for-loop-in-javascript
Try to generate your table in your JavaScript too - that way, you can pass in any array of streamers and it will always work.
Alvin-Capello
@Alvin-Capello
Jun 06 2017 17:39
@SkyC0der OK thank you. I will make the adjustments you said and keep working on it. These async methods can be quite confusing!
CamperBot
@camperbot
Jun 06 2017 17:39
alvin-capello sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1632 | @skyc0der |http://www.freecodecamp.com/skyc0der
Saeed Jassani
@saeedjassani
Jun 06 2017 17:44
hey, i am almost done with the Local Weather app, just one thing remaining C to F and vice versa... any suggestions till now?
Thomas
@sjurs1
Jun 06 2017 17:51
Hi guys. I'm on the twitch app and I'm at the point of implementing buttons that hide or show streams depending on their status (all, offline, online). If my ajax call returns an offline string, I add text displaying "Offline" by using jQuery. Can't I use that applied offline status to make my buttons perform the way I want to? Here's my document ready function:
$(document).ready(function(){
  getFCC(); //first stream ajax call
  getESLSC2(); //second stream ajax call
  getEPICENTEREN1(); //third stream ajax call
  $("#online").click(function(){
    console.log($("#fccbox").val());
  });
  $("#all").click(function(){
    $("div").slideDown();
  });
});
All I get is an empty string
hda
@whdhli
Jun 06 2017 18:00

hey guys, i need help. https://codepen.io/whdhli/full/jwPBgy/

there is something strange at the top, theres a rectangular block on top with image repetition, why is that so?

Johnny
@jtan3
Jun 06 2017 18:04
@whdhli add no-repeat center center fixed to your background css
@whdhli background:url("http://i.imgur.com/m36sYaY.jpg")no-repeat center center fixed;
hda
@whdhli
Jun 06 2017 18:07
thanks @jtan3
CamperBot
@camperbot
Jun 06 2017 18:07
whdhli sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 395 | @jtan3 |http://www.freecodecamp.com/jtan3
Gulsvi
@gulsvi
Jun 06 2017 18:19
@sjurs1 The .val() method is for <input> elements. Otherwise, you'll want to use .html() to get the HTML inside that element or .text()
Thomas
@sjurs1
Jun 06 2017 18:20
@SkyC0der Yeah, thanks! I posted to HelpJavaScript and got help there :-)
CamperBot
@camperbot
Jun 06 2017 18:20
sjurs1 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1633 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 06 2017 18:22
They're always a good help over there too :p
Markus
@MaxMemphisjunior
Jun 06 2017 18:23
Hello :)
A question, could someone tell me how to share my CodePen? i would need someone to look on it, i think i messed up a part of it..
Thomas
@sjurs1
Jun 06 2017 18:31
Anyone have some critique for the Twitch API challenge? I feel like I'm ready to call it a day on this:
Markus
@MaxMemphisjunior
Jun 06 2017 18:31
Someone there? :)
@MaxMemphisjunior Just copy the link from your browser :)
Markus
@MaxMemphisjunior
Jun 06 2017 18:31
@sjurs1 Could you help me? i really back(on tribute page challenge)
ohhh okay
could you tell me if the picture is in the middle? :)
and just saying code is a bit messy :/
i would like to help/say something about your work, but im not close to that project i think
Thomas
@sjurs1
Jun 06 2017 18:37
@MaxMemphisjunior I guess it is, but you should try adding class="img-responsive" to your image element
Also, because of codepen, you don't have to include <head> or <style>, it's already ingrained
So in the CSS rectangle below the HTML rectangle, just place all your <style> elements and remove them from the html-section
Markus
@MaxMemphisjunior
Jun 06 2017 18:40
oh i see i didnt know that..
@sjurs1 you are a genius, thank you so much
CamperBot
@camperbot
Jun 06 2017 18:40
maxmemphisjunior sends brownie points to @sjurs1 :sparkles: :thumbsup: :sparkles:
:cookie: 270 | @sjurs1 |http://www.freecodecamp.com/sjurs1
Hello911
@Hello911
Jun 06 2017 18:41
Why all of suddent people use let to declare variable rather than var?
Thomas
@sjurs1
Jun 06 2017 18:41
Haha, that's a pretty big stretch @MaxMemphisjunior . But keep at it, not long since I was on the portfolio page myself, the learning curve is pretty steep if you just put some effort in and don't get discouraged.
Markus
@MaxMemphisjunior
Jun 06 2017 18:43
@sjurs1 yeah i really want to learn, but i keep on making mistakes, but thanks to people like you i can keep on going :) i really appreciate it :D
CamperBot
@camperbot
Jun 06 2017 18:43
maxmemphisjunior sends brownie points to @sjurs1 :sparkles: :thumbsup: :sparkles:
:warning: maxmemphisjunior already gave sjurs1 points
Thomas
@sjurs1
Jun 06 2017 18:49
@MaxMemphisjunior I think everyone has been there, that's why people in this group are so helpful :)
Markus
@MaxMemphisjunior
Jun 06 2017 18:50
@sjurs1 im sorry but i have a other question now ...
im making changes to h4 in css, but the changes are taking no effect...
Yeah people are very nice here :)
actually it doesnt apply anywhere... i messed something seriously up
Markus
@MaxMemphisjunior
Jun 06 2017 18:56
ohh got it
fdemaa
@fdemaa
Jun 06 2017 19:04
@MaxMemphisjunior whats your problem?
Markus
@MaxMemphisjunior
Jun 06 2017 19:06
@fdemaa i sorted out so i use the css right but my image is not responsive anymore..
i deleted the bootstrap link in my html, because it should be in the css, but i did something wrong... seemingly
i tried to clean up my mess, but i made a bigger one...
fdemaa
@fdemaa
Jun 06 2017 19:09
you want to add bootstrap ?
you are using
the version 4
Markus
@MaxMemphisjunior
Jun 06 2017 19:09
i added it through the css settings
before i had it directly in my html
add that
and delete your link with the version4
Markus
@MaxMemphisjunior
Jun 06 2017 19:10
in the css settings or in the html with a link?
oh in css okay thank you @fdemaa
CamperBot
@camperbot
Jun 06 2017 19:12
maxmemphisjunior sends brownie points to @fdemaa :sparkles: :thumbsup: :sparkles:
:cookie: 139 | @fdemaa |http://www.freecodecamp.com/fdemaa
Markus
@MaxMemphisjunior
Jun 06 2017 19:12
so i was using the wrong bootstrap?
fdemaa
@fdemaa
Jun 06 2017 19:13
use that version
3.3.7
and put it in the quick add on css
Markus
@MaxMemphisjunior
Jun 06 2017 19:13
yeah it works now, but it turned part of my last added sentece with the link to a link...
ahh i mean it turned something that isnt a link to alink..
<h4 class="Artist">(Here is a <a href="https://www.artstation.com/artist/aquarelainfinity" target="_blank">link <a/>[which will open in a new Tab] to his ArtStationaccount, if you want to see more of his work's!)</h4>
this is my code for the link, but the rest of h4 after the anchor turned into a link too
okay sorry i found the typo i did... sorry for this unneeded post
But thank you again for the help with bootstrap @fdemaa :D
CamperBot
@camperbot
Jun 06 2017 19:17
maxmemphisjunior sends brownie points to @fdemaa :sparkles: :thumbsup: :sparkles:
:warning: maxmemphisjunior already gave fdemaa points
fdemaa
@fdemaa
Jun 06 2017 19:18
@MaxMemphisjunior no problem man! you should use just the header tag instead of adding a class but thats my opinion

just put on css
h1

h2

etc

Markus
@MaxMemphisjunior
Jun 06 2017 19:21
do you mean because of my center or the #SG?
fdemaa
@fdemaa
Jun 06 2017 19:21
and you do sorry
nothing my mistake
is good
Markus
@MaxMemphisjunior
Jun 06 2017 19:21
oh okay
well, im gonna take a brake for now, have a good day/night @fdemaa :D
Adetunji Adegbite
@twonjee2002
Jun 06 2017 19:23
hi guys. Please how do I render pdf in browser using jquery ajax
any clue
fdemaa
@fdemaa
Jun 06 2017 19:23
cheers you too!
Chris
@bestintown23
Jun 06 2017 19:58
how do i make my logo, h1, and h3 elements be on the same line? https://codepen.io/bestintown23/pen/LLVjOd
kirontoo
@kirontoo
Jun 06 2017 20:03
@bestintown23 in the styling try display: inline;
thats what you want ?
Onome Sotu
@onomesotu
Jun 06 2017 20:14
hello everyone
what do you think of my quote machine?
Chris
@bestintown23
Jun 06 2017 20:22
how can i move my text to be all the way to the right of the page.? https://codepen.io/bestintown23/pen/LLVjOd
fdemaa
@fdemaa
Jun 06 2017 20:27
you are using the grid wrong
Amit Patel
@AmitP88
Jun 06 2017 20:29
@baseballpoetess oh no, it's not for a challenge, it's just for my portfolio site. I'll be applying for dev jobs soon and I wanted to make sure my site wasn't slow to load @AlexanderDom yeah, I looked at it, but it pretty much says to inline my css code, but that's a ton of css to inline. I've decided to leave the loading speed as is, as I've gotten feedback that it's not that slow to load. imamitpatel.com
Gulsvi
@gulsvi
Jun 06 2017 20:30
@bestintown23 You might want to try one room at a time with your question. May be considered spam (I think you've been banned for that before)
:point_up: June 6, 2017 1:22 PM
:point_up: June 6, 2017 1:22 PM
:point_up: June 6, 2017 1:22 PM
:point_up: June 6, 2017 1:22 PM
@AmitP88 Try running some of Google's sites through the pagespeed test :) they don't get 100/100 on them.
I found this great conversation on that tool yesterday, thought I'd share: https://www.reddit.com/r/webdev/comments/3ur94w/how_to_get_100100_in_google_pagespeed_insights/
Chris
@bestintown23
Jun 06 2017 20:32
@SkyC0der i can only upload one room at a time, and i did.
Amit Patel
@AmitP88
Jun 06 2017 20:33
@SkyC0der lmao I see. Yeah, I think I got around 63% on mobile and 84% for desktop
Gulsvi
@gulsvi
Jun 06 2017 20:33
@bestintown23 That's 4 rooms in one minute according to my clock. You end up with four different people all spending their own time to duplicate efforts.
Amit Patel
@AmitP88
Jun 06 2017 20:34
@SkyC0der I figure that's fast enough for an employer (only takes a second to load) so I'm just gonna focus on FCC for now
Gulsvi
@gulsvi
Jun 06 2017 20:34
An employer probably also wants to hear why you don't care about 100 as much as you care about getting close to it. Both good things to know I'm guessing. Good plan though, move on :)
Chris
@bestintown23
Jun 06 2017 20:36
@SkyC0der ok how is that a problem? especially if ones solution was not to work, which has happened to me in numerous cases.
Gulsvi
@gulsvi
Jun 06 2017 20:40
@bestintown23 I can see your point of view. I'm personally more inclined to help answer your question if you aren't spamming it out to four rooms at the same time. This is why I don't respond to your questions.
Otherwise, I'd be happy to help you sort out your front-end questions...
Chris
@bestintown23
Jun 06 2017 20:42
@SkyC0der well im sorry. i could use all the help i could get, and i only do it to get the answer to my question so ill ease up
JR Woods
@jrwoods42
Jun 06 2017 20:47
I'm working on the Local Weather app and having a couple of issues... 1) when I console.log(weatherApi) my longitude and latitude return as undefined. 2) my api link says that my api key is invalid. I tried making a new api key, but the results are the same. Any suggestions? https://codepen.io/jrwoods42/pen/WObNRP?editors=1111
Elliot S.
@SwarmSE
Jun 06 2017 20:52
@jrwoods42 man, that is weird. not sure why it's not returning lat & lon
Johnny
@jtan3
Jun 06 2017 20:52
@jrwoods42 if you look in your dev tool's console it has a mixed content error.
@jrwoods42 you might want to use another weather api that uses https.
@jrwoods42 darksky.net, wunderground.com, apixu.com are pretty good
r0ulito
@r0ulito
Jun 06 2017 21:00
Mixed Content: The page at 'https://codepen.io/jrwoods42/pen/WObNRP?editors=1111' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.openweathermap.org/data/2.5/weather?lat=undefined&lon=undefined&appid=a3bd5ae4156214c3ebb1b5787d0b43a3'. This request has been blocked; the content must be served over HTTPS.
Try dark sky API ? ;)
(i was having the same issues -> switched to dark sky)
@SkyC0der taaaadaaaaa -> https://codepen.io/R0ulito/full/owNoZG/
But i need to change the backgrounds -> i used pixabay CDN... And it seems like they don't agree with that :tongue:
JR Woods
@jrwoods42
Jun 06 2017 21:12
cool thanks guys... I'll give dark sky a try
r0ulito
@r0ulito
Jun 06 2017 21:15
Can you guys can check if backgrounds are displaying on your computer please ?
JR Woods
@jrwoods42
Jun 06 2017 21:17
Not seeing any backgrounds @R0ulito
r0ulito
@r0ulito
Jun 06 2017 21:18
ok i have to change
I see'em on my computer, but cause they're cached -_-
r0ulito
@r0ulito
Jun 06 2017 21:29
OK and now @jrwoods42
???
Elliot S.
@SwarmSE
Jun 06 2017 21:36
@R0ulito i can see the wallpaper
r0ulito
@r0ulito
Jun 06 2017 21:36
:)
Pixabay block the use or their CDN
I didn't know that
vorousja
@vorousja
Jun 06 2017 21:45
@MrBoolean hey would you mind looking at some javascript im writing? i need some advice
alpox
@alpox
Jun 06 2017 21:46
@R0ulito Don't see any picture
@R0ulito And as soon as i said that i see a background :D
r0ulito
@r0ulito
Jun 06 2017 21:47
:satisfied:
alpox
@alpox
Jun 06 2017 21:47
But its somehow really slow. I wait for about 10 sec for it to come
And it appears only after tabchange
r0ulito
@r0ulito
Jun 06 2017 22:04
It's part of the get.json method
Maybe it's caused by that
dark sky is not really accurate on some datas... E.G : When you switch from FR to EN, temp is changing cause they're not providing the same datas whether you request it in french or in english
Chris
@bestintown23
Jun 06 2017 22:25
how can i make the three images in my featured section to display in a even row? https://codepen.io/bestintown23/pen/LLVjOd
r0ulito
@r0ulito
Jun 06 2017 22:39
bootstrap's using a 12 columns grid
I'm merely sure you have to apply them col-*-4
Kevin
@kevinwr
Jun 06 2017 22:41

Hey, all.

trying to figure out why the text in my section named "about_me_container" is not staying within the container.

https://codepen.io/Okroz/pen/qjBYeG

Monica Parrillo
@monicaparrillo
Jun 06 2017 22:56
Hi @FlawlessSardine . I will reply since everyone must be eating dinner
I removed the id "about_me_container" from the div, and it is better
but of course you lose the styles, so i am trying to narrow it down
you can add " word-wrap:break-word;" to the selector "section#about_me_container"
Wisdom Peters
@blackcytographer
Jun 06 2017 23:38
the narvar code is not aligning well on my pen pls any one with a solution on how i can use navigation bar on codepen
the narvar code is not aligning well on my pen pls any one with a solution on how i can use navigation bar on codepen
r0ulito
@r0ulito
Jun 06 2017 23:47
@FlawlessSardine class col-- always add of float property
```
<div class="col-xs-4" style="float:none;">
                    <p>dlkfaldjflkajdklfakldjflkajsdlkfaslkdflkajdlfkakdsjflkajdlkfjaldlfjakldjfklakldjflkajldfjklajdklfjal</p>
                </div>
your img will not be @ the right place, but your text not overflowing from parent element ;)