These are chat archives for FreeCodeCamp/HelpFrontEnd

28th
Apr 2016
Wiktor
@Wkredz1
Apr 28 2016 00:07
how do i change the font in a heading
header*
anthonygallina1
@anthonygallina1
Apr 28 2016 00:08
@Wkredz1 In the css probably I would need to see the code
Wiktor
@Wkredz1
Apr 28 2016 00:08
in html
anthonygallina1
@anthonygallina1
Apr 28 2016 00:09
@Wkredz1 is it in a pen?
Wiktor
@Wkredz1
Apr 28 2016 00:09
ye
anthonygallina1
@anthonygallina1
Apr 28 2016 00:09
:point_up:
Theodosis Melidis
@theomeli
Apr 28 2016 00:10
@Wkredz1 I think you could use the style attribute in the header you want
anthonygallina1
@anthonygallina1
Apr 28 2016 00:11
@Wkredz1 yes could do it inline in the header or even on a seperate style sheet to maintian sanity.
and loss of hair
Jorge
@liberaltech
Apr 28 2016 00:20
http://codepen.io/liberaltech/pen/MyqLgG?editors=1100
need help with font and nabber buttons.
why does my font look multidimensional and how do i change the active state background of the navbar buttons
Mary
@mapruter
Apr 28 2016 00:28
my nav menu when the screen shrinks down to a certain size doesn't scroll. it does in full screen but it looks like after 900something px it stops scrolling. i see an @media thing stopping it from happening. should i override it or is it better the screen doesn't scroll in mobile
Alex DeCapri
@alexdecapri
Apr 28 2016 00:38
does anyone know why when i reach the bootstrap window size for col-xs (768px) - my paragraph text under each portfolio item doesn't stay in its appropriate container? http://codepen.io/alexanderdd/pen/xVzaRM
Mary
@mapruter
Apr 28 2016 00:39
@alexdecapri what do you mean it doesn't stay in it's container?
Alex DeCapri
@alexdecapri
Apr 28 2016 00:39
the headers and images resize correctly, but the text keeps shooting off to the right @mapruter
as in the paragraph text should be the same width as the image, and if there is a lot of text, it should create new lines so that each line is the same width as the image
Mary
@mapruter
Apr 28 2016 00:42
i think the image is what stops short
if you use a wider image, it should go to the edge of the page
Alex DeCapri
@alexdecapri
Apr 28 2016 00:43
hmm, i could do that. but do you have any ideas for how to fix this? maybe shorten the width of the text when it reaches this window size?
Mary
@mapruter
Apr 28 2016 00:43
maybe use a placeholder image with a width of 800
@alexdecapri why do you want to have such a large space on the right? i'm not sure how you could shorten the width of the text and keep the site responsive. but
Alex DeCapri
@alexdecapri
Apr 28 2016 00:45
I don't... I want them centered but one issue at a time :) haha
Mary
@mapruter
Apr 28 2016 00:46
yeah, i think it's just that the image maxes out it's width. so if you fix that, it'll make it go all the way across
Alex DeCapri
@alexdecapri
Apr 28 2016 00:50
I guess I will do that for now, thanks for the help!
would love to figure out a fix for that though too... because as long as that image isn't 768px wide, it will look funky for a bit on phones, depending on the width, and won't look centered on in line
Alican
@flowfelis
Apr 28 2016 00:55
This message was deleted
This message was deleted
thanks @alpox
CamperBot
@camperbot
Apr 28 2016 00:59
flowfelis sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star: 622 | @alpox | http://www.freecodecamp.com/alpox
Alican
@flowfelis
Apr 28 2016 01:00
@alpox was it that easy ? really?! i used json.stringify just to test api ;) thanks
CamperBot
@camperbot
Apr 28 2016 01:00
flowfelis sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:warning: flowfelis already gave alpox points
Payton Jewell
@paytonjewell
Apr 28 2016 01:10
This message was deleted
This message was deleted
Okay I am having the hardest time figuring out how to get my bullets closer to the text
Moisés Man
@moigithub
Apr 28 2016 01:11
inspect element.. check its padding or margin
since everything is centered.. proiably ur UL element need a width too
Payton Jewell
@paytonjewell
Apr 28 2016 01:14
okay that makes sense
Got it @moigithub thank you so much
CamperBot
@camperbot
Apr 28 2016 01:16
lettiebear sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star: 1025 | @moigithub | http://www.freecodecamp.com/moigithub
Patrick
@pwcsquared
Apr 28 2016 01:45
Hey guys I finished my tic tac toe game! Would anyone care to try it out, see if they can break it? I'm also open to feedback on design and everything
also, I made it so that X goes first, as is tradition
lcassettai
@lcassettai
Apr 28 2016 02:02
@pwcsquared i like it! :D i think is missing something.. like a message when you win or loose or draw
Nathan
@natertot12
Apr 28 2016 02:02
@pwcsquared Looks great! You may want to make the computer a little smarter... Like set up itself for a "Two Move" or a possible win move
lcassettai
@lcassettai
Apr 28 2016 02:03
@pwcsquared if you put the X on top left corner and then X on bottom right corner ... yo always win jaj but i like it
i like wining :P
blob
Patrick
@pwcsquared
Apr 28 2016 02:08
@lcassettai how did that happen? lol
I've been tweaking it maybe I broke it for a sec
Nathan
@natertot12
Apr 28 2016 02:09
It does the same for me if I play how he said...
Patrick
@pwcsquared
Apr 28 2016 02:10
I just tweaked it a bit, see how it plays now
not sure how the double win thing happened, how can I replicate that bug?
lcassettai
@lcassettai
Apr 28 2016 02:10
it happend when the machine wins,You can continue placing elements. That's why i say you must put a message telling loose win draaw
Nathan
@natertot12
Apr 28 2016 02:11
Just had this happen....
Screen Shot 2016-04-27 at 10.11.02 PM.png
Its better now
Patrick
@pwcsquared
Apr 28 2016 02:14
yeah I'm messing with it, might act a little crazy
Nathan
@natertot12
Apr 28 2016 02:14
lol no worries
Patrick
@pwcsquared
Apr 28 2016 02:19
@natertot12 @lcassettai thanks for your help guys
CamperBot
@camperbot
Apr 28 2016 02:19
:star: 449 | @natertot12 | http://www.freecodecamp.com/natertot12
pwcsquared sends brownie points to @natertot12 and @lcassettai :sparkles: :thumbsup: :sparkles:
:star: 49 | @lcassettai | http://www.freecodecamp.com/lcassettai
Patrick
@pwcsquared
Apr 28 2016 02:19
I got rid of the bug that lets you keep clicking after the game is over
still need to make it smarter though
Wiktor
@Wkredz1
Apr 28 2016 02:50
why doesnt this make the background the image?
B. Garber
@TheBGar
Apr 28 2016 02:51
@Wkredz1 gotta have the url component to direct the webpage where to pull the image from
Wiktor
@Wkredz1
Apr 28 2016 02:52
I do have the url component
oh url
B. Garber
@TheBGar
Apr 28 2016 02:52
@Wkredz1 actually stating url....exactly!
Mary
@mapruter
Apr 28 2016 02:52
yeah @Wkredz1 , check out my code
i wrote out what it should look like
B. Garber
@TheBGar
Apr 28 2016 02:53
@Wkredz1 here's a great link for your reference - https://developer.mozilla.org/en-US/docs/Web/CSS/background-image
Wiktor
@Wkredz1
Apr 28 2016 02:53
It works! Ty!
B. Garber
@TheBGar
Apr 28 2016 02:54
@Wkredz1 got it to work ok? does that all make sense?
Wiktor
@Wkredz1
Apr 28 2016 02:56
i got it to work
makes sense sorta
why wont this make a border around the image ?
border="25"
Mary
@mapruter
Apr 28 2016 02:57
can i see your code @Wkredz1
B. Garber
@TheBGar
Apr 28 2016 02:58
@Wkredz1 with each of your questions, you gotta make sure you have the proper syntax
Wiktor
@Wkredz1
Apr 28 2016 02:58
<center> <img src="http://i.huffpost.com/gen/1181767/images/o-LEBRON-JAMES-facebook.jpg" width="700"></center>
B. Garber
@TheBGar
Apr 28 2016 02:58
@Wkredz1 for your border question, it depends on how you are trying to accomplish it...inline css vs internal css vs external css
Wiktor
@Wkredz1
Apr 28 2016 02:59
I put the border inbetween width="700" and </center>
Mary
@mapruter
Apr 28 2016 02:59
@Wkredz1 you want to do all that sylization in your css
Wiktor
@Wkredz1
Apr 28 2016 02:59
im trying to do it with html lol
garber
Mary
@mapruter
Apr 28 2016 02:59
html should solely be used for structure
B. Garber
@TheBGar
Apr 28 2016 02:59
@Wkredz1 border is a style so you would write it like so
```
<img src="blah blah" style="border:25px;">
Wiktor
@Wkredz1
Apr 28 2016 03:00
doesnt work garber
B. Garber
@TheBGar
Apr 28 2016 03:00
@Wkredz1 what you are trying to do is called "internal css" meaning withIN the HTML. make sense? and you can "tag" who you are talking to by clicking on our names
Wiktor
@Wkredz1
Apr 28 2016 03:01
yeah thanks for the lesson appreciate it
B. Garber
@TheBGar
Apr 28 2016 03:01
@Wkredz1 it does work. You just need to declare other parameters for it like border width and type (i.e., 2px solid black).
Wiktor
@Wkredz1
Apr 28 2016 03:01
lol ok thanks @TheBGar
CamperBot
@camperbot
Apr 28 2016 03:01
wkredz1 sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles:
:star: 408 | @thebgar | http://www.freecodecamp.com/thebgar
B. Garber
@TheBGar
Apr 28 2016 03:02
@Wkredz1 just trying to help teach rather than give you answers. It's what others have done for me and I'm just paying it forward :wink:
Wiktor
@Wkredz1
Apr 28 2016 03:03
so what paramaters do i need to make a dang border lol Border-width:"10px" border-type: "solid black" is that right?
Mary
@mapruter
Apr 28 2016 03:04
you can just do border:10px solid black;
that'll help condense your code @Wkredz1
Wiktor
@Wkredz1
Apr 28 2016 03:05
@mapruter are you talking about internal css though? i just tried that in the html code and nothing happened
B. Garber
@TheBGar
Apr 28 2016 03:05
@Wkredz1 yup, just as @mapruter says. they can all be in one line (note that this coding isn't always done the same way with other elements)
you should be able to do it inline as well
just wrap it in the style="border"10px solid black;" like @TheBGar mentioned earlier
B. Garber
@TheBGar
Apr 28 2016 03:06
@Wkredz1 ie,
<img src="blah blah" style="border:2px solid black">
Mary
@mapruter
Apr 28 2016 03:06
if you have a link to your codepen showing it not working, we could take a look and see what you are doing wrong
@TheBGar , how do you get code that you write to look like that. do you just write it within the tag?
Wiktor
@Wkredz1
Apr 28 2016 03:06
@TheBGar thats helpful thanks sir
CamperBot
@camperbot
Apr 28 2016 03:06
wkredz1 sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles:
:warning: wkredz1 already gave thebgar points
B. Garber
@TheBGar
Apr 28 2016 03:07
@mapruter check out this helpful guide below :point_down:
explain format
CamperBot
@camperbot
Apr 28 2016 03:07

:point_right: code formatting [wiki]

Multi line Code

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

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

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

Single line Code

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

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

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

B. Garber
@TheBGar
Apr 28 2016 03:08
@mapruter it's super helpful, here in the chat, to use the code formatting for others to see your code in markdown format like that
Mary
@mapruter
Apr 28 2016 03:09
'''js
<img src="test.jpg">'''
CamperBot
@camperbot
Apr 28 2016 03:09
:bulb: to format code use backticks! ``` more info
Mary
@mapruter
Apr 28 2016 03:09
hmm how do i do back ticks?
oh nm found it
for some reason @TheBGar when i click the last three backticks at the end, it won't let me hit enter to send the code on here
Dylan
@dhcodes
Apr 28 2016 03:12
above the tab key @mapruter
or esc key
@mapruter you need to do shift+enter
then paste the code
Wiktor
@Wkredz1
Apr 28 2016 03:13
I finished my project! https://codepen.io/Wkredz1/pen/eZPJjy
Dylan
@dhcodes
Apr 28 2016 03:13
@mapruter sometimes you need to click the keyboard icon to the right of the chat box to push enter. It's weird
Mary
@mapruter
Apr 28 2016 03:13
<img src="test.jpg">
ah ok, yeah, i had to push the keyboard icon
B. Garber
@TheBGar
Apr 28 2016 03:14
@mapruter yep, like @dhcodes said, you'll need to shift+enter or click on the chat logo here in the chat text box to switch between keyboard or compose
Mary
@mapruter
Apr 28 2016 03:14
thanks @dhcodes and @TheBGar
CamperBot
@camperbot
Apr 28 2016 03:14
mapruter sends brownie points to @dhcodes and @thebgar :sparkles: :thumbsup: :sparkles:
:star: 695 | @dhcodes | http://www.freecodecamp.com/dhcodes
:star: 410 | @thebgar | http://www.freecodecamp.com/thebgar
B. Garber
@TheBGar
Apr 28 2016 03:14
@mapruter nice!
@mapruter you bet :sparkles: :clap:
Dylan
@dhcodes
Apr 28 2016 03:14
@Wkredz1 nice work. I think the only thing I would recommend is to make the image responsive
if you're using bootstrap, you can add a class to the image
Mary
@mapruter
Apr 28 2016 03:15
<p>test</p>
Dylan
@dhcodes
Apr 28 2016 03:15
"img-responsive" @Wkredz1
glad you got it @mapruter
Mary
@mapruter
Apr 28 2016 03:15
yes @dhcodes very helpful for the future. you rule
Dylan
@dhcodes
Apr 28 2016 03:15
nope just been here too long lol
Mary
@mapruter
Apr 28 2016 03:17
doesn't change how i feel :)
Wiktor
@Wkredz1
Apr 28 2016 03:17
@dhcodes ty
Mary
@mapruter
Apr 28 2016 03:17
is anyone else having problems with the browser desktop version of linked in?
i'm trying to get the link to my linked in and it keeps loading without any sort of formatting
Dylan
@dhcodes
Apr 28 2016 03:17
welcome @Wkredz1
Mary
@mapruter
Apr 28 2016 03:19
i mean without any sort of sylization
Dylan
@dhcodes
Apr 28 2016 03:20
one sec @mapruter
@mapruter mine seems to be working
it does seem to be taking a little long to load images and icons
Mary
@mapruter
Apr 28 2016 03:24
@dhcodes this is what's showing up for me: http://imgur.com/ZPnAT3q
Dylan
@dhcodes
Apr 28 2016 03:24
lol wow, yeah that's a little worse
Mary
@mapruter
Apr 28 2016 03:25
yeah all i want is to get the link to my profile os i can add it and finally submit my portfolio
Wiktor
@Wkredz1
Apr 28 2016 03:30
why doesnt this code move my nav bar links to the right?
li a {
display: block;
color: white;
text-align: right;
padding: 14px 16px
}
Juwdohr
@Juwdohr
Apr 28 2016 03:30
anyone know how relative and absolute work?
Mary
@mapruter
Apr 28 2016 03:30
do you have a link to your codepen @Wkredz1
remove the display:block or change it to display:inline @Wkredz1
when you turn something into a block, text-align doesn't work.
Dylan
@dhcodes
Apr 28 2016 03:35
@Juwdohr relative aligns thing based on the position of other things on the page. Absolute positions based on the edges of the screen and doesn't care about anything else on the screen
pretty much
Mary
@mapruter
Apr 28 2016 03:36
i'm about to send in my portfolio, does anyone have any final recommendations before i do?
http://codepen.io/marypruter/full/BKdMLR/
Dylan
@dhcodes
Apr 28 2016 03:40
@mapruter could be my internet speed but the portfolio images seem to load slowly. Maybe add a width/height to them and they will scale down and load faster. Also, I would up the size of your social media icons a bit. Did you really build those sites on your portfolio?
if so, that's pretty cool
Mary
@mapruter
Apr 28 2016 03:41
i did build those sites, thanks.
i was trying to figure out how to scale up the font awesome icons. then i got distracted and forgot
Dylan
@dhcodes
Apr 28 2016 03:42
@mapruter i'll find the link. I just had it the other day
Adi
@kiniadit
Apr 28 2016 03:42
hello there. need help with local weather project.
Dylan
@dhcodes
Apr 28 2016 03:42
it's something like fa-2x
or something
Adi
@kiniadit
Apr 28 2016 03:42
here's my code - if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var xhr = new XMLHttpRequest(); xhr.open("GET", "http://api.openweathermap.org/data/2.5/weather?lat=33&lon=44&APPID=c0f35adecd3b7533dee81ce244e9bdb9", false); xhr.send(); console.log(xhr); console.log("Status: "+xhr.status); console.log(xhr.statusText); });
yeah -2x -3x etc
Adi
@kiniadit
Apr 28 2016 03:43
and i get the following error - Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://api.openweathermap.org/data/2.5/weather?lat=33&lon=44&APPID=c0f35adecd3b7533dee81ce244e9bdb9'.
breaks at xhr.send(). any ideas why?
Mary
@mapruter
Apr 28 2016 03:44
awesome, thanks @dhcodes
CamperBot
@camperbot
Apr 28 2016 03:44
mapruter sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:warning: mapruter already gave dhcodes points
Adi
@kiniadit
Apr 28 2016 03:44
@dhcodes, help?
Dylan
@dhcodes
Apr 28 2016 03:44
@kiniadit one sec let me check it out
Wiktor
@Wkredz1
Apr 28 2016 03:45
How can i add an image to my navigation bar? i tried adding it as a link to the list but that didnt work..
Dylan
@dhcodes
Apr 28 2016 03:45
@kiniadit do you have a codepen?
Adi
@kiniadit
Apr 28 2016 03:45
yea
Dylan
@dhcodes
Apr 28 2016 03:45
@Wkredz1 are you using bootstrap?
Wiktor
@Wkredz1
Apr 28 2016 03:45
yES @dhcodes
use that sample code
@kiniadit I think you may just need to change false to true in your xhr request
Adi
@kiniadit
Apr 28 2016 03:48
@dhcodes ok, that did fic the error, but now my status is '0'
and the response url is mostly blank.
doesn't the status code have to be '200'?
Dylan
@dhcodes
Apr 28 2016 03:49
@kiniadit I show one 200 and one 0
the 200 has your weather info in the response field
Adi
@kiniadit
Apr 28 2016 03:50
@dhcodes i know the API request URL is correct because if i copy paste it in my browser it spits out a page with the a response URL and status code of '200'
Mary
@mapruter
Apr 28 2016 03:50
@dhcodes ok so i shrunk the images. it should load quicker now. mind taking a look?
Adi
@kiniadit
Apr 28 2016 03:51
@dhcodes wait so there are two repsonse URLS? how does that work? i don't see a second one....
Dylan
@dhcodes
Apr 28 2016 03:52
@mapruter loaded crazy much faster
Samuel Cupidon
@Zerazera
Apr 28 2016 03:52
Hi all, looking for feedback on my Pomodoro clock. http://codepen.io/Zeratul/full/aNKYZL/
Dylan
@dhcodes
Apr 28 2016 03:52
@kiniadit idk I've never used xhr. I'm looking into it
Mary
@mapruter
Apr 28 2016 03:53
sweet yeah, the images were like three times the size before so i am certain that was the problem, @dhcodes
Adi
@kiniadit
Apr 28 2016 03:53
@dhcodes so is xmlhttprequest the right way of going about it? im new to API calls. is there a newer, better way of accessing an API?
Dylan
@dhcodes
Apr 28 2016 03:57
@kiniadit most people I've seen use $getJSON
Adi
@kiniadit
Apr 28 2016 03:58
@dhcodes ok i'll give $getJSON a shot
Dylan
@dhcodes
Apr 28 2016 03:58
@kiniadit if you want to stick with ajax, give this a read
i gotta go. Good luck
@mapruter glad I could help
Adi
@kiniadit
Apr 28 2016 04:05
@dhcodes thanks for the help!
CamperBot
@camperbot
Apr 28 2016 04:05
:star: 700 | @dhcodes | http://www.freecodecamp.com/dhcodes
kiniadit sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
Aryan
@aryandua
Apr 28 2016 04:12
how many brownie points do you need to get a front end?
Samuel Cupidon
@Zerazera
Apr 28 2016 04:17
@aryandua Brownie points are worthless. You get the front end certificate by doing all the challenges with a * next to them.
Aryan
@aryandua
Apr 28 2016 04:19
oh ok
Also, technical questions,

I am told to make a nav bar that scrolls to a certain point so i used

<button type="button" background-color="red" color="green" onClick="document.getElementById('Portfolio').scrollIntoView();"> Portfolio</button>

Aryan
@aryandua
Apr 28 2016 04:27
It works, but then when I add another Div it doesnt create under the div above
Salomon May
@sollymay
Apr 28 2016 04:32
hi guys, just wanted to ask you a really quick question. for some reason the getLocation method is not working on code pen. I was using the exact same method we were using in the coursework. is there any other way of getting latitude and longitude?
Salomon May
@sollymay
Apr 28 2016 04:38
from what I’ve seen the issue is with this part
navigator.geolocation.getCurrentPosition(function(position) {
anything inside here does not go through 
}
Bruce Young
@mutantspore
Apr 28 2016 04:56
@sollymay it appears that after warning about it for some months Chrome has blocked it working if you don’t use https:// on your page’s URL. That then causes subsequent issues as you can’t use the free Open Weather Map account to call the weather api as https:// . It will still work in othe r browsers though… for the moment.
Bruce Young
@mutantspore
Apr 28 2016 05:03
@sollymay persoanlly I used an IP address based api to get the user’s (approx) lat/Lon
http://ip-api.com
Salomon May
@sollymay
Apr 28 2016 05:04
as usual thank you @mutantspore
CamperBot
@camperbot
Apr 28 2016 05:04
sollymay sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1468 | @mutantspore | http://www.freecodecamp.com/mutantspore
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 05:24
Not quite the place for this but is anyone an expert on prototypical inheritance? Have a question
paffson
@paffson
Apr 28 2016 07:17
portfolio photos
Killian Brackey
@killianbrackey
Apr 28 2016 07:30
@AndrewGHC I may be able to field the question — shoot :wink:
Ankit Panwar
@coderNoob
Apr 28 2016 08:03
They removed FCCcamper news project?
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:03
@coderNoob Yes
Naveen
@naveenm60
Apr 28 2016 08:04
hi.. can anyone shed some light on using JSON apis?
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:04
@killianbrackey It was about whether or not a constructor can inherit from another constructor, interested if you know but I've solved it another way
Naveen
@naveenm60
Apr 28 2016 08:04
i am currently working on "random quote generator" challenge.
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:04
@naveenm60 Shoot
Naveen
@naveenm60
Apr 28 2016 08:06
@AndrewGHC first of all.. there is not much explanation on json apis or ajax in freecodecamp. i want to know how to use them. i know the syntax and stuff but i dont know exactly how to convert my json to html
Killian Brackey
@killianbrackey
Apr 28 2016 08:06
@AndrewGHC Would love to see/hear your workaround. That said…depending on whether or not the inheritance is narrowing or widening it may be able to work
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:06
@naveenm60 How about this, I'll give you some very simple code and you can busk it from there
Naveen
@naveenm60
Apr 28 2016 08:06
go on please.
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:07
// With jQuery
$.get(*string url to the json file*).success(callback);
Callback will take a parameter, which will be the returned json string
@killianbrackey I just created another constructor :smile:
Naveen
@naveenm60
Apr 28 2016 08:09
do i have to type the url to json file within parenthesis?
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:09
@naveenm60 Think you should read up on functions a bit maybe, might help to get your head round this
That's a function call so will take a string as an argument (link to the json file)
Naveen
@naveenm60
Apr 28 2016 08:10
ok
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:10
@killianbrackey Example on line 13
Wanted to make the slime constructor inherit from this.Entity
@naveenm60 You can also use
$.getJSON(url, callback);
Naveen
@naveenm60
Apr 28 2016 08:15
@AndrewGHC i know i should use that function.. wait a sec. i will post my code.
$(document).ready(function(){

  $("#newQuote").on("click",function(){
    $.getJSON("http://www.icndb.com/api/",callback);
  });    
});
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:18
@naveenm60 Open the link
That's not a json file
Killian Brackey
@killianbrackey
Apr 28 2016 08:19
@AndrewGHC so you were having troule using super and children to implement the constructor for the player?
Marcel Schulz
@MarcelSchulz
Apr 28 2016 08:19
http://api.icndb.com/jokes/random?firstName=John&amp;lastName=Doe would work for example
Naveen
@naveenm60
Apr 28 2016 08:19
@AndrewGHC , you mean like this?
$(document).ready(function(){

  $("#newQuote").on("click",function(){
    $.getJSON("http://www.icndb.com/api/",function(json){

    });
  });    
});
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:20
@killianbrackey It's all good now, just wanted to use this.Entity (line 13) for slimes (line 37), so for one constructor to inherit another's properties
Everything works though, I just made a separate constructor
Marcel Schulz
@MarcelSchulz
Apr 28 2016 08:21
@naveenm60 you have to specify a URL that points to a JSON document not a website
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:21
@naveenm60 @MarcelSchulz As Marcel says, use this link and the json parameter* will have your json data (check it with console.log(json))
Naveen
@naveenm60
Apr 28 2016 08:24
$(document).ready(function(){

  $("#newQuote").on("click",function(){
    $.getJSON("http://api.icndb.com/jokes/random?firstName=John&amp;lastName=Doe",function(json){
      $(".message").html(JSON.stringify(json));
    });
  });    
});
ok i changes the URL,
*changed
Marcel Schulz
@MarcelSchulz
Apr 28 2016 08:25
the data returned is actually already JSON, you don’t need to stringify (turn it into a json string) anymore
To turn it into a JavaScript object, you could do $.parseJSON(json)
Naveen
@naveenm60
Apr 28 2016 08:27
ok.. but when i click on the button, it is still not showing up anything
Marcel Schulz
@MarcelSchulz
Apr 28 2016 08:27
what does it say in the console?
well… yeah, probably because you cannot write a JS Object to html
what happens if you try $(".message”).html(json);?
Killian Brackey
@killianbrackey
Apr 28 2016 08:28
@AndrewGHC yeah that should work, but if you played with it more you could utilize the inheritance a little bit more to avoid the DRY paradigm haha
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:29
@killianbrackey Aye that's what I had in mind, there's probably a pattern for it somewhere
Naveen
@naveenm60
Apr 28 2016 08:29
@MarcelSchulz console is blank.. not showing anything
u want to see my html code?
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:30
You can create new instances of objects from constructors, but can you create instances of constructors from constructors? Starting to sound philosophical
Naveen
@naveenm60
Apr 28 2016 08:31
this is the JS code i have for now:
$(document).ready(function(){

  $("#newQuote").on("click",function(){
    $.getJSON("http://api.icndb.com/jokes/random?firstName=John&amp;lastName=Doe",function(json){
      $.parseJSON(json);
      $(".message").html(json);
    });
  });    
});
Killian Brackey
@killianbrackey
Apr 28 2016 08:38
@AndrewGHC constructors aren’t inherently inheritable, but if the class inhereits from the super class they should had all the same attributes so you can call super on the inheretited elements in a constructor and then add anything new that you want
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:40
@killianbrackey Hmm thanks Killian, super is something I still need to read up on, I'll take a look later
CamperBot
@camperbot
Apr 28 2016 08:40
andrewghc sends brownie points to @killianbrackey :sparkles: :thumbsup: :sparkles:
:star: 94 | @killianbrackey | http://www.freecodecamp.com/killianbrackey
Ghost
@ghost~564bf69916b6c7089cbb1fef
Apr 28 2016 08:41
Ah I see what you mean with es6 classes, this is the first time I've used any es6 so I'm still a bit rough but that makes sense
Killian Brackey
@killianbrackey
Apr 28 2016 08:45
@AndrewGHC yes no worries. Super is a really useful tool in js and beyond for inheritance — definitely worth some time to check out
alpox
@alpox
Apr 28 2016 08:46
@pwcsquared i could win! :-) Middle, right bottom, right top, bottom left ^_^
Starting with x
Arend Groot Bleumink
@arendgb
Apr 28 2016 09:03
function nextInLine(arr, item) {
  // Your code here



  return item;  // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

The tasks are:
nextInLine([], 1) should return 1
nextInLine( [ 2 ], 1) should return 2
nextInLine([5,6,7,8,9], 1) should return 5
After nextInLine(testArr, 10), testArr[4] should be 10

I have no idea what to do, can anyone help me with this?

kirbyedy
@kirbyedy
Apr 28 2016 09:10
@arendgb you have to use push() and shift() method
Arend Groot Bleumink
@arendgb
Apr 28 2016 09:10
@kirbyedy ah, I get it now. Thanks :smile:
CamperBot
@camperbot
Apr 28 2016 09:10
arendgb sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star: 931 | @kirbyedy | http://www.freecodecamp.com/kirbyedy
Chad Kreutzer
@ChadKreutzer
Apr 28 2016 09:24
@kirbyedy so I figured out the problem with using that paw picture for the line styling: it was too big. but now I'm having an issue with the text in the splash appearing before the splash. (The client liked it better than a carousel, but I'm gonna use a carousel for the pictures.) https://preview.c9users.io/chadkreutzer/widdle_waskles_grooming/index.html?_c9_id=livepreview1&_c9_host=https://ide.c9.io#home
kirbyedy
@kirbyedy
Apr 28 2016 09:36
:thumbsup:
Victoria Doiron
@victoriadoiron
Apr 28 2016 09:47
I'm stuck with my wikipedia viewer. This is what I have so far for the javascript:
```
"use strict";


function searchWikipedia(searchCriteria){
     $.getJSON('https://en.wikipedia.org/w/api.php?action=query&format=json&callback=?&titles=' + searchCriteria, processResult);
}




function processResult(apiResult){
    console.log(apiResult);

    if (apiResult.query.pages[-1]){
        console.log("No results");
    } else {
        for (var i = 0; i < pages.length; i++){
             $('#display-result').append('<div>'+pages[i].title+'</div>');
        }
    }

}

function doSearch() {
    var searchCriteria = $("#search").val();
    console.log(searchCriteria);
    searchWikipedia(searchCriteria);
}
```
Stuart Taylor
@Bouncey
Apr 28 2016 10:38

Hi guys, I'm using .show() .hide() to change my temperature display units, but I can't get it to work.

If anyone could take a look, the .click(function(){})'s are at the bottom of the js script

http://codepen.io/Bouncey/pen/VaBOOz

many thanks

Stanislav
@Shestel12
Apr 28 2016 10:46
@Bouncey add # to the names of your buttons like this
$('#fBtn').click(...
$('#cBtn').click(...
Stuart Taylor
@Bouncey
Apr 28 2016 10:46
doh!!
thanks @Shestel12
CamperBot
@camperbot
Apr 28 2016 10:46
bouncey sends brownie points to @shestel12 :sparkles: :thumbsup: :sparkles:
:star: 299 | @shestel12 | http://www.freecodecamp.com/shestel12
Stuart Taylor
@Bouncey
Apr 28 2016 10:46
it was killing me
Stanislav
@Shestel12
Apr 28 2016 10:49
@Bouncey Also, try to run your pen on Chrome 50+, it will most likely fail because of the way geolocation works in Chrome. It will only allow usage of https protocol, and you need to have proffesional edition of openweather API to use it. I suggest using information from http://ipinfo.io/ JSON API instead, so it will work in all browsers.
Anthony Ho
@chiho13
Apr 28 2016 11:47
im having trouble exporting my code to codepen - it works on my local server but not on codepen
Marcel Schulz
@MarcelSchulz
Apr 28 2016 11:53
does it contain server-side code?
Greg Duncan
@GregatGit
Apr 28 2016 12:17
@victoriadoiron did you get your wiki working
Anthony Ho
@chiho13
Apr 28 2016 13:10
@MarcelSchulz it has no server side code - just the api
Marcel Schulz
@MarcelSchulz
Apr 28 2016 13:10
does the console say anything? Can oyu publish it and send a link here?
alpox
@alpox
Apr 28 2016 14:09
@chiho13 go sure to put only the bodys content into the html part, put all header part into the header settigs of codepen and maybe include jquery etc. If needed in the javascript section in the settings. Put all your css and javascript code into their own frames.
negyvenketto
@negyvenketto
Apr 28 2016 14:18
hi! i'd like some advice on how to show the results in the wikipedia viewer project. right now i make a string that contains the html for one result and append that to the html with a loop for all the results. like so: http://codepen.io/negyvenketto/pen/BKWPZN?editors=1011
it works, but I am wondering if it would be better practice to use something like the jquery in this answer: http://stackoverflow.com/questions/18489894/append-for-loop-to-div-in-html/18489988#18489988 ? what do you think?
thescientificfangirl
@thescientificfangirl
Apr 28 2016 14:19
I'm doing the Build a Tribute Page challenge, and I was wondering how to make a box similar to the one in the example one. Does anyone know how?
Chiara
@chiara-f
Apr 28 2016 14:20
@thescientificfangirl you can build a div and style in css. give it width and length, color and what not :)
zayexo
@zayexo
Apr 28 2016 14:21

ok guys im making my tribute page but im stuck

<li><b>2006</b> - Graduated High School at
<p class="text-info">Lester B. Pearson Collegiate Institute</p></li>
what can i use that doesnt put the lester part on another line? but still colours the text like how do i do that?

Marcel Schulz
@MarcelSchulz
Apr 28 2016 14:22
@negyvenketto I’d say this nearly is best practice as is
Chiara
@chiara-f
Apr 28 2016 14:22
@zayexo take out the p tags
thescientificfangirl
@thescientificfangirl
Apr 28 2016 14:22
but in the video for the challenge, they said that all the css was done through bootstrap and they only had one line of css to move things down a bit. That's why I'm confused. When I looked it up online I only got results for the tables you can do with bootstrap. @zayexo
Marcel Schulz
@MarcelSchulz
Apr 28 2016 14:22
The only thing I’d change would be to listen on form submits instead of button clicks, that will enable using the enter key, too
thescientificfangirl
@thescientificfangirl
Apr 28 2016 14:23
oops I meant @chiara-f
Chiara
@chiara-f
Apr 28 2016 14:23
@zayexo if you need to incorporate the class .text-info, then you can just put in a span
zayexo
@zayexo
Apr 28 2016 14:23
@chiara-f thanks
CamperBot
@camperbot
Apr 28 2016 14:23
zayexo sends brownie points to @chiara-f :sparkles: :thumbsup: :sparkles:
:star: 332 | @chiara-f | http://www.freecodecamp.com/chiara-f
Chiara
@chiara-f
Apr 28 2016 14:24
@thescientificfangirl no problem :smiley: i think they used wells, but right now i'm not sure
negyvenketto
@negyvenketto
Apr 28 2016 14:25
@MarcelSchulz i have no idea how to do that, but i'll go and research it :) (i already had a big struggle with the submit/button thing and i was so proud of myself for making it work. well. that's life.) thanks :)
CamperBot
@camperbot
Apr 28 2016 14:25
negyvenketto sends brownie points to @marcelschulz :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for marcelschulz
Marcel Schulz
@MarcelSchulz
Apr 28 2016 14:26
would be as simple as $(‘form’).on(‘submit’, function(){});
already works like a charm, though, good job :)
negyvenketto
@negyvenketto
Apr 28 2016 14:28
@MarcelSchulz oh, thanks :) yes, it works, now comes the part where i put off doing the css part for days, if not weeks :D
CamperBot
@camperbot
Apr 28 2016 14:28
:warning: could not find receiver for marcelschulz
negyvenketto sends brownie points to @marcelschulz :sparkles: :thumbsup: :sparkles:
thescientificfangirl
@thescientificfangirl
Apr 28 2016 14:28
@chiara-f thanks! That website was a great help :smile:
CamperBot
@camperbot
Apr 28 2016 14:28
thescientificfangirl sends brownie points to @chiara-f :sparkles: :thumbsup: :sparkles:
:star: 333 | @chiara-f | http://www.freecodecamp.com/chiara-f
Chiara
@chiara-f
Apr 28 2016 14:30
@thescientificfangirl glad i could help! :smiley_cat:
Marcel Schulz
@MarcelSchulz
Apr 28 2016 14:33
@negyvenketto just let us know if you neep any further help with your css then :P
thescientificfangirl
@thescientificfangirl
Apr 28 2016 14:35
I saw the contextual alternatives from https://getbootstrap.com/components/#wells does anyone know how to get the panel titles? When I copied the code it only put the panel content part
negyvenketto
@negyvenketto
Apr 28 2016 14:35
@MarcelSchulz i'd prefer someone who designs the thing, i'm ok with implementing it :D
thescientificfangirl
@thescientificfangirl
Apr 28 2016 14:39
nvm, I figured it out
Eldar Tinjić
@EldarT90
Apr 28 2016 14:43
need help with my JS calculator project https://codepen.io/EldarT/pen/YqjJBx
i have several bugs which i need to fix
Leigh
@LBCDWB
Apr 28 2016 14:44
How do I resize an image without changing the proportions? https://codepen.io/LBCDWB/pen/PNdrXV/
AbdHan
@abdhan
Apr 28 2016 14:45
@LBCDWB try img {height: 250px; width: auto} auto makes the property scale with proprtion
Leigh
@LBCDWB
Apr 28 2016 14:46
@abdhan Thank you! It worked. The sizes have been so mysterious to me.
CamperBot
@camperbot
Apr 28 2016 14:46
lbcdwb sends brownie points to @abdhan :sparkles: :thumbsup: :sparkles:
:star: 302 | @abdhan | http://www.freecodecamp.com/abdhan
AbdHan
@abdhan
Apr 28 2016 14:47
@LBCDWB No problem. I took a long while to figure it out too. Glad to help.
thescientificfangirl
@thescientificfangirl
Apr 28 2016 15:02
I'm not sure what I did wrong, the whole thing is good, up until the end of the page where there are a lot of lines. I'm not sure how to get rig of them...
http://codepen.io/thescientificfangirl/pen/yOeKEN?editors=1010
*rid
Marcel Schulz
@MarcelSchulz
Apr 28 2016 15:03
appears like there were some brackets not constantly closed
Screen Shot 2016-04-28 at 17.04.14.png
yeah, you’re missing a closing </div> before all <div class="panel panel-warning”>s
thescientificfangirl
@thescientificfangirl
Apr 28 2016 15:06
so I have to add closing div's after each of the sections?
Marcel Schulz
@MarcelSchulz
Apr 28 2016 15:07
right now you’re putting a dozen panels inside of each other
thescientificfangirl
@thescientificfangirl
Apr 28 2016 15:10
@MarcelSchulz thank you!
CamperBot
@camperbot
Apr 28 2016 15:10
thescientificfangirl sends brownie points to @marcelschulz :sparkles: :thumbsup: :sparkles:
:star: 2 | @marcelschulz | http://www.freecodecamp.com/marcelschulz
zayexo
@zayexo
Apr 28 2016 15:11

<li><b>2015</b> - Ranked 8th on the Forbes list of <i>'World's Highest Paid YouTube Stars'</i> -Appeared in </li>

guys how do i make -appeared in fall onto the next line?

thescientificfangirl
@thescientificfangirl
Apr 28 2016 15:17
you can just do <br> where you want the line to break
I mean </br>
Leigh
@LBCDWB
Apr 28 2016 15:34
Any help with making my image appear on top of the gray box? I want it centered to the right of the text so the text is higher up and the image is farther down.
thescientificfangirl
@thescientificfangirl
Apr 28 2016 15:48
I'm not sure, but you can try reversing the order the code is in
lcassettai
@lcassettai
Apr 28 2016 15:49
blob
Robert Uivarosi
@URobert
Apr 28 2016 15:49
@LBCDWB you should look into using bootstrap for responsiveness. I don't understand what result you are looking for exactly from you comment (that might be because I'm tired).
lcassettai
@lcassettai
Apr 28 2016 15:49
@LBCDWB
something like that? i really don't understand what result you want hah :P
Leigh
@LBCDWB
Apr 28 2016 15:55
@URobert and @lcassettai - thanks for trying. It displays differently in this thread than it does on my screen. I want the title "Who am I" to be at the top. Below that, I want the photo on the right (within the gray box) and the text to the left of the photo. I want the text to have equal gray space above it and below it (e.g. text should start somewhere around the top of my head, not at the top of the photo or the bottom of the photo)
CamperBot
@camperbot
Apr 28 2016 15:55
lbcdwb sends brownie points to @urobert and @lcassettai :sparkles: :thumbsup: :sparkles:
:star: 828 | @urobert | http://www.freecodecamp.com/urobert
:star: 98 | @lcassettai | http://www.freecodecamp.com/lcassettai
Leigh
@LBCDWB
Apr 28 2016 15:56
@lcassettai I just saw your mockup - that's what I want!
Matthew Boland
@mattboland
Apr 28 2016 16:00
i'm not sure im on the right track but anyhow... could someone help me figure out how to add the cell's id# to an array? maybe i need to add a value to my div and try and target that instead? I'm currently pushing the whole cell object to my array (line 40) but want to target the cell number somehow so that I can compare it to the winning possibilities and make the computer make a move. http://codepen.io/MattBoland/pen/pyxvzg?editors=1010
lcassettai
@lcassettai
Apr 28 2016 16:03

@LBCDWB
In HTML i just put the <p> only in the text and eliminate width and float of img tag and put that on css

  <div class="inner">
    <h1>Who am I?</h1>
    <div style="text-align: left";>
    <img style="height: 250px;"; src="https://pbs.twimg.com/profile_images/378800000109284417/5ca97c97626659e5a62989e544d26c78_400x400.jpeg" alt="my photo";/><p> I am just learning how to code, and it is a lot of fun. I have had an interesting career as a lawyer, librarian, and international exchange program officer. I am very excited about adding coding to my list of skills and look forward to using it to share information.
  </p>
  </div>

CSS

.inner{
  overflow:hidden;
}

img {
  float:right;
  width:50%;
}

.inner p{
  float:left;
  text-align:justify;
  display:inline;
  width:40%;
}
Leigh
@LBCDWB
Apr 28 2016 16:05
OK. Thanks, again @lcassettai
CamperBot
@camperbot
Apr 28 2016 16:05
lbcdwb sends brownie points to @lcassettai :sparkles: :thumbsup: :sparkles:
:warning: lbcdwb already gave lcassettai points
Thomas Parikka
@tparikka
Apr 28 2016 16:07
Question about the Personal Portfolio Webpage. The challenge calls for us to roll it out on CodePen.io, but I got interested in CI/CD so I built a web server with Jenkins/Octopus and am hosting it on my own domain www.thomasparikka.name with the code in GitHub. Is it still considered passing the challenge in that case?
Or does the code NEED to be in CodePen?
Coira Ellison
@Coira
Apr 28 2016 16:15
@tparikka i think you can use anything, as long as you make the source code available
zayexo
@zayexo
Apr 28 2016 16:32

<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">

can someone show me/explain what this means? and what offset is?

AbdHan
@abdhan
Apr 28 2016 16:35
Do you know what xs sm md mean? @zayexo
zayexo
@zayexo
Apr 28 2016 16:35
yes
@abdhan i just dont understand what offset is
AbdHan
@abdhan
Apr 28 2016 16:36
offset if i understand correctly helps you put blank coloumns to the sides of your content
Jeff
@adzam5
Apr 28 2016 16:36
@zayexo The xs, sm, and md are representations of different screen sizes. xs would be a phone, sm a tablet... Offset is equivalent to having an empty column. So in your example the content would be full width on a phone and be centered on a tablet with padding of one column on each side.
AbdHan
@abdhan
Apr 28 2016 16:37
for example: if i have 2 coloumns of 3 each then, i have 6 coloumns left and offseting 3 coloumns will put 3 blank coloumns to the side like padding and it looks right
in the center
zayexo
@zayexo
Apr 28 2016 16:39
ohh thanks! @abdhan @adzam5
CamperBot
@camperbot
Apr 28 2016 16:39
zayexo sends brownie points to @abdhan and @adzam5 :sparkles: :thumbsup: :sparkles:
:star: 304 | @abdhan | http://www.freecodecamp.com/abdhan
:star: 424 | @adzam5 | http://www.freecodecamp.com/adzam5
AbdHan
@abdhan
Apr 28 2016 16:40
@zayexo If you want more info you can find it here.http://getbootstrap.com/css
Thomas Parikka
@tparikka
Apr 28 2016 16:52

@zayexo Something to watch out for that tripped me up is the fact that like column sizes, offsets also bubble up. For example if your row contains:

<div class="col-xs-offset-2 col-xs-8 col-md-offset-4 col-md-2">
    <p>My content</p>
</div>
<div class="col-xs-offset-2 col-xs-8 col-md-2">
     <p>My content 2</p>
</div>

In the second div, you will also have an implied col-md-offset-2 that will throw your grid off. So to avoid that explicitly state that there is no offset for md and above, like so:

<div class="col-xs-offset-2 col-xs-8 col-md-offset-4 col-md-2">
    <p>My content</p>
</div>
<div class="col-xs-offset-2 col-xs-8 col-md-offset-0 col-md-2">
     <p>My content 2</p>
</div>
zayexo
@zayexo
Apr 28 2016 16:56
@tparikka why does that happen? is it because we put an offset for the first div?
Thomas Parikka
@tparikka
Apr 28 2016 16:59
It's because column sizes "bubble up". For example, a <div class="col-xs-12"></div> takes up the whole row, implying col-xs-12, col-sm-12, col-md-12, col-lg-12, and col-xl-12. That's how you could have a div like this <div class="col-xs-12 col-md-6> if you want the div to take the WHOLE row in mobile but only half a row on a desktop. Offsets do the same thing - if you have a col-xs-offset-2 it implies a sm, md, lg, and xl offset of 2 unless you "clear" it by setting an offset of 0 at a larger size
Juwdohr
@Juwdohr
Apr 28 2016 17:01
This message was deleted
Kyle Morton
@kmorton1988
Apr 28 2016 17:25
has anyone used coverr.co video backgrounds? Does anyone know where I'm supposed to put the content that shows up over the video background?
Peter Svedman
@petersvedman
Apr 28 2016 17:38
Hello, need some help with Bootstrap. I am trying to build a three-column responsive layout. The center column, a .col-md-8, has an image that I want to center. I cant get it to work. This is my code
<div class="row">
   <h1>
  <div class="col-md-2" id="left-side">sida</div>
   <div class="col-md-8" id="mitten">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Dr_Jonas_Edward_Salk_%28cropped%29.jpg/438px-Dr_Jonas_Edward_Salk_%28cropped%29.jpg" alt="Jonas Salk 1959" class="img-responsive img-circle" id="portrait"/><br />
     <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Jonas_Salk_signature.svg/320px-Jonas_Salk_signature.svg.png" alt="" id="signature"/>
     </div>
   <div class="col-md-2" id="right-side">sida</div>
   </h1>
  </div>
pepperspray
@pepperspray
Apr 28 2016 17:38
hey folks
I'm on my quote challenge and I'm trying to change myy bg color but it doesn't work although I think it should...
Does anyone have an idea?
function getRandomColor() {
    var letters = '0123456789ABCDEF'.split('');
    var color = '#';
    for (var i = 0; i < 6; i++) {
        color += letters[Math.floor(Math.random() * 16)];
    }
    return color;
}

function getQuote() {
    var color = getRandomColor();
    console.log(color);
    $("html body").stop().animate({
        backgroundColor: color
    }, 10);
    console.log("ok");
}

$(document).ready(function() {
    $('#btn-new-quote').on('click', getQuote);
});
the console.logs are executed
Kyle Morton
@kmorton1988
Apr 28 2016 17:42
@petersvedman You progbably shouldn't use ID's to target things like that. Also, the H1's should only be around Text, not around other tags.
Mahak Narayan Singh
@makkBit
Apr 28 2016 17:43
@pepperspray I ran into the same problem in the past when i doing the quote challenge.
So, what i found was bgcolor doesn't works with jquery.
To alter the bg color , jquery ui must be used.
I read on the document page of jquery. U can refer it too for more details
Peter Svedman
@petersvedman
Apr 28 2016 17:45
Ok, so, the H1 is just for a column placeholder text, its removable. So, if not an ID, what should I do? I want the image to center in its assigned column.
pepperspray
@pepperspray
Apr 28 2016 17:47
but it should... I already googled it and guys on stackoverflow solved it like this, besides it doesnt come to an error...
Kyle Morton
@kmorton1988
Apr 28 2016 17:47
add it to the class, just add a space and add another class. something like this <div class="col-md-2 kitty">
Dustin
@Key-Banger
Apr 28 2016 17:49
This is a new one for me. On large screens my add and subtract time buttons don't work. On smaller screens they do. Any thoughts?
http://s.codepen.io/Key-Banger/full/oxPavK
Thomas G.
@CaptainMurphey
Apr 28 2016 17:54
Hey guys quick question for someone who knows javascript libraries.......do you guys think its better to just use a regular html button and affect it using @media queries is CSS-----
crap-----or is it acceptable to use bootstraps buttons and use enquire.js to change the classes of those buttons so they are resized at different screen widths
i guess what im asking is .... has anyone ran into problems using one js library to affect another
Kyle Morton
@kmorton1988
Apr 28 2016 17:56
@CaptainMurphey I think the most universally acceptable way to do it is using @media queries.
pepperspray
@pepperspray
Apr 28 2016 17:56
@Key-Banger i cant see why.. but your timer looks very nice !
Dylan
@dhcodes
Apr 28 2016 17:56
@Key-Banger seems like the div is covering them somehow. I'm trying to get it to work
Kyle Morton
@kmorton1988
Apr 28 2016 17:56
@Key-Banger I think it might be to do with how your @Media queries and how they are affecting something like that.
Dylan
@dhcodes
Apr 28 2016 17:56
it does look nice. Good work
Dustin
@Key-Banger
Apr 28 2016 17:58
@pepperspray @dhcodes @kmorton1988 thanks y'all.
CamperBot
@camperbot
Apr 28 2016 17:58
key-banger sends brownie points to @pepperspray and @dhcodes and @kmorton1988 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for pepperspray
:star: 328 | @kmorton1988 | http://www.freecodecamp.com/kmorton1988
:star: 702 | @dhcodes | http://www.freecodecamp.com/dhcodes
Mahak Narayan Singh
@makkBit
Apr 28 2016 17:58
@pepperspray
Dustin
@Key-Banger
Apr 28 2016 17:59
@dhcodes I see what your saying.
Mahak Narayan Singh
@makkBit
Apr 28 2016 17:59
read the documentation here http://api.jquery.com/animate/
Dylan
@dhcodes
Apr 28 2016 17:59
@Key-Banger i got it working

I gave your col-md-6 text-center div with the image an id of "main" and then added this to the CSS:

main {

z-index:-1;
}

Mahak Narayan Singh
@makkBit
Apr 28 2016 18:00
I quote from the documentation :
All animated properties should be animated to a single numeric value, except as noted below; most properties that are non-numeric cannot be animated using basic jQuery functionality (For example, width, height, or left can be animated but All animated properties should be animated to a single numeric value, except as noted below; most properties that are non-numeric cannot be animated using basic jQuery functionality (For example, width, height, or left can be animated but background-color cannot be, unless the jQuery.Color plugin is used). cannot be, unless the jQuery.Color plugin is used).
@pepperspray
Dylan
@dhcodes
Apr 28 2016 18:00

that should be:

#main {
  z-index:-1;
}

@Key-Banger

Dustin
@Key-Banger
Apr 28 2016 18:01
@dhcodes Thanks! I was thinking about z index.
CamperBot
@camperbot
Apr 28 2016 18:01
key-banger sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:warning: key-banger already gave dhcodes points
Dylan
@dhcodes
Apr 28 2016 18:01
@Key-Banger wait wait
that broke the start button
one sec
Dustin
@Key-Banger
Apr 28 2016 18:01
ha ha ha
Mahak Narayan Singh
@makkBit
Apr 28 2016 18:01
bgcolor can't be used with .animate without a plugin. btw it can be used with .css
but not with .animate
Dylan
@dhcodes
Apr 28 2016 18:01
did the start button work before?
Dustin
@Key-Banger
Apr 28 2016 18:02
yea, it worked. The div with the times and the div with the bubble are overlapping. I just need to get them to stack
Dylan
@dhcodes
Apr 28 2016 18:02
yeah, i'm trying to get it. I wonder if you don't have an extra closing div
Peter Svedman
@petersvedman
Apr 28 2016 18:03
Thanks @kmorton1988
CamperBot
@camperbot
Apr 28 2016 18:03
petersvedman sends brownie points to @kmorton1988 :sparkles: :thumbsup: :sparkles:
:star: 329 | @kmorton1988 | http://www.freecodecamp.com/kmorton1988
Peter Svedman
@petersvedman
Apr 28 2016 18:03
I will try that
Dustin
@Key-Banger
Apr 28 2016 18:04
@dhcodes I got rid of the "center-block" class and just used a offset.
pepperspray
@pepperspray
Apr 28 2016 18:06
@makkBit thank you!!
CamperBot
@camperbot
Apr 28 2016 18:06
pepperspray sends brownie points to @makkbit :sparkles: :thumbsup: :sparkles:
:star: 298 | @makkbit | http://www.freecodecamp.com/makkbit
Mahak Narayan Singh
@makkBit
Apr 28 2016 18:07
@pepperspray welcome. Keep coding :)
Peter Svedman
@petersvedman
Apr 28 2016 18:07
For the record : I am an idiot.
Dylan
@dhcodes
Apr 28 2016 18:08
@Key-Banger oh, i solved it a diff. way
by moving your row above the div for the columns
oh well
more than one way to slice bread
Dustin
@Key-Banger
Apr 28 2016 18:10
@dhcodes thanks again for the help and looking!
CamperBot
@camperbot
Apr 28 2016 18:10
key-banger sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:warning: key-banger already gave dhcodes points
Dylan
@dhcodes
Apr 28 2016 18:10
np
alas back to the simon project
Matthew Boland
@mattboland
Apr 28 2016 18:46
could someone help me understand how to make my grid more responsive? when i try to make the size of my "board" or "cells" with percentages it screws up the layout but as is now the grid is too big for smaller screens.http://codepen.io/MattBoland/pen/pyxvzg
faraz
@silentarrowz
Apr 28 2016 18:58
building the wikipedia viewer. need some help. dont know why this isnt working - http://codepen.io/silentarrowz/pen/yOEGjE
Dinko Gromilovic
@jwoid
Apr 28 2016 19:04
Hello everyone!
I'm working on this:https://codepen.io/FreeCodeCamp/full/NNvBQW/
And i need help on how to make that white background around picture and figcaption
Matthew Boland
@mattboland
Apr 28 2016 19:11
@silentarrowz are you familiar with JSON? and getJSON?
faraz
@silentarrowz
Apr 28 2016 19:11
could you guys help me with my wikipedia veiwer - http://codepen.io/silentarrowz/pen/yOEGjE
@mattboland yes
i was trying to use jsonp @mattboland
faraz
@silentarrowz
Apr 28 2016 19:19
I think I need help with this entry1 function - take a look http://codepen.io/silentarrowz/pen/yOEGjE
I am unable to figure out what to pass in as parameter to this function
@mattboland
Matthew Boland
@mattboland
Apr 28 2016 19:21
@silentarrowz not sure why but the link you sent will not load for me.
try this one
Matthew Boland
@mattboland
Apr 28 2016 19:22
maybe it is a problem on my side. sorry
faraz
@silentarrowz
Apr 28 2016 19:22
oh, well. no need to be sorry
James Bond
@Dman89
Apr 28 2016 19:32

http://codepen.io/livinglegendparagon/pen/NNaEqz

Line 326, why is this if else code interfering with other if else statement (BEFORE it).
Doing tic tac toe and trying to get it to check for a draw but check for wins first
i would love some help

Andrew Vanboxel
@avanbox
Apr 28 2016 19:35
anyone finished and remember "spinal case"?
Islam Ibakaev
@dagman
Apr 28 2016 19:48
have done with Inventory Update challenge. What do u think about my solution?
function updateInventory(arr1, arr2) {
    arr2.forEach(function(elem) {
        var hasBeenAdded = false;
        arr1.forEach(function(el) {
            if(el[1] === elem[1]) {
                el[0] += elem[0];
                hasBeenAdded = true;
            }
        });
        if(!hasBeenAdded) arr1.push(elem);
    });

    arr1.sort(function(a, b) {
        return a[1] > b[1];    
    });

    return arr1;
}
Jackson Leb
@JackLeb130111
Apr 28 2016 20:42
can anyone help me with my code, I want the white blocks to create a gap when they are hidden, right now they are being replaced by the other white blocks
Dordan
@Dordan
Apr 28 2016 20:46
@JackLeb130111 Try setting the background to rgba(0,0,0,0) instead of hiding it. When they are hidden I'm pretty sure they are removed from the DOM and so other divs move to fill their spot.
In effect you want to make it invisible without removing it from the page. I'm pretty sure display: hidden will not keep the element on the page.
Frank XC
@tenkdayz
Apr 28 2016 21:02
@JackLeb130111 so you want them to hide but still occupy the space?
Jackson Leb
@JackLeb130111
Apr 28 2016 21:02
ya i fixed it
But I have a different question
how to I close the gap between blocks
what kind of display type would that be
Frank XC
@tenkdayz
Apr 28 2016 21:05
@JackLeb130111 why dont you use a for loop to generate the dots instead of writing all those divs?
Jackson Leb
@JackLeb130111
Apr 28 2016 21:05
what would an example of a loop like that be, I haven't really used a for loop before
Frank XC
@tenkdayz
Apr 28 2016 21:07
@JackLeb130111 how many divs do you need?
Jackson Leb
@JackLeb130111
Apr 28 2016 21:09
however many to pixels fit a web page
Frank XC
@tenkdayz
Apr 28 2016 21:10
@JackLeb130111 you can change the number of how many you need..
Jackson Leb
@JackLeb130111
Apr 28 2016 21:13
thanks
ALINATSUI
@ALINATSUI
Apr 28 2016 21:14
Need help....Trying to insert Twitter button to Random Quote Generator.It's only appearing once (when the codepen runs) but not when the quote is generated..I've tried adding jquery methods: add, insert, append, prepend...but it's not working...or do I have to write a separate function? Here's my codepen: http://codepen.io/alinawtsui/pen/mPwYZX?editors=1010
Stephen James
@sjames1958gm
Apr 28 2016 21:15
Just got thie email about a short temporarily free course from egghead.io on flexbox
https://egghead.io/series/flexbox-fundamentals?utm_source=drip&utm_medium=email&utm_campaign=want-to-learn-flexbox-in-15-minutes
Frank XC
@tenkdayz
Apr 28 2016 21:16
This message was deleted
@JackLeb130111 that's an interesting effect... what will you use this for?
Jackson Leb
@JackLeb130111
Apr 28 2016 21:19
I just wanted to make a barebones drawing tool
something that would draw where your mouse went
Frank XC
@tenkdayz
Apr 28 2016 21:23
@JackLeb130111 I see... it's good to experiment but for what you're trying to do i recommend using a canvas.
Pellicove
@Pellicove
Apr 28 2016 21:29
I'm having trouble collecting an image from web for my Tribute page. How do I get the href for an image from a random source?
Jackson Leb
@JackLeb130111
Apr 28 2016 21:36
Hey @tenkdayz , Im looking forward to learning <canvas> in the future but for now, how would I make it so all of the blocks are connected and there aren't any gaps
M. Oliveira
@m-oliv
Apr 28 2016 21:39
hey @Pellicove ! all you have to do is use this: <img src="<your_image_url_here>" alt="Mountain View"> and, instead of using a fixed name for the image, use an url to the image. for example, you can google an image and use its url in your HTML code. hope this helps!
Pellicove
@Pellicove
Apr 28 2016 21:41
@m-oliv One question... do I just click on the img, copy the url like: <img scr="url"> ? I tried this with wiki, but was unable to obtain img.
M. Oliveira
@m-oliv
Apr 28 2016 21:42
that could happen if the url is invalid
Pellicove
@Pellicove
Apr 28 2016 21:42
@m-oliv Thanks!
CamperBot
@camperbot
Apr 28 2016 21:42
pellicove sends brownie points to @m-oliv :sparkles: :thumbsup: :sparkles:
:star: 140 | @m-oliv | http://www.freecodecamp.com/m-oliv
M. Oliveira
@m-oliv
Apr 28 2016 21:44
@Pellicove ideally, you'd have an url that ends with the image format. for example: <img src="https://static.pexels.com/photos/4164/landscape-mountains-nature-mountain.jpeg" alt="mountain">. to make sure that the users see something if the image is not visible, I'd recommend you use some alt text.
Jackson Leb
@JackLeb130111
Apr 28 2016 21:48
In need HELP!!!
how would I make it so all of the blocks are connected and there aren't any gaps
Alex Coder
@jkid314159
Apr 28 2016 22:06
how to use getJSON to embed text in twitter
how to find properties of Twitter JSON
Frank XC
@tenkdayz
Apr 28 2016 22:20
@JackLeb130111 margin 0
alpox
@alpox
Apr 28 2016 22:25
@jkid314159 You are going in the wrong direction. You don't have to use the Twitter api like that. You only have to set an URL to your button. Take a look at this documentation: https://dev.twitter.com/web/tweet-button/web-intent
Jackson Leb
@JackLeb130111
Apr 28 2016 22:28
@tenkdayz I tried that and it wasn't working
do you mind having a go at ti
it*
Frank XC
@tenkdayz
Apr 28 2016 22:47
@JackLeb130111 I tried.. dont know how to get rid of that space above each div
Jackson Leb
@JackLeb130111
Apr 28 2016 22:48
well darn
are there any other forums that could help me that you know about
Michael Karpinski
@karpimpski
Apr 28 2016 23:01
hey, does anybody know how to get a link for Google's logo that displays in the tab? the G?
Theodosis Melidis
@theomeli
Apr 28 2016 23:03
Wiktor
@Wkredz1
Apr 28 2016 23:08
how do i align a header inside of a div?
Chris Dalton
@manwithgills
Apr 28 2016 23:09
I am trying to figure out how to use the Weather Undeground API. I just dont seem to be grasping how to use the .getJSON. Is anyone familiar with the WU API?
I specifically have questions about how I use the URL.
Alexander
@DurableMicron
Apr 28 2016 23:09
hey guys why doenst my searchwik function work?
i havent been able to work ont his for sometime so im sure its something trivial
Michael Karpinski
@karpimpski
Apr 28 2016 23:12
@theomeli that's perfect, thank you! how did you find that, for future reference?
CamperBot
@camperbot
Apr 28 2016 23:12
karpimpski sends brownie points to @theomeli :sparkles: :thumbsup: :sparkles:
:star: 305 | @theomeli | http://www.freecodecamp.com/theomeli
Theodosis Melidis
@theomeli
Apr 28 2016 23:12
@DurableMicron I think you need to add ?callback=? at the end of your getJSON string
Alexander
@DurableMicron
Apr 28 2016 23:13
um stil doesnt seem to be doing anything?
Chris Dalton
@manwithgills
Apr 28 2016 23:13
The API URL in the documentation shows http://api.wunderground.com/api/d9631bbbc8a29740/geolookup/q/37.776289,-122.395234.json. What I want to know is when I paste the URL do I not include the lat and lon in the URL? Do I create in the getJSON lines like lat : "lat", etc?
Frank XC
@tenkdayz
Apr 28 2016 23:14
@karpimpski did you finish the simon game?
Michael Karpinski
@karpimpski
Apr 28 2016 23:15
@tenkdayz yeah, I did and I got my certification! it doesn't look great, but it works just like it should
Theodosis Melidis
@theomeli
Apr 28 2016 23:17
@karpimpski :) just google the image you want and search the tab of images
Frank XC
@tenkdayz
Apr 28 2016 23:18
@karpimpski nice
Michael Karpinski
@karpimpski
Apr 28 2016 23:20
@theomeli yeah, I tried but I couldn't find anything when I searched "google tab icon"
Alexander
@DurableMicron
Apr 28 2016 23:23
i still dont know why my search wik functions isnt displaying any text (its not meant to display the json nicely for now just prove that it can display something
Michael Karpinski
@karpimpski
Apr 28 2016 23:24
@theomeli oh, I'm dumb. I didn't think ot just google "Google". thanks!
CamperBot
@camperbot
Apr 28 2016 23:24
:warning: karpimpski already gave theomeli points
karpimpski sends brownie points to @theomeli :sparkles: :thumbsup: :sparkles:
Theodosis Melidis
@theomeli
Apr 28 2016 23:26
@karpimpski hehe you're welcome
Michael Karpinski
@karpimpski
Apr 28 2016 23:29
Alexander
@DurableMicron
Apr 28 2016 23:34
thanks @theomeli i got misplet it wrong the first time
CamperBot
@camperbot
Apr 28 2016 23:34
:star: 306 | @theomeli | http://www.freecodecamp.com/theomeli
durablemicron sends brownie points to @theomeli :sparkles: :thumbsup: :sparkles:
Islam Ibakaev
@dagman
Apr 28 2016 23:35
finally done with pairwise challenge it was tough one :smile: Have u done it guys?
Theodosis Melidis
@theomeli
Apr 28 2016 23:38
@DurableMicron you're welcome Alexander