These are chat archives for FreeCodeCamp/HelpFrontEnd

17th
Feb 2016
Kevin Mulligan
@kmulligan
Feb 17 2016 00:00 UTC
@morganmay Are you getting an error?
Bruce Young
@mutantspore
Feb 17 2016 00:01 UTC
@morganmay let’s see what you have in codepen
Kevin Mulligan
@kmulligan
Feb 17 2016 00:02 UTC
@mutantspore @mutantspore actually I am getting errors on codepen right now too
morganmay
@morganmay
Feb 17 2016 00:08 UTC
All I've got is what the tiutorial recommended so far. I took out the manually-added Bootstrap CDN code. http://codepen.io/morganmay/pen/bEJENN
Bruce Young
@mutantspore
Feb 17 2016 00:12 UTC
@morganmay if you put in BS first ..then animate. it should be ok. what are the errors.. the ones in console? you can see that bootstrap works by the styling of the H1 and the button
morganmay
@morganmay
Feb 17 2016 00:13 UTC

@kmulligan @mutantspore I got this error in Firefox:
16:03:52.695 Content Security Policy: The page's settings blocked the loading of a resource at self ("script-src http://codepen.io 'unsafe-eval' http://preprocessor.codepen.io http://*.pubnub.com https://*.pubnub.com http://platform.twitter.com http://connect.facebook.net http://www.google-analytics.com https://*.google-analytics.com https://*.google.com http://wufoo.com https://wufoo.com http://*.wufoo.com https://*.wufoo.com https://*.stripe.com https://*.instapaper.com http://*.instapaper.com http://dc8na2hxrj29i.cloudfront.net http://s3.buysellads.com http://srv.buysellads.com/ https://www.fullstory.com https://stats.buysellads.com http://stats.buysellads.com https://*.braintreegateway.com https://www.paypalobjects.com http://assets.codepen.io http://assets.codepen.io/ https://assets.codepen.io https://assets.codepen.io/ http://assets.cdpn.io").1 bEJENN

And this similar one in Chrome:
Refused to load the script 'data:application/javascript;base64,KGZ1bmN0aW9uKCkgewogICAgLy8gaHR0cHM6Ly9k…ogICAgZ2EucmVtb3ZlID0gbm9vcGZuOwogICAgd2luZG93W2dhTmFtZV0gPSBnYTsKfSkoKTs=' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' http://preprocessor.codepen.io http://*.pubnub.com https://*.pubnub.com http://platform.twitter.com http://connect.facebook.net http://www.google-analytics.com https://*.google-analytics.com https://*.google.com http://wufoo.com https://wufoo.com http://*.wufoo.com https://*.wufoo.com https://*.stripe.com https://*.instapaper.com http://*.instapaper.com http://dc8na2hxrj29i.cloudfront.net http://s3.buysellads.com http://srv.buysellads.com/ https://www.fullstory.com https://stats.buysellads.com http://stats.buysellads.com https://*.braintreegateway.com https://www.paypalobjects.com http://assets.codepen.io http://assets.codepen.io/ https://assets.codepen.io https://assets.codepen.io/ http://assets.cdpn.io".

Bruce Young
@mutantspore
Feb 17 2016 00:14 UTC
? well this is a fork of yours with BS added. @morganmay I’m using Safari/Mac
@morganmay looks like a list of sites you have blocked by an ad block program?
morganmay
@morganmay
Feb 17 2016 00:16 UTC
@mutantspore While testing it in Chrome I accidentally reverted to the version that had the manually-added CDN import.
Bruce Young
@mutantspore
Feb 17 2016 00:19 UTC
@morganmay so my fork of yours (above) doesn’t work for you? Ithink youhav esome sort of ad block plugin
morganmay
@morganmay
Feb 17 2016 00:19 UTC
@mutantspore Adblock was my first thought, but Bootstrap doesn't load even when I disable it or load it in Internet Explorer (which has no ad blocker installed).
Your fork works, though.
How did you add Bootstrap? Just through the options panel?
Bruce Young
@mutantspore
Feb 17 2016 00:20 UTC
wel all i did was put BS in the CSS before animate and save it
yes
I didn’t do anything else at all
morganmay
@morganmay
Feb 17 2016 00:24 UTC
Okay, I'm blind. Somehow I managed to remove Bootstrap from the CSS without noticing. Sigh. Thanks for your help!
Bruce Young
@mutantspore
Feb 17 2016 00:26 UTC
@morganmay ty for looking again and not just saying it doesn’t work!
morganmay
@morganmay
Feb 17 2016 00:26 UTC
Well thank you for being so patient...
Kaue Rodrigo Pacheco
@kauepacheco
Feb 17 2016 00:43 UTC
Im trying to add a color to a <h1> using bootstrap... Is it possible? Or I just use css? Because its a challenge to create a tribute page and it is supose to be using only html in codepen... Anyone?
Bruce Young
@mutantspore
Feb 17 2016 00:44 UTC
@kauepacheco bootstrap is CSSand yes it has it’s own color set. you can override it in CSS if you want to
Kaue Rodrigo Pacheco
@kauepacheco
Feb 17 2016 00:46 UTC
So I can't change color using a Bootstrap code inline? @mutantspore
Alright got it thanks man
Maddah Anass
@unlimiworks
Feb 17 2016 01:00 UTC
Hello guys
Victor Hernandez
@Theviajerock
Feb 17 2016 01:01 UTC
Hello
Maddah Anass
@unlimiworks
Feb 17 2016 01:01 UTC
Can i please get help on one of my api .getJSON calls ? I don't know why i don't get anything from that
http://codepen.io/UnlimiWorks/pen/WrWrLj
Victor Hernandez
@Theviajerock
Feb 17 2016 01:01 UTC
@UnlimiWorks You must add jquery on the javascript part.
I don't see it in there.
Maddah Anass
@unlimiworks
Feb 17 2016 01:02 UTC
Ow. Totally forgot that
Still not fixed though
Victor Hernandez
@Theviajerock
Feb 17 2016 01:09 UTC
I am searching....
I have the same problem
I am crazy..... Angry with that.
Owen Temple
@owentemp
Feb 17 2016 01:10 UTC
@mutantspore thanks! don't know how that got chopped. appreciate it!
CamperBot
@camperbot
Feb 17 2016 01:10 UTC
owentemp sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1137 | @mutantspore | http://www.freecodecamp.com/mutantspore
Maddah Anass
@unlimiworks
Feb 17 2016 01:11 UTC
@Theviajerock Are you using the same API ?
Victor Hernandez
@Theviajerock
Feb 17 2016 01:13 UTC
No
I am using the wikipedia API
But that Cross-Site thing confused me a lot...
Sometimes works with $.getJSON
And sometimes work with $.ajax
works*
Victor Hernandez
@Theviajerock
Feb 17 2016 01:20 UTC
@UnlimiWorks Replace the url with this one =
Maddah Anass
@unlimiworks
Feb 17 2016 01:20 UTC
yep, tried that
Victor Hernandez
@Theviajerock
Feb 17 2016 01:20 UTC
It works for me.
Bruce Young
@mutantspore
Feb 17 2016 01:21 UTC
@UnlimiWorks where are the docs for the api?
Victor Hernandez
@Theviajerock
Feb 17 2016 01:23 UTC
@UnlimiWorks I change the url like that, click at the button and it works correctly.
Maddah Anass
@unlimiworks
Feb 17 2016 01:23 UTC
I transitioned to using "http://quotesondesign.com/wp-json/posts" which uses a new version of the API. And also get only 1 JSON quote instead of everything.
@mutantspore The 'docs' are stated here : http://quotesondesign.com/the-api/
I think i need o specify some parameters to randomize
here's the link for the 4.0: http://quotesondesign.com/api-v4-0/
Maddah Anass
@unlimiworks
Feb 17 2016 01:25 UTC
The problem with this specific API is that i'm not getting all the quotes even if i'm not filtering them
Victor Hernandez
@Theviajerock
Feb 17 2016 01:25 UTC
Mmmm but that is something with the API
Maddah Anass
@unlimiworks
Feb 17 2016 01:25 UTC
Yep, I hink it might be
Victor Hernandez
@Theviajerock
Feb 17 2016 01:26 UTC
Yeah, is not problem with getJSON
Maddah Anass
@unlimiworks
Feb 17 2016 01:28 UTC
@mutantspore Sorry, I didn't save my pen before you forked it
I guess i'll try my luck using anoher API
kiel barry
@kielbarry
Feb 17 2016 01:41 UTC
could someone look at my jQuery in priate convo? don't want to spam the whole chat
wyattelliott
@wyattwade
Feb 17 2016 01:44 UTC
@Fuzyon fixed that bug you found
@Fuzyon thanks again for finding it man
CamperBot
@camperbot
Feb 17 2016 01:44 UTC
wyattwade sends brownie points to @fuzyon :sparkles: :thumbsup: :sparkles:
:star: 179 | @fuzyon | http://www.freecodecamp.com/fuzyon
wyattelliott
@wyattwade
Feb 17 2016 01:44 UTC
@Fuzyon I'll post the new version in a sec
LoLRabbit
@KevinStaufy
Feb 17 2016 01:47 UTC
So ive gotten to the portfolio and i haven't learned any of this stuff yet?
Lanitta
@DivaWeb
Feb 17 2016 01:48 UTC
Yeah I know I found the same thing
@KevinStaufy but if you go to the bootstrap website will find all the info you need'
LoLRabbit
@KevinStaufy
Feb 17 2016 01:48 UTC
what do you mean?
Lanitta
@DivaWeb
Feb 17 2016 01:49 UTC
LoLRabbit
@KevinStaufy
Feb 17 2016 01:50 UTC
do i just go to the getting started or what?
Lanitta
@DivaWeb
Feb 17 2016 01:50 UTC
@KevinStaufy Do you understand what your assignment is?
@KevinStaufy I am working on the same project at the moment
kelly
@kwhms
Feb 17 2016 01:55 UTC
Hi All -- I'd like some help with my Random Quote Machine pen http://codepen.io/kwhms/pen/GoPMaz. I can't figure out how to insert my custom twitter URL created in javascript into the href attribute of my a tag.
LoLRabbit
@KevinStaufy
Feb 17 2016 01:55 UTC
@DivaWeb no clue
@DivaWeb i made a tribute but its not very good http://codepen.io/KevinStaufy/pen/GoexQP
Lanitta
@DivaWeb
Feb 17 2016 01:56 UTC
@KevinStaufy did you see the web site example?
LoLRabbit
@KevinStaufy
Feb 17 2016 01:56 UTC
@DivaWeb yea but that is like super advanced like i dont think i learned any of it
Lanitta
@DivaWeb
Feb 17 2016 01:56 UTC
@KevinStaufy I realize that the bootstrap section that they have is very limited
LoLRabbit
@KevinStaufy
Feb 17 2016 01:57 UTC
@DivaWeb saddly yea :(
Lanitta
@DivaWeb
Feb 17 2016 01:57 UTC
@KevinStaufy So let me see if I can help you get started
LoLRabbit
@KevinStaufy
Feb 17 2016 01:57 UTC
@DivaWeb alright cool :)
Lanitta
@DivaWeb
Feb 17 2016 01:58 UTC
@KevinStaufy the type of website that it is called is a bootstrap scrollspy.
Kevin Mulligan
@kmulligan
Feb 17 2016 01:58 UTC
@kwhms I can't help you with that - would love to know what you figure out - but love your design
LoLRabbit
@KevinStaufy
Feb 17 2016 01:59 UTC
@DivaWeb hmm interesting
Lanitta
@DivaWeb
Feb 17 2016 01:59 UTC
@KevinStaufy do you have your code pen account set up?
kelly
@kwhms
Feb 17 2016 01:59 UTC
@kmulligan thanks!
CamperBot
@camperbot
Feb 17 2016 01:59 UTC
kwhms sends brownie points to @kmulligan :sparkles: :thumbsup: :sparkles:
:star: 281 | @kmulligan | http://www.freecodecamp.com/kmulligan
LoLRabbit
@KevinStaufy
Feb 17 2016 01:59 UTC
@DivaWeb yes
i sent you a private chat
Lanitta
@DivaWeb
Feb 17 2016 02:00 UTC
@KevinStaufy ok
wyattelliott
@wyattwade
Feb 17 2016 02:00 UTC
Hey guys
Would anyone mind playing Tic Tac Toe to see if you can win
if you can there's a bug in my app
here it is:
Also, any other criticism is much appreciated
@mutantspore once I get rid of the bugs I will do something with the alerts
@mutantspore let me know if there's anything that doesn't look good.
Lanitta
@DivaWeb
Feb 17 2016 02:01 UTC
@KevinStaufy I am not see it
wyattelliott
@wyattwade
Feb 17 2016 02:01 UTC
@mutantspore or if the code looks ugly in spots
Dan Stockham
@DanStockham
Feb 17 2016 02:02 UTC
Is there any reason why my winning conditions are not working? https://www.repl.it/Bn0v
LoLRabbit
@KevinStaufy
Feb 17 2016 02:02 UTC
@DivaWeb its fine
Lanitta
@DivaWeb
Feb 17 2016 02:03 UTC
@KevinStaufy do you have the bootstrap page up?
LoLRabbit
@KevinStaufy
Feb 17 2016 02:04 UTC
@DivaWeb im on the homepage of http://getbootstrap.com/
kelly
@kwhms
Feb 17 2016 02:04 UTC
@kmulligan I think I got it -- $("#customTweet").attr("href", myQuoteURL);
Lanitta
@DivaWeb
Feb 17 2016 02:04 UTC
@KevinStaufy click on getting started
@KevinStaufy did you learn about libraries?
LoLRabbit
@KevinStaufy
Feb 17 2016 02:04 UTC
alright i did
no i havent
Lanitta
@DivaWeb
Feb 17 2016 02:05 UTC
@DivaWeb libraries are basically the dictionary for the language you want to use
LoLRabbit
@KevinStaufy
Feb 17 2016 02:05 UTC
ahh i see
Lanitta
@DivaWeb
Feb 17 2016 02:06 UTC
@KevinStaufy so you see the cdn to copy and paste?
LoLRabbit
@KevinStaufy
Feb 17 2016 02:06 UTC

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

that one?
Lanitta
@DivaWeb
Feb 17 2016 02:06 UTC
@KevinStaufy yes
@DivaWeb that is the library for bootstrap and it needs to be put into your head section of the code.
Dan Stockham
@DanStockham
Feb 17 2016 02:08 UTC
I guess what I really want to ask is it possible to test for win conditions using a one dimensional array on a two dimensional grid?
LoLRabbit
@KevinStaufy
Feb 17 2016 02:08 UTC
so it Always needs to go there?
Lanitta
@DivaWeb
Feb 17 2016 02:09 UTC
@KevinStaufy there are several libraries out there and you can find the others you may need at google libraries and yes to your question
LoLRabbit
@KevinStaufy
Feb 17 2016 02:09 UTC
ahhh i see
Kevin Mulligan
@kmulligan
Feb 17 2016 02:11 UTC
anyone know if codepen has dropdown.js
Lanitta
@DivaWeb
Feb 17 2016 02:12 UTC
@KevinStaufy if you want some more detailed info on using bootstrap here is a detailed video https://youtu.be/3cYWiU_HsgM
LoLRabbit
@KevinStaufy
Feb 17 2016 02:12 UTC
alright cool ill check it out

@DivaWeb do i past all of this <!-- Latest compiled and minified CSS -->

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

at the top?
Lanitta
@DivaWeb
Feb 17 2016 02:13 UTC
@KevinStaufy yes
LoLRabbit
@KevinStaufy
Feb 17 2016 02:13 UTC
alrighty ill get to work on it then thank you
Lanitta
@DivaWeb
Feb 17 2016 02:14 UTC
@KevinStaufy in the <head> section of your code
@KevinStaufy I hope that gets you off on the right foot.
Hey guys
Almost done with this project
any criticism is much appreciated
and if you can beat it
that's a huge bug
also if my code just looks ugly
let me know!
LoLRabbit
@KevinStaufy
Feb 17 2016 02:18 UTC
@DivaWeb wait
Lanitta
@DivaWeb
Feb 17 2016 02:18 UTC
@KevinStaufy yes
@wyattwade I didn't win I got a tie
LoLRabbit
@KevinStaufy
Feb 17 2016 02:18 UTC
do i put the big set of bootstrap above or in <head>
Lanitta
@DivaWeb
Feb 17 2016 02:19 UTC
@KevinStaufy You will put it inside the <head> tag
LoLRabbit
@KevinStaufy
Feb 17 2016 02:19 UTC
so
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>


<h1 class="text-center"> Kevin Stauferland's Portfolio </h1>
thats wrong right
Lanitta
@DivaWeb
Feb 17 2016 02:20 UTC
@KevinStaufy do you know what a deault html5 should look like?
wyattelliott
@wyattwade
Feb 17 2016 02:20 UTC
@DivaWeb Yeah I'm trying to make it unbeatable. Someone earlier found a huge bug tho
just fixed it like 15 mins ago
@DivaWeb any suggestions on the UX?
I might make it so you can pick what color you play as
Lanitta
@DivaWeb
Feb 17 2016 02:21 UTC
@wyattwade that would be cool because the blue is so light I didn't realize at first I was blue
LoLRabbit
@KevinStaufy
Feb 17 2016 02:21 UTC
@DivaWeb to an extent yea
wyattelliott
@wyattwade
Feb 17 2016 02:22 UTC
yeah thanks for checking it out @DivaWeb
CamperBot
@camperbot
Feb 17 2016 02:22 UTC
wyattwade sends brownie points to @divaweb :sparkles: :thumbsup: :sparkles:
:star: 216 | @divaweb | http://www.freecodecamp.com/divaweb
wyattelliott
@wyattwade
Feb 17 2016 02:22 UTC
if you have any other suggestions let me know
I'll be using this for a job application tomorrow
just an apprenticeship level job
Lanitta
@DivaWeb
Feb 17 2016 02:23 UTC
@KevinStaufy well your code should have a <head> tag and a <body> tag
@wyattwade I think most of us are
@KevinStaufy create a <head> </head> should before your body tag and put the libraries inside that
LoLRabbit
@KevinStaufy
Feb 17 2016 02:24 UTC
it didnt teach me <head> it taught me <h1>
Lanitta
@DivaWeb
Feb 17 2016 02:26 UTC
@KevinStaufy give me a sec and I will so you what the basic html5 format should be.
LoLRabbit
@KevinStaufy
Feb 17 2016 02:26 UTC
at that point i might just go run through code academys html and css course
so i know more about it
Andrew Charlebois
@andrewchar
Feb 17 2016 02:32 UTC
hey guys. working on my weather app. right now im trying to make a function that will show the weather icon on my page and trying to make it so it takes my api data and adds that icon number to the url to show you an icon. i have this so far but its just showing a broken image.
function weatherIcon() {
    var icon =  $(updateWeather.weather[0].icon);

    $("#icon").append("<img src='http://openweathermap.org/img/w/" + icon + ".png'>");
  }
Bruce Young
@mutantspore
Feb 17 2016 02:43 UTC
@andrewchar show us your pen and also you won’t need that $() around teh json object
@mutantspore oh.. i took out the $() and it works now lol
@mutantspore thanks a million!
CamperBot
@camperbot
Feb 17 2016 02:44 UTC
andrewchar sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1138 | @mutantspore | http://www.freecodecamp.com/mutantspore
Lanitta
@DivaWeb
Feb 17 2016 02:45 UTC

@KevinStaufy <!Doctype html>

<html>

<head>

//add libraries here//

<title>name of page<title>

</head>

<body>

//add what you want on your web page here.




</body>

</html>

LoLRabbit
@KevinStaufy
Feb 17 2016 02:45 UTC
@DivaWeb is <title> the same as <h1>?
Sloth
@RMo-Sloth
Feb 17 2016 02:46 UTC
Anyone willing to help me out with my navigation bar using bootstrap (I want to put a part on the right side and a part on the left) http://codepen.io/RobMo/pen/qbvoNj
Lanitta
@DivaWeb
Feb 17 2016 02:52 UTC
@KevinStaufy no <title> is the name of the page. so when you look at the tab in your browser you see the name of the page and that is what that does.
LoLRabbit
@KevinStaufy
Feb 17 2016 02:52 UTC
OOOOOOOOOOOOOOOOOOO
@DivaWeb i see now tahnks
thanks
Lanitta
@DivaWeb
Feb 17 2016 02:54 UTC
@KevinStaufy <h1> is the size of a header before your paragraph or list etc..... You have <h1>, <h2>,<h3>,<h4>,<h5>,<h6> and the bigger the size the smaller it gets
LoLRabbit
@KevinStaufy
Feb 17 2016 02:54 UTC
@DivaWeb ahhh sorry i got confused there haha thanks
CamperBot
@camperbot
Feb 17 2016 02:54 UTC
kevinstaufy sends brownie points to @divaweb :sparkles: :thumbsup: :sparkles:
:star: 217 | @divaweb | http://www.freecodecamp.com/divaweb
Lanitta
@DivaWeb
Feb 17 2016 02:55 UTC
@KevinStaufy hey no problem
Jason
@carpediem1213
Feb 17 2016 02:55 UTC
I've finished the basic JS algorithms. Now I am up to the Random Quote Generator. I've looked at the sample project, but I'm not sure I have the skill set to accomplish this one yet. Which lessons/challenges should I review to be prepared for these intermediate front end projects?
Lanitta
@DivaWeb
Feb 17 2016 02:56 UTC
@carpediem1213 I have found going to Youtube and watching videos sometimes explains things in a way that makes things look simple
Andrew Charlebois
@andrewchar
Feb 17 2016 02:57 UTC
does anyone know where i could find info about making a slide button, or does bootstrap offer something to make one?
Lanitta
@DivaWeb
Feb 17 2016 02:59 UTC

@RobMo check out this section on bootstrap Component alignment
Align nav links, forms, buttons, or text, using the .navbar-left or .navbar-right utility classes. Both classes will add a CSS float in the specified direction. For example, to align nav links, put them in a separate <ul> with the respective utility class applied.

These classes are mixin-ed versions of .pull-left and .pull-right, but they're scoped to media queries for easier handling of navbar components across device sizes.

Right aligning multiple components
Navbars currently have a limitation with multiple .navbar-right classes. To properly space content, we use negative margin on the last .navbar-right element. When there are multiple elements using that class, these margins don't work as intended.

We'll revisit this when we can rewrite that component in v4.

Sloth
@RMo-Sloth
Feb 17 2016 03:02 UTC
@DivaWeb I have already tried that for two hours now, I seem unable to find a solution myself. I tried the official documentation and the w3c.
Jason
@carpediem1213
Feb 17 2016 03:02 UTC
@DivaWeb Which topics would you recommend to be prepared for the intermediate challenges?
Lanitta
@DivaWeb
Feb 17 2016 03:07 UTC
@carpediem1213 I would start by looking at the functions and etc that are listed in the projects
zackluckyf
@zackluckyf
Feb 17 2016 03:08 UTC

Working on Random Quote Machine, stuck trying to get the giant quotes into the javascript like the example. I was able to do it easily when it wasn't with the text. I just want the ion-quote to be in there but I'm not sure how to do it.

<h2 id="quote"><i class="ion-quote quotes-icon"></i>Every collection of quotes has to start somewhere!</h2></div>
$("#quote").text(quotes[rand2]);

That's the html and the javascript, I tried using + inside the text function but no dice

Lanitta
@DivaWeb
Feb 17 2016 03:09 UTC
@RobMo I understand what you saying now and I am actually working on the same project. Did you try adding the left to the specific item or did you try giving it an id and float it in css?
DJ
@qualitymanifest
Feb 17 2016 03:09 UTC
@zackluckyf if you have a codepen, paste that
zackluckyf
@zackluckyf
Feb 17 2016 03:11 UTC
@qualitymanifest I don't I'm working in brackets
DJ
@qualitymanifest
Feb 17 2016 03:12 UTC
@zackluckyf well, without seeing/testing the big picture my guess is either you haven't loaded jquery in, or there's quotes[rand2] isn't accessing what you want it to
Sloth
@RMo-Sloth
Feb 17 2016 03:13 UTC
@DivaWeb Hmm I might be able to do a manual fix with css. But that won't teach me how to do it with bootstrap.
Adam Yuhasz
@jayuhasz
Feb 17 2016 03:19 UTC
Does this work for everyone? http://codepen.io/jayuhasz/full/KVERxy/
Lanitta
@DivaWeb
Feb 17 2016 03:32 UTC
@jayuhasz if location and conditions wind and temp are buttons they are not working
Adam Yuhasz
@jayuhasz
Feb 17 2016 03:33 UTC
@DivaWeb they are not buttons, just display panels
Andrew Charlebois
@andrewchar
Feb 17 2016 03:33 UTC
@jayuhasz can i ask why you use switch statements
@jayuhasz i am using just the icon ID that i get from the api info to give me their little icon for weather, the way you do it make different icons come up or something?
@jayuhasz just to show you what i mean
http://codepen.io/andrewchar/pen/dGrVJO?editors=1011
Adam Yuhasz
@jayuhasz
Feb 17 2016 03:35 UTC
@andrewchar I didn't like their icons, so I'm using other icons and need the switch statement, it also leaves room for more granularity if I got bored later.
Andrew Charlebois
@andrewchar
Feb 17 2016 03:36 UTC
@jayuhasz where do you get your icons from?
Adam Yuhasz
@jayuhasz
Feb 17 2016 03:37 UTC
@andrewchar it's in the pen's css settings, I believe
Andrew Charlebois
@andrewchar
Feb 17 2016 03:39 UTC
@jayuhasz awesome thank you!
CamperBot
@camperbot
Feb 17 2016 03:39 UTC
andrewchar sends brownie points to @jayuhasz :sparkles: :thumbsup: :sparkles:
:star: 296 | @jayuhasz | http://www.freecodecamp.com/jayuhasz
Maddah Anass
@unlimiworks
Feb 17 2016 03:42 UTC
Hi guys. I have a question concerning a test pen i've been meddling with:
1st : Why is my second console.log() executed before my first ?
2nd : Why does my 'quotes' variable lose its value outside of $.getJSON ?
http://codepen.io/UnlimiWorks/pen/WrWrLj?editors=0010
I'm really confused about this, i'll be grateful for any help i can get
h4r1m4u
@h4r1m4u
Feb 17 2016 03:43 UTC

Finally fixed it up a bit. At least that one chunk of code. Couldn't have done it without you thanks again man @h4r1m4u . Have a good night

@wyattwade excellent, glad to hear that; nice work! you're most welcome

CamperBot
@camperbot
Feb 17 2016 03:43 UTC
sorry h4r1m4u, you can't send brownie points to yourself! :sparkles: :sparkles:
:star: 254 | @wyattwade | http://www.freecodecamp.com/wyattwade
Andrew Charlebois
@andrewchar
Feb 17 2016 03:51 UTC
my geolocation is telling me that im like 200 km away from where i actually am lol
Bruce Young
@mutantspore
Feb 17 2016 03:55 UTC
@andrewchar geolocation? or ip based system?
Andrew Charlebois
@andrewchar
Feb 17 2016 03:56 UTC
the location that my weather app is telling me
Bruce Young
@mutantspore
Feb 17 2016 03:57 UTC
@andrewchar yes… but how are you working out the lat and lon.. I can’t remember how you were doing it
pen?
Bruce Young
@mutantspore
Feb 17 2016 04:00 UTC
@andrewchar ok for me it’s accurate. How are you connected to the internet?
Andrew Charlebois
@andrewchar
Feb 17 2016 04:00 UTC
i know some code is out of whack im putting random stuff in to figure out how to convert my link to show C and F
satalite internet
Adam Yuhasz
@jayuhasz
Feb 17 2016 04:00 UTC
@andrewchar that'll do it.
Bruce Young
@mutantspore
Feb 17 2016 04:01 UTC
ok well maybe that’s were it thinks you… are
Andrew Charlebois
@andrewchar
Feb 17 2016 04:01 UTC
yeah, 200km is actually shorting it. for me to drive to where its telling me i am, it would take me 5-6 hours lol
Bruce Young
@mutantspore
Feb 17 2016 04:02 UTC
i’s it 2 way satellite or sat down and phone up? (or am i showing my age?)
Andrew Charlebois
@andrewchar
Feb 17 2016 04:02 UTC
2 way satellite
Bruce Young
@mutantspore
Feb 17 2016 04:03 UTC
lol maybe it thinks you are in space :) i don’t know the specifics of what it’s identifying and why but I’m sure that’s the reason
Andrew Charlebois
@andrewchar
Feb 17 2016 04:03 UTC
lol
i first noticed when it said it was raining here
i was like hmmm we got a foot of snow today thats not right
Adam Yuhasz
@jayuhasz
Feb 17 2016 04:05 UTC
@andrewchar it's giving you the geolocation of your ISP's facility that's connected to their trunk line
it also explains what methods it uses to find you
Andrew Charlebois
@andrewchar
Feb 17 2016 04:07 UTC
@mutantspore yep still showing coatcook
oh well
Bruce Young
@mutantspore
Feb 17 2016 04:09 UTC
@andrewchar it will be fine for most people
Gabriel
@Zera99
Feb 17 2016 04:09 UTC
Why are my wells.. so close to each other? http://codepen.io/Zera99/pen/JGxQXy?editors=1100
Andrew Charlebois
@andrewchar
Feb 17 2016 04:09 UTC
yeah. i'm just the unlucky one who is stuck with satellite internet lol
dposse
@dposse
Feb 17 2016 04:18 UTC
what do you mean wells?
Gabriel
@Zera99
Feb 17 2016 04:19 UTC
Bootstrap wells ^^
Ankit Panwar
@coderNoob
Feb 17 2016 04:39 UTC
@h4r1m4u But can't we set format=jsonp instead of adding the callback parameter?
h4r1m4u
@h4r1m4u
Feb 17 2016 04:59 UTC
@coderNoob you could - if the server is configured to know what to do with it. i might be wrong but i think wikipedia doesn't support format=jsonp parameter. the point i was making is that "So what the call back function does is, it prevents the statement from executing until all the data is fetched from the API call." is not quite a correct explanation of the callback parameter
Jovvi Johnson
@jovjohnson
Feb 17 2016 05:14 UTC
would anyone be able to take a look at my javascript code for a widget i'm building? i can't get the events to cooperate
steve
@davidsonsteve
Feb 17 2016 05:19 UTC
@batilc1 thanks again for your help earlier if you're still on, the hint to use ajax for the wiki search page was a lifesaver
CamperBot
@camperbot
Feb 17 2016 05:19 UTC
davidsonsteve sends brownie points to @batilc1 :sparkles: :thumbsup: :sparkles:
:star: 209 | @batilc1 | http://www.freecodecamp.com/batilc1
h4r1m4u
@h4r1m4u
Feb 17 2016 05:20 UTC
@jovjohnson it's usually better to post the question right away. then people in the room can check out what the problem is and see if they're able to help. on that note, what's the issue?
Ogundele Olumide
@Lumexralph
Feb 17 2016 05:43 UTC

hello guys, am working on the pomodoro and this is how am thinking of tackling the project

1.have two global variable, break time and session time in secs

  1. create functions that increases and decreases length of session and break and updates the new time when clicked

  2. functions that starts session time and break time count by getting the time updated by the functions above and start a countdown on it

  3. use a function to toggle between the 2 modes using a boolean to indicate when session is running and if done start break session

5.a function to pause the event using clearInterval.

That's what I can think of , thanks for your time

h4r1m4u
@h4r1m4u
Feb 17 2016 05:45 UTC
@Lumexralph sounds pretty good to me. here's a tip: you don't need two variables for the break and session time. have only one - let's call it mainTime. then whenever the timer reaches zero and you need to change the clock mode, get the value of the break or session from the DOM and assign it to your mainTime. that way you only need one function to start the countdown interval (or clear it). other than that, i think you're on the right track
Bruce Young
@mutantspore
Feb 17 2016 05:48 UTC
@Lumexralph you only need one countdown function.. just feed it different variables
Ogundele Olumide
@Lumexralph
Feb 17 2016 05:50 UTC
thanks @mutantspore @h4r1m4u .....will work on it
CamperBot
@camperbot
Feb 17 2016 05:50 UTC
lumexralph sends brownie points to @mutantspore and @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1420 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
:star: 1142 | @mutantspore | http://www.freecodecamp.com/mutantspore
Joseph Morse
@jnmorse
Feb 17 2016 05:51 UTC
@Lumexralph I had pause as another var that the interval function checks, if its paused it skips decrementing the current time, until it is unpaused. stop with clearIntrerval, also I wouldn't get any values from the dom, only interaction should be outputting to the dom.
Ogundele Olumide
@Lumexralph
Feb 17 2016 05:54 UTC
@jnmorse ..you mean the click events?
Joseph Morse
@jnmorse
Feb 17 2016 05:56 UTC
@Lumexralph in the first part of what I said, I meant when you click on paused I set a var paused to true, if you clear the interval and then start again its likely going to end up starting from the beginning, less you somehow save the state which I suppose could work.
h4r1m4u
@h4r1m4u
Feb 17 2016 06:00 UTC
@jnmorse if you use only one variable to track the time and update it only when the timer reaches 0 (to start a new full work or break session), then your current time on the clock will be preserved when you clear the interval for pausing. clearing the interval seems cleaner rather than having the interval constantly running in the background even if the clock is paused
Joseph Morse
@jnmorse
Feb 17 2016 06:02 UTC
@h4r1m4u the way I had it set up, the variable ended up back to its default state if I did clearinterval shrugs
Jovvi Johnson
@jovjohnson
Feb 17 2016 06:03 UTC
@h4r1m4u http://codepen.io/jov/pen/mVoGXy
the spinners in my number fields aren't executing my jquery event
h4r1m4u
@h4r1m4u
Feb 17 2016 06:04 UTC
@jovjohnson and what's the result that you want? what exactly should be happening?
Jovvi Johnson
@jovjohnson
Feb 17 2016 06:04 UTC
and they're doing wonky things when the assorted veggies div field is clicked
the green text that displays the total price should be corresponding with the quantity and price per item
h4r1m4u
@h4r1m4u
Feb 17 2016 06:05 UTC
ok, gotcha. let me have a look at it
Bruce Young
@mutantspore
Feb 17 2016 06:06 UTC
@jovjohnson what is this? .. another new challenge?
Alvis Ng
@vizFlux
Feb 17 2016 06:07 UTC
Hi guys, I’ve been coding the Pomodoro timer before this project recently categorized to an advanced front-end project. So it is being coded without any framework but plain JS, and now I am stucked at the timeCount() just won’t reach to 0 before ended and switched into breakInterval. Would really appreciate any help from anyone who’ve cleared this task. :smile:
var break_length;
var session_length;
var minutes;
var interval;
var breakInterval;
var seconds = 0;
​
function increaseBreak(break_length) {
    break_length++;
    $('#break').html(break_length);
    return break_length;
}
​
function decreaseBreak(break_length) {
    break_length--;
    if (break_length < 1) {
        break_length = 1;
    }
    $('#break').html(break_length);
    return break_length;
}
​
function increaseSession(session_length) {
    session_length++;
    $('#session').html(session_length);
    $('#total').html(session_length);
    return session_length;
}
​
function decreaseSession(session_length) {
    session_length--;
    if (session_length < 1) {
        session_length = 1;
    }
    $('#session').html(session_length);
    $('#total').html(session_length);
    return session_length;
}
​
function countdownCtrl() {
    if (seconds === 0) {
        minutes--;
        seconds = 59;
    } else {
        seconds--;
    }
    // Executing timeCount();
    (function timeCount() {
        if (minutes === 0 && seconds === 0) {
            clearInterval(interval);
            if (break_length) {
                breakInterval = setInterval(breakcountCtrl, 1000);
            }
        } else {
            $('#total').html(minutes + ":" + (seconds < 10 ? "0" : "") + String(seconds));
        }
    })();
​
    function breakcountCtrl() {
        $('#total').html(break_length--);
    }
}
​
$(document).ready(function() {
    break_length = parseInt($('#break').text());
    session_length = parseInt($('#session').text());
    minutes = session_length;
​
    $('#ibl').click(function() {
        break_length = increaseBreak(break_length);
    });
​
    $('#dbl').click(function() {
        break_length = decreaseBreak(break_length);
    });
​
    $('#ise').click(function() {
        session_length = increaseSession(session_length);
        minutes = session_length;
    });
​
    $('#dse').click(function() {
        session_length = decreaseSession(session_length);
        minutes = session_length;
    });
​
    $('#total').click(function() {
        if (interval) {
            clearInterval(interval);
            interval = undefined;
        } else {
            interval = setInterval(countdownCtrl, 50);
        }
    });
​
});
Harry Aydin
@HMAN1911
Feb 17 2016 06:11 UTC
@jovjohnson You need to write a new function that deals with the counter value being changed, and make sure you're rendering the updated value on each click event. Hope that hint helps :smile:
edit: throw some console.log's in there to see if the value is actually being updated ;)
Ankit Panwar
@coderNoob
Feb 17 2016 06:13 UTC
Guys lemme know if you can beat this game. Would be a great help :smile:
Tic-Tac-Toe
Jovvi Johnson
@jovjohnson
Feb 17 2016 06:15 UTC
@hman1911 hmm. thanks. not sure where to start with a new function though. i'll play around with it some more.
CamperBot
@camperbot
Feb 17 2016 06:15 UTC
jovjohnson sends brownie points to @hman1911 :sparkles: :thumbsup: :sparkles:
:star: 85 | @hman1911 | http://www.freecodecamp.com/hman1911
Ankit Panwar
@coderNoob
Feb 17 2016 06:23 UTC
My reset button is not working. But works fine in DevTools mode. Why?
http://codepen.io/coderNoob/pen/vLmyWN
Harry Aydin
@HMAN1911
Feb 17 2016 06:24 UTC
@jovjohnson This so question should help http://stackoverflow.com/questions/16562389/get-spinner-ui-value-on-change
$(document).ready(function() {

  function spinnerChange(event) {
    //this function gets called when the spinner value chages.
    //your code here :)
  }

  $('input[name=quantity]').on("click",function() {
               var button = $(this).closest(".quant");
               var price = button.data("price");
               price = parseFloat(price);
               var num = $("input[type=number]").val();
            var total = (num * price).toFixed(2);
            var totalPrint = $('<p class="total">($' + total + ' TOTAL)</p>');
                if(num >= 2){

                $('.price').find('.total').html(totalPrint);

                }

        });
h4r1m4u
@h4r1m4u
Feb 17 2016 06:26 UTC
@jovjohnson here you go:
$(document).ready(function() {

  $('input[name=quantity]').on("click",function() {
               var price = $(this).data("price");
               price = parseFloat(price);
               var num = $(this).val();
                var total = (num * price).toFixed(2);
                if(num >= 2){
                  $(this).closest('.row').find('.total').text("($" + total + " TOTAL)");                            
                }            
        });

});
Ankit Panwar
@coderNoob
Feb 17 2016 06:29 UTC
Help with the reset button anyone?
http://codepen.io/coderNoob/pen/vLmyWN?editors=1010
CamperBot
@camperbot
Feb 17 2016 06:29 UTC
no wiki entry for: with the reset button anyone httpcodepeniocodernoobpenvlmywneditors1010
adhok
@adhok
Feb 17 2016 06:34 UTC
Hi, I had a doubt regarding centering of the buttons for my front end project(Portfolio Page). I have used the container class made available by bootstrap css. Yet the buttons appear to be left-aligned. Here is the code.http://codepen.io/adhok/pen/PZVVPJ
Jovvi Johnson
@jovjohnson
Feb 17 2016 06:35 UTC
@HMAN1911 thanks for the link
CamperBot
@camperbot
Feb 17 2016 06:35 UTC
jovjohnson sends brownie points to @hman1911 :sparkles: :thumbsup: :sparkles:
:warning: jovjohnson already gave hman1911 points
Jovvi Johnson
@jovjohnson
Feb 17 2016 06:36 UTC
@h4r1m4u works like a gem. would you mind briefly explaining my error?
h4r1m4u
@h4r1m4u
Feb 17 2016 06:36 UTC
@adhok add text-center class on the row div that holds the buttons
    <div class="row text-center">
      <a href="www.twitter.com" target="_blank" class="btn btn-default btn-lg "><i class="fa fa-twitter fa-fw"></i>Twitter</a>
      <a href="www.twitter.com" target="_blank" class="btn btn-default btn-lg "><i class="fa fa-linkedin fa-fw"></i>LinkedIn</a>
      <a href="www.twitter.com" target="_blank" class="btn btn-default btn-lg"><i class="fa fa-github fa-fw"></i>GitHub</a>
      <a href="www.freecodecamp.com" target="_blank" class="btn btn-default btn-lg"><i class="fa fa-fire fa-fw"></i>FreeCodeCamp</a>      
    </div>
@jovjohnson i don't have your original code anymore :D do you still have it somewhere?
adhok
@adhok
Feb 17 2016 06:40 UTC
@h4r1m4u Thank You!
CamperBot
@camperbot
Feb 17 2016 06:40 UTC
adhok sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1421 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Casey Heath
@ExhibitArts
Feb 17 2016 06:48 UTC
This message was deleted
Jovvi Johnson
@jovjohnson
Feb 17 2016 06:49 UTC
$(document).ready(function() {

           $('input[name^=quantity]').on("click",function() {
               var button = $(this).closest(".quant");
               var price = button.data("price");
               price = parseFloat(price);
               var num = $("input[type=number]").val();
            var total = (num * price).toFixed(2);
            var totalPrint = $('<p id="total">($' + total + ' TOTAL)</p>');
                if(num >= 2){

                $('.price').find('.total').html(totalPrint);

                }

        });
something like that anyway @h4r1m4u
haha
h4r1m4u
@h4r1m4u
Feb 17 2016 06:56 UTC
$(document).ready(function() {

           $('input[name^=quantity]').on("click",function() {
               var button = $(this).closest(".quant"); //  not needed; you're already clicking on the input which contains the price in the data-price attribute, hence you can simply use "this"
               var price = button.data("price");
               price = parseFloat(price);
               var num = $("input[type=number]").val(); // similar to the above. it's the same input element, "this" suffices
            var total = (num * price).toFixed(2);
           // here you're using the jQuery selector $(), but the selector doesn't make much sense. selector should generally be a the element, class, id or combination of thereof
          // i'm assuming that what you meant to do here is to construct the string for the total price. if that's the case, you'd do it without the $() selector
            var totalPrint = $('<p id="total">($' + total + ' TOTAL)</p>'); 
                if(num >= 2){

                // the problem with the $('.price') selector is that it's the same in all the 3 boxes (each box has a .price paragraph). so even if you're changing
              // the qty in the 3rd box, it'll rewrite the total price in the first box. we need to somehow tie it to changing the price only in the box where we're
             // changing the qty - which is where "this" comes into play again
                $('.price').find('.total').html(totalPrint);

                }

        });
kaizen711
@kaizen711
Feb 17 2016 07:08 UTC
Hey Guys, Does anybody know why the drop down in my navbar using bootstrap isn't working? Any help is appreciated.
http://codepen.io/kaizen7/pen/WrWGgp
h4r1m4u
@h4r1m4u
Feb 17 2016 07:09 UTC
@kaizen711 you forgot to import the bootstrap.js file
add this in the JS resources of the codepen: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js
@jovjohnson sorry, forgot to tag you. my comments as to why your code was not working are 3 messages above
kaizen711
@kaizen711
Feb 17 2016 07:11 UTC
@h4r1m4u wow I didn't even know that existed, thank you very much, I'd been trying to see what was wrong for a while
CamperBot
@camperbot
Feb 17 2016 07:11 UTC
kaizen711 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1422 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Feb 17 2016 07:12 UTC
@kaizen711 np. yeah, basically all the functionality that's described on this page: http://getbootstrap.com/javascript/ requires the bootstrap.js library imported
kaizen711
@kaizen711
Feb 17 2016 07:13 UTC
@h4r1m4u awesome thanks again
CamperBot
@camperbot
Feb 17 2016 07:13 UTC
kaizen711 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: kaizen711 already gave h4r1m4u points
Mannu Gupta
@theparadoxer02
Feb 17 2016 07:34 UTC
Encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr
solution plz
stuck here
kirbyedy
@kirbyedy
Feb 17 2016 07:35 UTC
is there a table on the left with explanation codes ?
Alvis Ng
@vizFlux
Feb 17 2016 07:45 UTC
I am stucked at the timeCount() just won’t reach to 0 before clearInterval() and switched into breakInterval. Would really appreciate any help from anyone who’ve cleared this task. :smile:
http://codepen.io/vizFlux/pen/WrmmVQ
Goje Samuel Andrei Daniel
@pringon
Feb 17 2016 08:07 UTC
hey guys
can i please get some help with my tic tac toe game?
the filter only works on the first press
then it stop working for some reason
wyattelliott
@wyattwade
Feb 17 2016 08:17 UTC
hey guys
batilc1
@batilc1
Feb 17 2016 08:19 UTC
@davidsonsteve ima glad it worked, youre welcome!
wyattelliott
@wyattwade
Feb 17 2016 08:19 UTC
which filter @pringon ?
Goje Samuel Andrei Daniel
@pringon
Feb 17 2016 08:19 UTC
the remaining = remaining.filter
wyattelliott
@wyattwade
Feb 17 2016 08:26 UTC
what line?
i'll check it now
ahh i see it
Pedro Abel Díaz Sánchez
@coderHook
Feb 17 2016 08:54 UTC
Does somebody know why I am getting my string inversed in the calculator text-box? If I set this outside the text box, in a div for instance it shows it the correct way.
http://codepen.io/DiazPedroAbel/pen/pgRXWv?editors=1010
Someone (I cannot remember who and I cannot see previous mentions :S) told me that I have to treat op similar way as current, but I don't see how to do it, in fact, I thought I was treating both similar way by adding them to the string. eval() works perfect so...
h4r1m4u
@h4r1m4u
Feb 17 2016 09:41 UTC
@Abel1987 it's because of direction: rtl;on .calculator input[type='text'] in your CSS. 'rtl' stand for right to left. instead, use text-align: right;
Pedro Abel Díaz Sánchez
@coderHook
Feb 17 2016 09:48 UTC
@h4r1m4u thats it... I copy that calculator to just get into programming it, and I guess it has this kind of inconvenients. I was looking at the html and on the javascript trying to fixt it but forget about css. Thanks a lot @h4r1m4u .
h4r1m4u
@h4r1m4u
Feb 17 2016 09:48 UTC
no prob
Max
@Spacecortez
Feb 17 2016 09:59 UTC
Hi, does anyone know why the carousel my page won't animate/respond? http://codepen.io/spacecortez/pen/dGLpbq?editors=1100
h4r1m4u
@h4r1m4u
Feb 17 2016 10:01 UTC
@Spacecortez you forgot to import jquery and bootstrap.js into your project
Max
@Spacecortez
Feb 17 2016 10:02 UTC
I quick added bootstrap in the CSS section settings, shouldn't that work?
h4r1m4u
@h4r1m4u
Feb 17 2016 10:03 UTC
nope. that's just the CSS library that's part of bootstrap
Max
@Spacecortez
Feb 17 2016 10:03 UTC
ohh
it's fixed, thanks :D
h4r1m4u
@h4r1m4u
Feb 17 2016 10:03 UTC
:thumbsup:
Pedro Abel Díaz Sánchez
@coderHook
Feb 17 2016 10:57 UTC

Sorry guys, today I know I am tremendously annoying, but I cannot fix those litle things.

http://codepen.io/DiazPedroAbel/pen/pgRXWv

I want to put a background in my calculator webpage, so I change it from the body background but it makes something weird. Looks like its broken in 3 pieces or rows...

greg
@wearenotgroot
Feb 17 2016 11:02 UTC
@Abel1987 add no-reapeat fixed
h4r1m4u
@h4r1m4u
Feb 17 2016 11:04 UTC
also, you're setting the same background for both body and html. set it only for one of the elements
Pedro Abel Díaz Sánchez
@coderHook
Feb 17 2016 11:08 UTC
Thanks @wearenotgroot That's kind of weird because I tried this before, I mean, I put fixed no-repeat; and didn't work
CamperBot
@camperbot
Feb 17 2016 11:08 UTC
abel1987 sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star: 880 | @wearenotgroot | http://www.freecodecamp.com/wearenotgroot
Pedro Abel Díaz Sánchez
@coderHook
Feb 17 2016 11:10 UTC
Thanks a lot, by the way, I am trying to move the calcultor to the bottom but setting in the calculator class align="bottom" or right does not work. Any idea? @wearenotgroot
CamperBot
@camperbot
Feb 17 2016 11:10 UTC
abel1987 sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: abel1987 already gave wearenotgroot points
Goje Samuel Andrei Daniel
@pringon
Feb 17 2016 11:12 UTC
@Abel1987 try something like margin-top: xpx; or margin-bottom: -xpx; the align only works for center left and right as far as i know
Pedro Abel Díaz Sánchez
@coderHook
Feb 17 2016 11:19 UTC
@pringon umm, is not what exactly I was looking for because If the screen is smaller the calculator gets out of it.
Goje Samuel Andrei Daniel
@pringon
Feb 17 2016 11:19 UTC
then you could try using percentages
instead of pixels
not sure how well it works for height
but for width it works perfectly
yep
it should work
tried it on mine
i used a margin-top of about 27 percent
you can play around with it until it works for you
Ruslan Mavletkulov
@rusaym
Feb 17 2016 11:22 UTC
Hey, guys! Can enyone help me to figure out with some incomprehensible part of inheritance in javasript?
I have a Vehicle base class
and child Car class
var Car = (function (parent) {
Car.prototype = new Vehicle();
Car.prototype.constructor = Car;
function Car(year, make, model) {
parent.call(this, year, make, model);
this.wheelQuantity = 4;
}Car.prototype.getInfo = function () {
return 'Vehicle Type: Car ' + parent.prototype.getInfo.call(this);
return Car;
})(Vehicle);
why we use that "Car.prototype.constructor = Car;"
If it works whithout that expression?
Pedro Abel Díaz Sánchez
@coderHook
Feb 17 2016 11:32 UTC
Thanks @pringon thats better :)
CamperBot
@camperbot
Feb 17 2016 11:32 UTC
abel1987 sends brownie points to @pringon :sparkles: :thumbsup: :sparkles:
:star: 242 | @pringon | http://www.freecodecamp.com/pringon
Goje Samuel Andrei Daniel
@pringon
Feb 17 2016 11:39 UTC
@Abel1987 no problem mate :D
Harry Aydin
@HMAN1911
Feb 17 2016 11:59 UTC

@rusaym When you call new Vehicle, the constructor of car will actually lead to Vehicle, which people think means 'was constructed by'. It actually doesn't mean that at all. Prototypal inheritance is a complicated concept, and is very different to class based inheritance. I recommend reading this free book for a great explanation:

https://github.com/getify/You-Dont-Know-JS/tree/master/this%20%26%20object%20prototypes

But regarding your question, you don't need to include that line at all for what you are doing.

Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:06 UTC
Hi
When working on the Weather project, codepen doesn't prompt me for geolocation permissions and am unable to display anything. Anyone faced the same problem?
Ruslan Mavletkulov
@rusaym
Feb 17 2016 12:07 UTC
@HMAN1911 thank you:thumbsup:
CamperBot
@camperbot
Feb 17 2016 12:07 UTC
rusaym sends brownie points to @hman1911 :sparkles: :thumbsup: :sparkles:
:star: 86 | @hman1911 | http://www.freecodecamp.com/hman1911
Harry Aydin
@HMAN1911
Feb 17 2016 12:08 UTC
@dshgna can you post your pen please
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:10 UTC
@HMAN1911: sure, I'm just starting off
http://codepen.io/dshgna/pen/ZQZBOq?editors=1011
Harry Aydin
@HMAN1911
Feb 17 2016 12:13 UTC
@dshgna getCurrentLocation is disabled on insecure origins. Basically, you need to be using HTTPS for it to work. I would recommend using the coordinates of the IP address for this project.
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:18 UTC
@HMAN1911 using the ipinfo API right?
Harry Aydin
@HMAN1911
Feb 17 2016 12:18 UTC
@dshgna That one would be fine, but there are others out there :)
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:18 UTC
hints? :D
kirbyedy
@kirbyedy
Feb 17 2016 12:23 UTC
@dshgna you have a typo there
@dshgna is the console returning the position for you ?
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:24 UTC
@kirbyedy where exactly?
kirbyedy
@kirbyedy
Feb 17 2016 12:26 UTC
are you getting the position in the console ?
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:26 UTC
@kirbyedy as I've mentioned earlier, it doesn't display anything
kirbyedy
@kirbyedy
Feb 17 2016 12:26 UTC
yes, because you have a typo
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:26 UTC
where's the typo?
kirbyedy
@kirbyedy
Feb 17 2016 12:27 UTC
lot = position.coords.longitude;
url = "api.openweathermap.org/data/2.5/weather?lat="; + lat + "&lon=" + lon + "APPID=" + key;
and here you use lon
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:29 UTC
thanks so much @kirbyedy for spotting.
CamperBot
@camperbot
Feb 17 2016 12:29 UTC
dshgna sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star: 483 | @kirbyedy | http://www.freecodecamp.com/kirbyedy
kirbyedy
@kirbyedy
Feb 17 2016 12:29 UTC
is it returning the location now ?
greg
@wearenotgroot
Feb 17 2016 12:30 UTC
@dshgna another thing
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:31 UTC
its returning the lat and lon but not displaying the data
greg
@wearenotgroot
Feb 17 2016 12:31 UTC
@dshgna you have to add jquery on the js settings
@dshgna beacuse you are using $.getJSON<-------------from jquery
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:31 UTC
@wearenotgroot errgh yes!
thanks @wearenotgroot
CamperBot
@camperbot
Feb 17 2016 12:32 UTC
dshgna sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star: 881 | @wearenotgroot | http://www.freecodecamp.com/wearenotgroot
greg
@wearenotgroot
Feb 17 2016 12:32 UTC
@dshgna also
@dshgna your url
@dshgna you need to append in front of it------>http://
@dshgna or else it will throw an error
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:33 UTC
@wearenotgroot yes...figured that out. Thanks very much again :D
CamperBot
@camperbot
Feb 17 2016 12:33 UTC
dshgna sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: dshgna already gave wearenotgroot points
greg
@wearenotgroot
Feb 17 2016 12:35 UTC
@dshgna YW
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:38 UTC
a quick question, is it generally better to use var when declaring a variable in all cases?
Suryavamsi Teneti
@Surya97
Feb 17 2016 12:39 UTC
@Surya97
Guys I need some info about how to create a thumbnail which on hover should give options for download, view and delete.
can anyone please tell how to do so?
greg
@wearenotgroot
Feb 17 2016 12:40 UTC
@dshgna if you dont use var then it will interpreted as a global variable
Suryavamsi Teneti
@Surya97
Feb 17 2016 12:40 UTC
guys can anyone please help me?
greg
@wearenotgroot
Feb 17 2016 12:41 UTC
@dshgna the problem lies if a function has a similar named variable. then if not handled properly a variable value might be overridden
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:41 UTC
@wearenotgroot yes, so its always best to declare as local variables? I was wondering in scenarios like relatively lesser logic like this.
greg
@wearenotgroot
Feb 17 2016 12:41 UTC
@dshgna yep
@dshgna also it depends on where those variables are located
@dshgna right now your variables are considered global
@dshgna accessible throughout the entire page
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:43 UTC
which may be a problem if future functions modify the value right?
greg
@wearenotgroot
Feb 17 2016 12:43 UTC
yes
@dshgna try and enclosed them in a function and call the function to execute down the page or with $(document).ready(function(){ "your code here" }); <------this way they are all within the scope of that function

@dshgna would look like this

$(document).ready(function(){

  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(function(position) {
      var lat = position.coords.latitude;
      var lon = position.coords.longitude;
      var key = "6fccda1c30c7f392d44016c2bb3b6519";
      var url = "http://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + lon + "&units=metric&APPID=" + key;
      $.getJSON(url, function(data) {
        var temp_celsius = data.main.temp;
        var country = data.sys.country;
        var city = data.country;
        var weather = data.weather.main;
        console.log(temp_celsius);
        console.log(country);
        console.log(data);
        console.log(weather);
      });
    });
  }

});

or

function start(){

  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(function(position) {
      var lat = position.coords.latitude;
      var lon = position.coords.longitude;
      var key = "6fccda1c30c7f392d44016c2bb3b6519";
      var url = "http://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + lon + "&units=metric&APPID=" + key;
      $.getJSON(url, function(data) {
        var temp_celsius = data.main.temp;
        var country = data.sys.country;
        var city = data.country;
        var weather = data.weather.main;
        console.log(temp_celsius);
        console.log(country);
        console.log(data);
        console.log(weather);
      });
    });
  }

}

start();
Dulshani Gunawardhana
@dshgna
Feb 17 2016 12:48 UTC
@wearenotgroot Thanks so much. I'll do so.
CamperBot
@camperbot
Feb 17 2016 12:48 UTC
dshgna sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: dshgna already gave wearenotgroot points
greg
@wearenotgroot
Feb 17 2016 13:03 UTC
@dshgna btw if you look at the api docs ------>http://openweathermap.org/current scroll down on the section for Units Format
@dshgna you can set the unit system to use for the returned result. either imperial or metric. else you will standard measurements
Dulshani Gunawardhana
@dshgna
Feb 17 2016 13:07 UTC
@wearenotgroot yes I already modified my pen for that using metric.
greg
@wearenotgroot
Feb 17 2016 13:08 UTC
@dshgna ok :+1:
Dulshani Gunawardhana
@dshgna
Feb 17 2016 13:08 UTC
@wearenotgroot did you use the OWM icons or another set of icons?
greg
@wearenotgroot
Feb 17 2016 13:08 UTC
@dshgna nope
@dshgna just use the icon from the site
@dshgna you can get the icon name
@dshgna from the data you received

@dshgna then jsut append the url -------->http://openweathermap.org/img/w/'+iconname+'.png'

use this as source in <img scr=>

Dulshani Gunawardhana
@dshgna
Feb 17 2016 13:11 UTC
@wearenotgroot yes that's what I meant :)
OWM = open weather map
thanks a lot anyway @wearenotgroot :)
CamperBot
@camperbot
Feb 17 2016 13:11 UTC
dshgna sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: dshgna already gave wearenotgroot points
greg
@wearenotgroot
Feb 17 2016 13:11 UTC
@dshgna yes i get the context :smile:
Dulshani Gunawardhana
@dshgna
Feb 17 2016 13:11 UTC
hopefully I'll be able to finish this soon!
greg
@wearenotgroot
Feb 17 2016 13:11 UTC
@dshgna btw the icon name is inside the weaher property, just an fyi the weather contains an array
Dulshani Gunawardhana
@dshgna
Feb 17 2016 13:12 UTC
yes, got it :) that was a bit confusing , figuring out the array
greg
@wearenotgroot
Feb 17 2016 13:13 UTC
@dshgna yep it was because on some area they have weird weather :smile:
@dshgna so the main weather is at index 0
Dulshani Gunawardhana
@dshgna
Feb 17 2016 13:13 UTC
oh...like two different types of weather :O?
that's funny
greg
@wearenotgroot
Feb 17 2016 13:14 UTC
@dshgna other than that additional weather conditions are at index after
@dshgna it's mostly fog and mist mixed in the main weather condtions
Dulshani Gunawardhana
@dshgna
Feb 17 2016 13:15 UTC
@wearenotgroot ah I see. so at which project are you now at?
greg
@wearenotgroot
Feb 17 2016 13:15 UTC
@dshgna Iam at tic tac toe and simon game
@dshgna not in a rush though :smile:
@dshgna also i just do what i feel like doing :smile:
Dulshani Gunawardhana
@dshgna
Feb 17 2016 13:17 UTC
@wearenotgroot both of them look rather complicated at first glance
greg
@wearenotgroot
Feb 17 2016 13:18 UTC
@dshgna well it's just designing your own logic for the game that is the tricky part
Dulshani Gunawardhana
@dshgna
Feb 17 2016 13:19 UTC
@wearenotgroot what about ui?
greg
@wearenotgroot
Feb 17 2016 13:19 UTC
@dshgna well if you already made it this far, that part is not that difficult
@dshgna and it's your choice to make it fancy or not :smile:
Dulshani Gunawardhana
@dshgna
Feb 17 2016 13:20 UTC
@wearenotgroot haha I really lack the patience for ui :(
greg
@wearenotgroot
Feb 17 2016 13:21 UTC
@dshgna well ui is an art on its own
Dulshani Gunawardhana
@dshgna
Feb 17 2016 13:23 UTC
@wearenotgroot indeed :)
Jack Lyons
@JackEdwardLyons
Feb 17 2016 13:30 UTC
hey guys, im soooooo close to finishing my clock, but I just have a problem when the clock hits 0... it counts back to 59:59
any ideas?
greg
@wearenotgroot
Feb 17 2016 13:38 UTC
@JackEdwardLyons yep
@JackEdwardLyons the -1
@JackEdwardLyons `
function countDownFrom(seconds) {

  if (playing) {
    if (seconds > -1) {  //<-----------------culprit should be 0
      setTimeout(function() {
        counterValue = countDownFrom(seconds = seconds - 1)
        renderTime(seconds);
      }, 1000);
    } else {
      playing = false;
      seconds = 0;
    }
  }

  return seconds;

}
Tony Miri
@TonyMiri
Feb 17 2016 14:20 UTC
Hey everybody. Does anyone have any recommendations for some Android apps that would allow a person to code html/css/javascript in a easy way. Something like CodePen for mobile? Or at least something where you can preview your work?
kirbyedy
@kirbyedy
Feb 17 2016 14:21 UTC
good question, never heard of anything like that :)
personally for me, coding on the smartphone would be a nightmare
Andrew Vanboxel
@avanbox
Feb 17 2016 14:32 UTC
you guys ever experience where your brain refuses to cooperate when your trying to solve a problem?
kirbyedy
@kirbyedy
Feb 17 2016 14:34 UTC
mhm... every third day
take a break
Andrew Vanboxel
@avanbox
Feb 17 2016 14:35 UTC
Im going to when this project is done. Super close on my calculator, just a bug I am having a brain block about lol
Tony Miri
@TonyMiri
Feb 17 2016 14:40 UTC
I have to spend a lot of time away from my pc during regular work hours, but while I'm working I have downtime. Sometimes I'll sit and do nothing for up to 3 hours. Thought it would be a good use of time to get some coding in. I guess I'll be the Guinea pig and let you guys know what I find.
Andrew Vanboxel
@avanbox
Feb 17 2016 14:41 UTC
if codepen works in a mobile browser, youd just need a bluetooth keyboard or something
h4r1m4u
@h4r1m4u
Feb 17 2016 14:43 UTC
@FatTone225 @avanbox yeah, the codepen editor is optimized for mobile. why not use that?
Tony Miri
@TonyMiri
Feb 17 2016 14:45 UTC
@h4r1m4u I probably will. Hoping it has some kind of keyboard shortcuts for mobile
@h4r1m4u Thanks for the link!
CamperBot
@camperbot
Feb 17 2016 14:46 UTC
fattone225 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1424 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Feb 17 2016 14:46 UTC
you betcha. yeah, i don't know if it has any shortcuts. like @kirbyedy, thinking about coding on my mobile device gives me nightmares ;)
Tony Miri
@TonyMiri
Feb 17 2016 14:48 UTC
I have to admit though, CodePen is pretty darn awesome
Andrew Vanboxel
@avanbox
Feb 17 2016 14:49 UTC
i hate it actually haha
if i could get webstorm or something working right i would avoide codepen
Dulshani Gunawardhana
@dshgna
Feb 17 2016 14:50 UTC
hate codepen :O?
Now that I've got used to codepen, I'd hate to use an ide for web dev
critiques for my weather app please...
http://codepen.io/dshgna/full/ZQZBOq/
Pavel
@Savrov
Feb 17 2016 14:53 UTC
Guys, challenge "Build a Random Quote Machine". Where i should take quotes? Some API?
h4r1m4u
@h4r1m4u
Feb 17 2016 14:55 UTC
@Savrov yeah, either an API or you can store them locally in your code in an array
Andrew Vanboxel
@avanbox
Feb 17 2016 14:56 UTC
I stored mine in an array but in the future id like to change it to an api of some sort
Dulshani Gunawardhana
@dshgna
Feb 17 2016 14:56 UTC
@Savrov I used a Mashape API
Andrew Vanboxel
@avanbox
Feb 17 2016 14:56 UTC
@dshgna works great for me.
Pavel
@Savrov
Feb 17 2016 14:57 UTC
@h4r1m4u thanks, one dude gave me that: http://quotesondesign.com/ (API link at bottom)
CamperBot
@camperbot
Feb 17 2016 14:57 UTC
savrov sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1425 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Pavel
@Savrov
Feb 17 2016 14:57 UTC
@dshgna thank you too)
h4r1m4u
@h4r1m4u
Feb 17 2016 14:57 UTC
@Savrov here's another one for you http://forismatic.com/en/api/
@dshgna if your browser doesn't support geolocation or have it enabled, all you see is a blank white page
might be a good idea to either have some sort of a fallback, or at least display an error/notification to the user
Dulshani Gunawardhana
@dshgna
Feb 17 2016 15:00 UTC
@h4r1m4u ah good feedback...Ill show an error message
Andrew Vanboxel
@avanbox
Feb 17 2016 15:00 UTC
@dshgna would it be possible to accept a zipcode as an input?
h4r1m4u
@h4r1m4u
Feb 17 2016 15:00 UTC
:thumbsup:
Dulshani Gunawardhana
@dshgna
Feb 17 2016 15:01 UTC
@avanbox you mean for the openweather api?
h4r1m4u
@h4r1m4u
Feb 17 2016 15:01 UTC
(alternatively you can use https://ipinfo.io/ to the get the user's IP address and then the location from that)
Andrew Vanboxel
@avanbox
Feb 17 2016 15:02 UTC
well if someones browser does not support location, or they deny it, could they instead just put in a zip code?
h4r1m4u
@h4r1m4u
Feb 17 2016 15:03 UTC
@avanbox a good idea, but there are too many variations in zip codes (and possibly duplicates). also some countries (like where i live) don't use zip codes at all
Tony Miri
@TonyMiri
Feb 17 2016 15:04 UTC
@dshgna No background images? I'm on mobile. Not sure if that makes a difference.
Andrew Vanboxel
@avanbox
Feb 17 2016 15:04 UTC
oh yeah. i made the american mistake assumed everyone is from here
h4r1m4u
@h4r1m4u
Feb 17 2016 15:04 UTC
:)
Andrew Vanboxel
@avanbox
Feb 17 2016 15:05 UTC
ok, I wanted to figure this out myself but im just stuck. My calculator is working ok, but there is a bug. 2+2= works great. The problem occurs when you press 2+2+2 etc. the second operator throws everything off. I did not plan for this occurrence and now I dont know how to fix it. any tips?
Dulshani Gunawardhana
@dshgna
Feb 17 2016 15:06 UTC
@FatTone225 no background image. bdw is it a requirement?
Tony Miri
@TonyMiri
Feb 17 2016 15:07 UTC
@avanbox I think I used an operator flag that gets switched on and off. Not sure how you set yours up but I had two arrays for my equations so it worked out well
h4r1m4u
@h4r1m4u
Feb 17 2016 15:07 UTC
This message was deleted
Tony Miri
@TonyMiri
Feb 17 2016 15:07 UTC
Lol
Dulshani Gunawardhana
@dshgna
Feb 17 2016 15:08 UTC
@avanbox: yes openweathermap supports querying from zipcode. Small caveat there though, for the same zipcode may be there for different locations. I remember once I got somewhere in China for my zipcode lol
Andrew Vanboxel
@avanbox
Feb 17 2016 15:08 UTC
well ideally Id like to be able to do 2+2+2+2 etc.
Tony Miri
@TonyMiri
Feb 17 2016 15:08 UTC
@dshgna I don't remember if it's a requirement but I do think it was mentioned in the video.
@avanbox You can do it with that method
h4r1m4u
@h4r1m4u
Feb 17 2016 15:09 UTC
@avanbox evaluate the result after the user presses number / operator / number. this then becomes your "first number" for further operator clicks
Dulshani Gunawardhana
@dshgna
Feb 17 2016 15:09 UTC
@FatTone225: oh I just went through the text: it says icon or background...but guess I'll do the background too
Tony Miri
@TonyMiri
Feb 17 2016 15:10 UTC
@dshgna Never hurts to go the extra mile :smile:
Andrew Vanboxel
@avanbox
Feb 17 2016 15:10 UTC
Thats it! Thanks @h4r1m4u sometimes i just cant think. Such a simple solution
CamperBot
@camperbot
Feb 17 2016 15:10 UTC
avanbox sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1426 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Feb 17 2016 15:10 UTC
no probs
Joseph Morse
@jnmorse
Feb 17 2016 15:10 UTC
when I redid my weather app, I added a search bar, you can search by city, course I also redid mine in react, and might tweek it again to use redux at some point
Dulshani Gunawardhana
@dshgna
Feb 17 2016 15:11 UTC
@FatTone225 yeah and I'm wondering how to set the background image cos as I remember its a css property
is there anyway to change the image that is shown in our codepen portfolio? All mine are empty when I include the elements dynamicallly
Tony Miri
@TonyMiri
Feb 17 2016 15:16 UTC
Hmm. I think the preview updates based on probably the default image.
@dshgna I would just set a default and then overwrite it dynamically
Dulshani Gunawardhana
@dshgna
Feb 17 2016 15:18 UTC
@FatTone225 in case there's no background image? yeah...codepen doesnt show any dynamically appended elements which makes my portfolio look awful lol :(
Tony Miri
@TonyMiri
Feb 17 2016 15:19 UTC
And yeah you can set it as an attribute of the div or as a css property.
@dshgna Well I mean just set a default so your previews look better lol
AnnasLab
@AnnasLab
Feb 17 2016 15:21 UTC
Hello, In portfolio project I I created 2 principal divs for my page, the first is fixed on the left , the second which will contain the content, I used bootstrap grid to split the second div to 12 col, but it doesn't work, the grid always consider all the page as one div, can anyone help to find a trick to do that (sorry for my english :stuck_out_tongue_winking_eye: )
http://codepen.io/AnnasLab/details/XXQgZj/
Tony Miri
@TonyMiri
Feb 17 2016 15:23 UTC
@dshgna also by setting a default background you at least display something if your JS doesn't load
Sandip Subedi
@sandipsubedi
Feb 17 2016 15:27 UTC
HI guys .... would you please check my Tic-Tac Toe
and give me some feedback
please
Rune Bak Jacobsen
@runebakjacobsen
Feb 17 2016 15:28 UTC
@AnnasLab so you want the nav on the side and the yellow div to be the rest of the content?
Joseph Morse
@jnmorse
Feb 17 2016 15:29 UTC
@AnnasLab the head and body tags serve different purposes then what you are using them for. header would be for a page / section header, also you have container-fluid and row wrapping the section you want on the right which is partly why its not on the right
Dulshani Gunawardhana
@dshgna
Feb 17 2016 15:30 UTC
@FatTone225 yeah true there :)
AnnasLab
@AnnasLab
Feb 17 2016 15:30 UTC
@rune-jacobsen exactly
Rune Bak Jacobsen
@runebakjacobsen
Feb 17 2016 15:30 UTC
@AnnasLab When you tell the yellow div that it col-12 then it will fill all of the page
so because the nav fills some of the page i drops to the end of it
so it can spread to fill the entire page
@sandipsubedi when i play and i lose, if i dont press that i want to play again, i can keep play the old game
AnnasLab
@AnnasLab
Feb 17 2016 15:32 UTC
@rune-jacobsen so I think that if I need to do something like this bootstrap is not a good choice
Rune Bak Jacobsen
@runebakjacobsen
Feb 17 2016 15:32 UTC
@sandipsubedi and i can override the already used fields
@AnnasLab you can use bootstrap but you should see your nav as a col too
thomas-duval
@thomas-duval
Feb 17 2016 15:34 UTC
Hey guys,
I'm doing the Wikipedia project and I want to select the text inside an input. Any idea ? I can't remember how to do it using Jquery.
Thanks.
AnnasLab
@AnnasLab
Feb 17 2016 15:34 UTC
@rune-jacobsen but I can't give it a fix width, I can just give it 1 unit of the grid
h4r1m4u
@h4r1m4u
Feb 17 2016 15:34 UTC
thomas-duval
@thomas-duval
Feb 17 2016 15:35 UTC
@h4r1m4u perfect, thanks.
CamperBot
@camperbot
Feb 17 2016 15:35 UTC
thomas-duval sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1427 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Feb 17 2016 15:35 UTC
np
Rune Bak Jacobsen
@runebakjacobsen
Feb 17 2016 15:36 UTC
@AnnasLab you could also give it 2 or 3? I dont think a fixed with would be the best choice to use for the nav
AnnasLab
@AnnasLab
Feb 17 2016 15:37 UTC
@rune-jacobsen okay I'll give it try thanks for help have a great day
CamperBot
@camperbot
Feb 17 2016 15:37 UTC
annaslab sends brownie points to @rune-jacobsen :sparkles: :thumbsup: :sparkles:
:star: 287 | @rune-jacobsen | http://www.freecodecamp.com/rune-jacobsen
Rune Bak Jacobsen
@runebakjacobsen
Feb 17 2016 15:37 UTC
@AnnasLab No worries - put it in the same container if you want it side by side, or else it will also jump down
AnnasLab
@AnnasLab
Feb 17 2016 15:38 UTC
@rune-jacobsen Yes i'll make the nav horizental in small screen ;)
Rune Bak Jacobsen
@runebakjacobsen
Feb 17 2016 15:39 UTC
Exactly @AnnasLab, think responsive ;)
AnnasLab
@AnnasLab
Feb 17 2016 15:40 UTC
@jnmorse thanks bto i'll take your notes in consideration
CamperBot
@camperbot
Feb 17 2016 15:40 UTC
annaslab sends brownie points to @jnmorse :sparkles: :thumbsup: :sparkles:
:star: 393 | @jnmorse | http://www.freecodecamp.com/jnmorse
AnnasLab
@AnnasLab
Feb 17 2016 15:41 UTC
Thanks guys have a great days :D
Pavel
@Savrov
Feb 17 2016 15:44 UTC
Hello again, i have a quote generator here with one issue: after the first opening of page there is no quote. I need to push a Generate button. How i can do it automatically?
http://codepen.io/Savrov/pen/VeNMgP
Goje Samuel Andrei Daniel
@pringon
Feb 17 2016 15:44 UTC
can anyone tell me why is it only filtering the first element i click on?
Andrew Vanboxel
@avanbox
Feb 17 2016 15:54 UTC
@Savrov I did something like this: $(document).ready(function() {
insertQuote();
Jan Pribošek
@GreatDanton
Feb 17 2016 16:36 UTC
!rooms
CamperBot
@camperbot
Feb 17 2016 16:36 UTC

rooms

See all the FreeCodeCamp rooms at gitter.im/FreeCodeCamp/rooms
Or check this wiki article for a shortlist
Chris Hinton
@hintcj
Feb 17 2016 16:38 UTC
can someone tell me how to link to my pens in code pen? Whenever I put the URL in, I get a 404 error.
Dick Fink
@dickfink
Feb 17 2016 16:39 UTC
@hintcj can you try posting a url?
Andrew Vanboxel
@avanbox
Feb 17 2016 16:40 UTC
worked for me
Dick Fink
@dickfink
Feb 17 2016 16:40 UTC
me too
Andrew Vanboxel
@avanbox
Feb 17 2016 16:40 UTC
if your trying to link to them its better is you replace "pen" with full
Chris Hinton
@hintcj
Feb 17 2016 16:41 UTC
Alright, yeah, I don't know what the problem was then. Thank you @dickfink @avanbox
CamperBot
@camperbot
Feb 17 2016 16:41 UTC
hintcj sends brownie points to @dickfink and @avanbox :sparkles: :thumbsup: :sparkles:
:star: 208 | @avanbox | http://www.freecodecamp.com/avanbox
:star: 168 | @dickfink | http://www.freecodecamp.com/dickfink
Andrew Vanboxel
@avanbox
Feb 17 2016 16:41 UTC
np
Dick Fink
@dickfink
Feb 17 2016 16:41 UTC
avanbox — great tip w/ “full"
Chris Hinton
@hintcj
Feb 17 2016 16:41 UTC
@avanbox Why does changing to full make a difference?
Dick Fink
@dickfink
Feb 17 2016 16:41 UTC
i belive it just changes how it’s displayed (code minimized)
Chris Hinton
@hintcj
Feb 17 2016 16:42 UTC
oh okay, that makes sense then. First time using code pen!
Andrew Vanboxel
@avanbox
Feb 17 2016 16:43 UTC
yeah it makes it full screen
Dick Fink
@dickfink
Feb 17 2016 17:02 UTC
@vizFlux could it have something to do with your countdownCrt() function checking for seconds === 0 and resetting seconds to 59 before executing timeCount()? That seems like it could be problematic….
rodascesar
@cesarrodas
Feb 17 2016 17:06 UTC
Im trying to make my navbar button active when you scroll, can someone help?
Dick Fink
@dickfink
Feb 17 2016 17:12 UTC

@cesarrodas You’re going to have to detect the scroll position of your page and the (vertical) position of the sections on your page, and then based on that, give the corresponding menu item in your menu a specific class.

http://api.jquery.com/scrollTop/
http://api.jquery.com/position/

Something like this (not tested):

if ( $('body').scrollTop() > $('.section-a').position.top ) {
$('.menu-items').removeClass('selected');
$('.menu-a').addClass('selected');
}

if ( $('body').scrollTop() > $('.section-b').position.top ) {
$('.menu-items').removeClass('selected');
$('.menu-b').addClass('selected');
}

if ( $('body').scrollTop() > $('.section-c').position.top ) {
$('.menu-items').removeClass('selected');
$('.menu-c').addClass('selected');
}

Hiresh
@hiresh
Feb 17 2016 17:15 UTC
unable to filter json
       $.getJSON('https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&prop=extracts&exlimit=max&explaintext&exintro&exsentences=1&gsrsearch=suits&callback=?',function(json){
    json = json.filter(function(val) {
  return (val.index !== 1);
});
    $(".message").html(JSON.stringify(json));

      });
I want to filter the entries not having index 1
but no nothing displays, whereas when I simply stringify json, output is as expected, filter seems like ruining the thing, kindly help
Victória Simonetti
@victoriasimonetti
Feb 17 2016 17:19 UTC
Hi, how can I put images from my pc in codepen? we need a special account for hosting?
Dick Fink
@dickfink
Feb 17 2016 17:21 UTC
@victoriasimonetti you need to host them somewhere online and point to the URL, there are lots of free services which do that (imgur.com comes to mind)
rodascesar
@cesarrodas
Feb 17 2016 17:21 UTC
@dickfink thanks, i'm interested in getting mines to work, however. I thought I want close.
CamperBot
@camperbot
Feb 17 2016 17:21 UTC
cesarrodas sends brownie points to @dickfink :sparkles: :thumbsup: :sparkles:
:star: 169 | @dickfink | http://www.freecodecamp.com/dickfink
Hiresh
@hiresh
Feb 17 2016 17:22 UTC
       $.getJSON('https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&prop=extracts&exlimit=max&explaintext&exintro&exsentences=1&gsrsearch=suits&callback=?',function(json){
    json = json.filter(function(val) {
  return (val.index !== 1);
});
    $(".message").html(JSON.stringify(json));

      });
json is not filtered, help please
Victória Simonetti
@victoriasimonetti
Feb 17 2016 17:23 UTC
@dickfink thanks! =)
CamperBot
@camperbot
Feb 17 2016 17:23 UTC
victoriasimonetti sends brownie points to @dickfink :sparkles: :thumbsup: :sparkles:
:star: 170 | @dickfink | http://www.freecodecamp.com/dickfink
Hiresh
@hiresh
Feb 17 2016 17:24 UTC
is there any1 , who can help?
the index you’re calling in that code indicates " indicates the 0-based position of the element within the unfiltered set of matched elements"

eg if you had a page with a bunch of “li” elements:

$( "li" )
  .filter(function( index ) {
    return index % 3 === 2;
  })
    .css( "background-color", "red" );

would cause third and sixth list items to be highlighted.

i think you need to iterate through each of the “pages” object and filter out the one that has pages.index === 1
(but i’m just learning too, so take what i say with a grain of salt)
Maulik Darji
@maulikdarji
Feb 17 2016 17:30 UTC
Wenceslao Villegas Marset
@SpiralOut17
Feb 17 2016 17:31 UTC

Hi i need help in the Weather app zipline
I dont get a response from the openweather api, if i put the urrl in the browser searchbar it loads but when i call it with the ajax jquery function i get nothing.
Here is my code:



$(document).ready(function(){

  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(function(position){
      var apiUrl= "api.openweathermap.org/data/2.5/weather?lat="+ position.coords.latitude + "&lon=" + position.coords.longitude + "&units=metric&APPID=388b9dfad805b961ba54355aedb86991"
     $.ajax({
       url:apiUrl,
       success: function(weather){
         console.log(weather);
       },

     })
    });

  }else {
    $('#location-header').html('Geolocation is not available')
  };


});

Thanks
Here is the pen link: http://codepen.io/SpiralOut17/pen/XXQmxM?editors=0011

Lanitta
@DivaWeb
Feb 17 2016 17:40 UTC
hello all
how is everyone today?
Wenceslao Villegas Marset
@SpiralOut17
Feb 17 2016 17:41 UTC
@DivaWeb Great! you?
LDiek-
@LDiek-
Feb 17 2016 17:41 UTC
i have got a problem programming the weather app
i cant get my longtitude
Wenceslao Villegas Marset
@SpiralOut17
Feb 17 2016 17:41 UTC
@LDiek- Im working on that ziplite too
Lanitta
@DivaWeb
Feb 17 2016 17:42 UTC
@SpiralOut17 lol I almost through my computer through the window over a space in my code lolololololo
LDiek-
@LDiek-
Feb 17 2016 17:42 UTC
@SpiralOut17 i've seen it in CodeReview :D
Wenceslao Villegas Marset
@SpiralOut17
Feb 17 2016 17:42 UTC
@LDiek- Haha i just solved that problem i had
LDiek-
@LDiek-
Feb 17 2016 17:43 UTC
what was the problem?
@SpiralOut17
Wenceslao Villegas Marset
@SpiralOut17
Feb 17 2016 17:44 UTC
@LDiek- I couldnt get the JSON from the api because i was missing // at the beggining of the url
@LDiek- I was going nuts
LDiek-
@LDiek-
Feb 17 2016 17:46 UTC
@SpiralOut17 do i need the // always in js urls?
Wenceslao Villegas Marset
@SpiralOut17
Feb 17 2016 17:47 UTC
@LDiek- apparently it allows either http and https so it works with either
LDiek-
@LDiek-
Feb 17 2016 17:48 UTC
hmm ok thx
Hiresh
@hiresh
Feb 17 2016 17:48 UTC
@dickfink but the error I am facing in console is "filter is not a function"
LDiek-
@LDiek-
Feb 17 2016 17:50 UTC

@SpiralOut17 I dont get any longtitude nor an output in the div with the class "weather".This is my code:`function printweather(pos) {
var lon = pos.coords.longtitude;
var lat = pos.coords.latitude;

var url = "//api.openweathermap.org/data/2.5/weather?lat="; + lat + "&lon=" + lon + "&units=metric&APPID=6ffb926f18657b3913623a729923200f";
$.getJSON(url, function(data) {
$(".weather").html(data);
});
}

$(document).ready(function() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(printweather);
}
});`

function printweather(pos) {
var lon = pos.coords.longtitude;
var lat = pos.coords.latitude;

var url = "//api.openweathermap.org/data/2.5/weather?lat="; + lat + "&lon=" + lon + "&units=metric&APPID=6ffb926f18657b3913623a729923200f";
$.getJSON(url, function(data) {
$(".weather").html(data);
});
}

$(document).ready(function() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(printweather);
}
});
oh the indents are gone :O
Wenceslao Villegas Marset
@SpiralOut17
Feb 17 2016 17:54 UTC
@LDiek- You are not getting output because you are not getting nothing from the api since the lon variable is empty
LDiek-
@LDiek-
Feb 17 2016 17:54 UTC
@SpiralOut17 do you have an idea why lon could be empty?
Wenceslao Villegas Marset
@SpiralOut17
Feb 17 2016 17:56 UTC
@LDiek- Try using the position.coords.longitude and dont use the variables in the url
@LDiek- you can put the var url within the if statement and call the api from there
LDiek-
@LDiek-
Feb 17 2016 18:03 UTC
@SpiralOut17 ok i have got an output now... i just had to stringify the data object :D
but still i have got the {"cod":"404","message":"Error: Not found city"} message @SpiralOut17
Wenceslao Villegas Marset
@SpiralOut17
Feb 17 2016 18:04 UTC
@LDiek- Did you get de longitude?
LDiek-
@LDiek-
Feb 17 2016 18:05 UTC
no
@SpiralOut17 i just spelled longitude longtitude... thanks for your help!:D
CamperBot
@camperbot
Feb 17 2016 18:08 UTC
ldiek- sends brownie points to @spiralout17 :sparkles: :thumbsup: :sparkles:
:star: 279 | @spiralout17 | http://www.freecodecamp.com/spiralout17
Wenceslao Villegas Marset
@SpiralOut17
Feb 17 2016 18:08 UTC
This message was deleted
@LDiek- You are welcome! Havea nice day
Mafalda
@otmeek
Feb 17 2016 18:23 UTC
I just can't understand how to implemente the minimax algorithm in my tic tac toe game
it just feels like the way I've structure my code is not compatible with the algorithm at all and I'm not sure how to rebuild it
modus81
@modus81
Feb 17 2016 18:39 UTC
Hey Guys ...new guy just dropping a line
Drew
@andrewp89
Feb 17 2016 18:54 UTC

hey guys can someone please point me in the direction to fix my quote button |

http://codepen.io/drewpiper/pen/BjbjOW/?editors=0110

looking at how to get rid of that blue border when i click it, thank you

kirbyedy
@kirbyedy
Feb 17 2016 18:56 UTC
@andrewp89 outline:none;
h4r1m4u
@h4r1m4u
Feb 17 2016 18:56 UTC
@andrewp89 .btn:focus {outline: none;}
This message was deleted
Aiden Buis
@Aidenbuis
Feb 17 2016 18:57 UTC
@andrewp89 Hi Andrew, outline: none; will indeed solve your problem, but keep in mind that the outline also serves users with a screenreader
Drew
@andrewp89
Feb 17 2016 18:58 UTC
thanks guys!! been pulling my hair out for a bit :+1:
Joseph
@HadziJo
Feb 17 2016 19:02 UTC
hello peoples!
If anyone knows how ot convince CodePen to display an image (the <img> tag works well if browsing locally) I would appreciate getting a clue or two. I even tried adding the 'target="_blank"' trick used for the anchor tag <a href= ...>. Thanks in advance!
.o0( looks empty here, I guess I'll stop by again later)
Drew
@andrewp89
Feb 17 2016 19:10 UTC
what do you mean?
Cooper Reck
@cooperreck
Feb 17 2016 19:13 UTC
hey guys I'm working on the dedication page an am trying to center an image, anyone know how that would work?
Daniel Ross
@gainiacster
Feb 17 2016 19:14 UTC
@andrewp89 you can use bootstrap and add the class text-center
Robert Uivarosi
@URobert
Feb 17 2016 19:16 UTC
@cooperreck you could use bootstrap, or use a div wrapper, then mod the class like `.wrapper{text-align:center;} - that should do it
Aiden Buis
@Aidenbuis
Feb 17 2016 19:17 UTC
Yes, and study this post to be safe & sound in the future: https://css-tricks.com/centering-css-complete-guide/
Centering in CSS can be a B*tch ;)
Robert Uivarosi
@URobert
Feb 17 2016 19:19 UTC
@cooperreck Here is a finddle on how to do it: https://jsfiddle.net/66oxm294/
Cooper Reck
@cooperreck
Feb 17 2016 19:20 UTC
@URobert @Aidenbuis Thanks guys!
CamperBot
@camperbot
Feb 17 2016 19:20 UTC
cooperreck sends brownie points to @urobert and @aidenbuis :sparkles: :thumbsup: :sparkles:
:star: 593 | @urobert | http://www.freecodecamp.com/urobert
:star: 134 | @aidenbuis | http://www.freecodecamp.com/aidenbuis
Robert Uivarosi
@URobert
Feb 17 2016 19:20 UTC
@cooperreck yw
Drew
@andrewp89
Feb 17 2016 19:21 UTC
hey guys i tried putting btn:focus {outline:none;} but it doesnt seem to work (Also tried to add outline:none into my other .btn's and also outline:0; (as per google serach) but still getting that box on my button. thanks guys http://codepen.io/drewpiper/pen/MKRVzy
Shakib Hossain
@shakib609
Feb 17 2016 19:22 UTC
Hey just made this tribute page... Please tell me what should I do to make it look better? http://codepen.io/shakib609/full/jWRyQE/
Aiden Buis
@Aidenbuis
Feb 17 2016 19:25 UTC
@andrewp89 Add !important, outline: none !important;
Craig Banach
@CraigBanach
Feb 17 2016 19:25 UTC
@andrewp89 I suggest you fulfill the user stories before attempting to personalise it.
Shakib Hossain
@shakib609
Feb 17 2016 19:27 UTC
Made some minor changes. http://codepen.io/shakib609/full/jWRyQE/
wyattelliott
@wyattwade
Feb 17 2016 19:27 UTC
yoyooooooo!
Aiden Buis
@Aidenbuis
Feb 17 2016 19:28 UTC
@shakib609 Hi Shakib, some design questions: the blue nav has a huge height in comparison to the logo and the nav items, you could play with the font size and the line-height to vertically center them. I also sugget u make them inline by using only 1 row. Last point, the box shadow is not subtle, you can check out Google’s Material design and how they use shadows (They the boxshadowbosses)
@wyattwade Wasssup
Drew
@andrewp89
Feb 17 2016 19:29 UTC
@Aidenbuis champion!!
wyattelliott
@wyattwade
Feb 17 2016 19:30 UTC
@Aidenbuis hangin out man... just been working on this project for so long
Shakib Hossain
@shakib609
Feb 17 2016 19:30 UTC
Changed the nav to use a single row.. I'll have to look about the box shadow. @Aidenbuis thanks
CamperBot
@camperbot
Feb 17 2016 19:30 UTC
shakib609 sends brownie points to @aidenbuis :sparkles: :thumbsup: :sparkles:
:star: 135 | @aidenbuis | http://www.freecodecamp.com/aidenbuis
wyattelliott
@wyattwade
Feb 17 2016 19:30 UTC
Tic Tac Toe
I think it's done. If anyone is able to beat it or has any criticism, it's much appreciated
Aiden Buis
@Aidenbuis
Feb 17 2016 19:31 UTC
@wyattwade Aiii I didn’t do that one yet, let me see !
wyattelliott
@wyattwade
Feb 17 2016 19:32 UTC
thanks man @Aidenbuis . This one took a while for whatever reason
CamperBot
@camperbot
Feb 17 2016 19:32 UTC
wyattwade sends brownie points to @aidenbuis :sparkles: :thumbsup: :sparkles:
:star: 136 | @aidenbuis | http://www.freecodecamp.com/aidenbuis
kirbyedy
@kirbyedy
Feb 17 2016 19:34 UTC
@wyattwade there is a bug
check the image
Screen Shot 2016-02-17 at 21.33.42.png
this happened in the middle of the game
Shakib Hossain
@shakib609
Feb 17 2016 19:37 UTC
Changed the box shadow to use the mdl's default box-shadow class http://codepen.io/shakib609/full/jWRyQE/
wyattelliott
@wyattwade
Feb 17 2016 19:41 UTC
@kirbyedy oops lemme get rid of that. Was using that for testing my bad
Ok I just updated/saved it
thanks for taking a look @kirbyedy . Fixed that. Let me know if you find anything else
CamperBot
@camperbot
Feb 17 2016 19:43 UTC
wyattwade sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star: 492 | @kirbyedy | http://www.freecodecamp.com/kirbyedy
George Carroll
@ghcarrolljr
Feb 17 2016 19:45 UTC
I am working on Accessing Nested Arrays in JSON and could use some help. Don't know how to pick an object from a nested object.
Craig Banach
@CraigBanach
Feb 17 2016 19:46 UTC
@ghcarrolljr Ok, post your formatted code and we'll have a look.
help format
CamperBot
@camperbot
Feb 17 2016 19:46 UTC

:point_right: code formatting [wiki]

Inline code

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

Code Block

```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 ⏎]

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

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

George Carroll
@ghcarrolljr
Feb 17 2016 19:48 UTC
This is what I have so far "var secondTree = myPlants.type[trees].list1;" but does not work. any help?
Craig Banach
@CraigBanach
Feb 17 2016 19:48 UTC
@ghcarrolljr maybe if you post all your code we can.
George Carroll
@ghcarrolljr
Feb 17 2016 19:49 UTC

// Setup
var myPlants = [
{
type: "flowers",
list: [
"rose",
"tulip",
"dandelion"
]
},
{
type: "trees",
list: [
"fir",
"pine",
"birch"
]
}
];

// Only change code below this line

var secondTree = myPlants.type.trees.list[1]; // Change this line

Craig Banach
@CraigBanach
Feb 17 2016 19:50 UTC
@ghcarrolljr can you post your formatted code as requested please
help format
CamperBot
@camperbot
Feb 17 2016 19:50 UTC

:point_right: code formatting [wiki]

Inline code

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

Code Block

```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 ⏎]

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

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

ronald
@ronstarcool
Feb 17 2016 19:57 UTC
hello
can someone help me drive my car?
its the green vehicle on the right side of the screen
if i click it, it does drive around the bend
but it doesnt move forward
it should
George Carroll
@ghcarrolljr
Feb 17 2016 20:01 UTC
@cragsify

@cragsify // Setup
var myPlants = [
{
type: "flowers",
list: [
"rose",
"tulip",
"dandelion"
]
},
{
type: "trees",
list: [
"fir",
"pine",
"birch"
]
}
];

// Only change code below this line

var secondTree = myPlants.type.trees.list[1]; // Change this line

Craig Banach
@CraigBanach
Feb 17 2016 20:01 UTC
 // Setup
var myPlants = [
{
type: "flowers",
list: [
"rose",
"tulip",
"dandelion"
]
},
{
type: "trees",
list: [
"fir",
"pine",
"birch"
]
}
];
// Only change code below this line
var secondTree = myPlants.type.trees.list[1]; // Change this line
sigh...
@ghcarrolljr ok, since I don't know what the challenge is I don't know what you are trying to do.
wyattelliott
@wyattwade
Feb 17 2016 20:02 UTC
Hey guys
if anyone has a chance can you check out my project
Craig Banach
@CraigBanach
Feb 17 2016 20:02 UTC
@ghcarrolljr myPlants.type == "flowers" and has no trees property.
criticism is much appreciated
and please let me know if you can beat it. That means there's a bug
Lanitta
@DivaWeb
Feb 17 2016 20:04 UTC
ok I need something explained to me about bootstrap
George Carroll
@ghcarrolljr
Feb 17 2016 20:05 UTC
@cragsify write a variable that gets the second tree in the tree list
Lanitta
@DivaWeb
Feb 17 2016 20:06 UTC
does a container in bootstrap have default sizes?
Craig Banach
@CraigBanach
Feb 17 2016 20:09 UTC
@ghcarrolljr OK, so you know that the object has two nested arrays.
ronald
@ronstarcool
Feb 17 2016 20:09 UTC
@wyattwade i cant beat it. but there is somthing wrong. sometimes, comp skips a move. so player can go twice
Craig Banach
@CraigBanach
Feb 17 2016 20:10 UTC
And you want to access the second array and then the second object within that arary. @ghcarrolljr
R. E. Daniels
@RDaniels34
Feb 17 2016 20:10 UTC
Hey all... Was hoping someone could help with my weather app... I''m almost there. Having trouble changing the city. I'm trying to do it with url.replace(city, newcity)... Any help would be appreciated! http://codepen.io/RDaniels34/pen/zreZwy
Craig Banach
@CraigBanach
Feb 17 2016 20:12 UTC
@RDaniels34 Why do you want to view cities location? The user story states that you need to show the weather at the current location?
wyattelliott
@wyattwade
Feb 17 2016 20:13 UTC
crap
R. E. Daniels
@RDaniels34
Feb 17 2016 20:13 UTC
@cragsify I can get the weather for my location just by putting the name in, but I want anyone who wants to see their location to enter a city name and have it come up..
wyattelliott
@wyattwade
Feb 17 2016 20:13 UTC
thanks @ronstarcool I'll check that out
CamperBot
@camperbot
Feb 17 2016 20:13 UTC
wyattwade sends brownie points to @ronstarcool :sparkles: :thumbsup: :sparkles:
:star: 329 | @ronstarcool | http://www.freecodecamp.com/ronstarcool
Craig Banach
@CraigBanach
Feb 17 2016 20:14 UTC
@RDaniels34 Why don't you just use geo-location to enable people to view the weather at their location?
wyattelliott
@wyattwade
Feb 17 2016 20:14 UTC
@ronstarcool crap it just happened I see what you me an
R. E. Daniels
@RDaniels34
Feb 17 2016 20:15 UTC
@cragsify what if they want to see the weather somewhere else?
Craig Banach
@CraigBanach
Feb 17 2016 20:15 UTC
@RDaniels34 Also how are you handling people that input the cities name differently than the API asks?
@RDaniels34 let them put in the coords
Sandip Subedi
@sandipsubedi
Feb 17 2016 20:16 UTC
@rune-jacobsen thank you ... fixed both of them
CamperBot
@camperbot
Feb 17 2016 20:16 UTC
sandipsubedi sends brownie points to @rune-jacobsen :sparkles: :thumbsup: :sparkles:
:star: 288 | @rune-jacobsen | http://www.freecodecamp.com/rune-jacobsen
R. E. Daniels
@RDaniels34
Feb 17 2016 20:16 UTC
@cragsify Does anyone you know know what their coords are?
@cragsify What are the coords for Tucson?
Craig Banach
@CraigBanach
Feb 17 2016 20:17 UTC
@RDaniels34 32.2217° N, 110.9264° W
Gabriel
@Zera99
Feb 17 2016 20:18 UTC
How do I link a picture in dropbox to put it in a img tag?
R. E. Daniels
@RDaniels34
Feb 17 2016 20:18 UTC
@cragsify I want to do it my way, if you can't help then...
Craig Banach
@CraigBanach
Feb 17 2016 20:18 UTC
@RDaniels34 I don't know how to get it to give me the weather in my City, Perth, Scotland, given that if I type inPerth, it will take me to Australia, but I know how to find my coords and input them.
R. E. Daniels
@RDaniels34
Feb 17 2016 20:19 UTC
@cragsify you just us UK in the json
@RDaniels34 use
@cragsify or at least the country code for Scotland
Catalin Scripcariu
@CatalinScr
Feb 17 2016 20:20 UTC
@Zera99 I used http://tinypic.com/
Craig Banach
@CraigBanach
Feb 17 2016 20:20 UTC
@RDaniels34 If you want to pull data from your input field, then you will need to add an on-clcik listener to the button and disable the loading of the page when the button is clicked.
R. E. Daniels
@RDaniels34
Feb 17 2016 20:22 UTC
@cragsify so my onclick event would be outside the onready function?
Craig Banach
@CraigBanach
Feb 17 2016 20:23 UTC
@RDaniels34 inside.
R. E. Daniels
@RDaniels34
Feb 17 2016 20:23 UTC
or document.ready function
@cragsify it is inside already
George Carroll
@ghcarrolljr
Feb 17 2016 20:24 UTC
@cragsify Sorry was out for a min. Yes and Yes.
Craig Banach
@CraigBanach
Feb 17 2016 20:24 UTC
@RDaniels34 I tested it, it doesn't work.
@ghcarrolljr So can you think of a way to access entries within an array?
@Zera99 link me the image please?
Gabriel
@Zera99
Feb 17 2016 20:25 UTC
I did it ^^ Thanks though. @cragsify
CamperBot
@camperbot
Feb 17 2016 20:25 UTC
zera99 sends brownie points to @cragsify :sparkles: :thumbsup: :sparkles:
:star: 316 | @cragsify | http://www.freecodecamp.com/cragsify
George Carroll
@ghcarrolljr
Feb 17 2016 20:26 UTC
@cragsify arrayName[position]
Craig Banach
@CraigBanach
Feb 17 2016 20:26 UTC
@ghcarrolljr ok ,so do that in your code. access the 2nd array, then the 2nd array again.
R. E. Daniels
@RDaniels34
Feb 17 2016 20:26 UTC
@cragsify I know it doesn't work. That's why I came here to the chat.
Craig Banach
@CraigBanach
Feb 17 2016 20:27 UTC
@RDaniels34 OK, I'd recommend putting the event listener in you JS and linkin to the element by reference to it's ID.
George Carroll
@ghcarrolljr
Feb 17 2016 20:27 UTC
@cragsify ?
R. E. Daniels
@RDaniels34
Feb 17 2016 20:27 UTC
@cragsify I'll give that a try....
wyattelliott
@wyattwade
Feb 17 2016 20:28 UTC
@ronstarcool k fixed that issue
hajeansonne
@hajeansonne
Feb 17 2016 20:28 UTC
Ok this may be another stupid question... for the portfolio zipline, do I HAVE to have a nav bar that stays at the top as you scroll down, or can i just have buttons that link to each section of the page
wyattelliott
@wyattwade
Feb 17 2016 20:28 UTC
If anyone can beat this pleeasee let me know
George Carroll
@ghcarrolljr
Feb 17 2016 20:28 UTC
@cragsify Waht is the first array? type
wyattelliott
@wyattwade
Feb 17 2016 20:28 UTC
or if you have any criticism
ronald
@ronstarcool
Feb 17 2016 20:28 UTC
good job @wyattwade
not sure :)
Craig Banach
@CraigBanach
Feb 17 2016 20:28 UTC
@ghcarrolljr myPlants
wyattelliott
@wyattwade
Feb 17 2016 20:28 UTC
@ronstarcool i thiiiiink i fixed the issue
did about 20 test runs
George Carroll
@ghcarrolljr
Feb 17 2016 20:29 UTC
@cragsify so what is the second?
Craig Banach
@CraigBanach
Feb 17 2016 20:29 UTC
@hajeansonne What do the user stories say.
ronald
@ronstarcool
Feb 17 2016 20:29 UTC
y, you fixed it
nice gameflow!
Craig Banach
@CraigBanach
Feb 17 2016 20:30 UTC
@ghcarrolljr If you use myPlants[1] then you are inside the 2nd element in the main array, then if you do [1], you will access the 2nd, 2nd element
hajeansonne
@hajeansonne
Feb 17 2016 20:30 UTC
@cragsify I navigate to different sections of the webpage by clicking buttons in the navigation, by "in the navigation" do they mean nav bar?
Craig Banach
@CraigBanach
Feb 17 2016 20:30 UTC
@ghcarrolljr
myPlants[1][1]
@hajeansonne That's open to interpretation i suppose.
wyattelliott
@wyattwade
Feb 17 2016 20:31 UTC
@ronstarcool thank you man
CamperBot
@camperbot
Feb 17 2016 20:31 UTC
wyattwade sends brownie points to @ronstarcool :sparkles: :thumbsup: :sparkles:
:warning: wyattwade already gave ronstarcool points
hajeansonne
@hajeansonne
Feb 17 2016 20:31 UTC
@cragsify god i hope so, i just put so much work into the home section
wyattelliott
@wyattwade
Feb 17 2016 20:31 UTC
I have to send this project in for an application
just want to make sure it works alright
hajeansonne
@hajeansonne
Feb 17 2016 20:31 UTC
@cragsify thank you
CamperBot
@camperbot
Feb 17 2016 20:31 UTC
hajeansonne sends brownie points to @cragsify :sparkles: :thumbsup: :sparkles:
:star: 317 | @cragsify | http://www.freecodecamp.com/cragsify
Craig Banach
@CraigBanach
Feb 17 2016 20:32 UTC
@ghcarrolljr what I did was
var secondTree = myPlants[1].list[1];
George Carroll
@ghcarrolljr
Feb 17 2016 20:39 UTC
@cragsify thanks
Caleb Martin
@caleb272
Feb 17 2016 20:43 UTC
how do you put multiple style elements into a inline style like this style="margin-top: 40px"
Craig Banach
@CraigBanach
Feb 17 2016 20:44 UTC
@caleb272 leave a space between them.
@caleb272 although it is bad practice.
Caleb Martin
@caleb272
Feb 17 2016 20:44 UTC
o ok
i guess i will just create a css element
Craig Banach
@CraigBanach
Feb 17 2016 20:44 UTC
@caleb272 I would advise it :D
Lanitta
@DivaWeb
Feb 17 2016 20:45 UTC
why do I have an odd man out? http://codepen.io/DivaWeb/pen/XXOdEX
it is in section 3
Caleb Martin
@caleb272
Feb 17 2016 20:46 UTC
wow that looks good divaWeb
Lanitta
@DivaWeb
Feb 17 2016 20:46 UTC
@caleb272 thank you but it is still a work in progress lolol
CamperBot
@camperbot
Feb 17 2016 20:46 UTC
divaweb sends brownie points to @caleb272 :sparkles: :thumbsup: :sparkles:
:star: 132 | @caleb272 | http://www.freecodecamp.com/caleb272
zackluckyf
@zackluckyf
Feb 17 2016 20:49 UTC
https://htmlpreview.github.io/?https://github.com/zackluckyf/random-quote-machine/blob/master/Random-Quote-Generator/index.html
Random quote machine completed except for the fact that all the quotes are hard programmed in js and not from an api. I know nothing of how to do that, should I go learn some php and ajax to be able to do it all?
Craig Banach
@CraigBanach
Feb 17 2016 20:49 UTC
@zackluckyf just do it in JS.
zackluckyf
@zackluckyf
Feb 17 2016 20:52 UTC
@cragsify I'm not sure where to start is there a resource to learn about api's and how to use them?
Craig Banach
@CraigBanach
Feb 17 2016 20:53 UTC
@zackluckyf each api is slightly different. What i would aim to learn is the way of sending get requests, such as jQuery's $.get and $.ajax
George
@gxenos
Feb 17 2016 20:53 UTC
guys i uploaded images to imgur to use in my codepen and when i go full page view they dont load.any idea why?
Craig Banach
@CraigBanach
Feb 17 2016 20:53 UTC
@gxenos post your codepen link
zackluckyf
@zackluckyf
Feb 17 2016 20:54 UTC
@cragsify okay I'll give that a go, thank you
CamperBot
@camperbot
Feb 17 2016 20:54 UTC
zackluckyf sends brownie points to @cragsify :sparkles: :thumbsup: :sparkles:
:star: 318 | @cragsify | http://www.freecodecamp.com/cragsify
Cooper Reck
@cooperreck
Feb 17 2016 20:57 UTC
So I want to change the text under the picture independently from the main text but they are only changing together, can someone help? http://codepen.io/Cjreck/pen/PZLrpy?editors=1100
Craig Banach
@CraigBanach
Feb 17 2016 20:57 UTC
@gxenos It workds for me.
George
@gxenos
Feb 17 2016 20:57 UTC
can you open it in a new tab and check it?
Craig Banach
@CraigBanach
Feb 17 2016 20:58 UTC
@cooperreck color: black;
@cooperreck not text-color:black;
@gxenos I have.
George
@gxenos
Feb 17 2016 20:59 UTC
@cragsify well,when i refresh it,the images get lost
Sloth
@RMo-Sloth
Feb 17 2016 20:59 UTC
@cooperreck place the image and paragraph in a div, style the div.
Cooper Reck
@cooperreck
Feb 17 2016 21:00 UTC
@cragsify Thank You!!1
CamperBot
@camperbot
Feb 17 2016 21:00 UTC
cooperreck sends brownie points to @cragsify :sparkles: :thumbsup: :sparkles:
:star: 320 | @cragsify | http://www.freecodecamp.com/cragsify
Dick Fink
@dickfink
Feb 17 2016 21:01 UTC
@gxenos it seems to work intermittantly — but i think you should wrap the url in quotes in your css
Caleb Martin
@caleb272
Feb 17 2016 21:04 UTC
nice green color i hope you don’t mind me stealing it for my project
can someone check out my project http://codepen.io/thecoder15/full/wMZgVw/
Brett Felts
@brettfelts
Feb 17 2016 21:05 UTC
I'm working on the wikipedia app. Does anyone know how to add the Access-Control-Allow-Origin hedaer for that?
George
@gxenos
Feb 17 2016 21:06 UTC
@dickfink alright,i fixed it,i uploaded them in imageshack instead.Do you like it though?
Caleb Martin
@caleb272
Feb 17 2016 21:08 UTC
does anyone here live in Montana
LDiek-
@LDiek-
Feb 17 2016 21:10 UTC
hi how do i get the table borders completely transparent? http://codepen.io/LDiek-/full/PZgQwG/
Dick Fink
@dickfink
Feb 17 2016 21:12 UTC
@gxenos yup, that works now. there’s a lot of un-used verticle whitespace (but if you like it go for it!), and the social buttons act oddly when the window is narrow. Otherwise it looks very nice (much nicer than mine)
George
@gxenos
Feb 17 2016 21:13 UTC
@dickfink yeah its not responsive
@dickfink i like its simplicity
Cooper Reck
@cooperreck
Feb 17 2016 21:15 UTC
now does anyone know how I would center the image of Bowie and the facts below him? http://codepen.io/Cjreck/pen/PZLrpy?editors=1100
Jack Lyons
@JackEdwardLyons
Feb 17 2016 21:16 UTC
hmm i tried that @wearenotgroot and didn't seem to change things...
still says 59:59...
Brett Felts
@brettfelts
Feb 17 2016 21:17 UTC
@cooperreck Try text-align: center; in .mainBody
Jack Lyons
@JackEdwardLyons
Feb 17 2016 21:19 UTC
actually i got it work @wearenotgroot thanks for the help :)
CamperBot
@camperbot
Feb 17 2016 21:19 UTC
jackedwardlyons sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
api offline
Cooper Reck
@cooperreck
Feb 17 2016 21:20 UTC
@brettfelts Ah doing that centers the text of the facts but keeps the list on the right
Brett Felts
@brettfelts
Feb 17 2016 21:25 UTC
you can add ul to the beginning of .list, then add a text-align: center to that. It will center the text, but leave the bullet points on the left
hmm.
@cooperreck On the other hand: .list {
margin-left: 6.5%;
text-align: justify;
list-style-type: square;
font-family: Times New Roman;
font-size: 18px;
width: 700px;
}
Sujit Karki
@Swoozeki
Feb 17 2016 21:35 UTC
Time to start the weather challenge. I am so nervous
Brett Felts
@brettfelts
Feb 17 2016 21:36 UTC
@Swoozeki You got this! It took me a few days, but once I realized my problems were just an extra if statement, it all made sense
Caleb Martin
@caleb272
Feb 17 2016 21:39 UTC
can someone check out my project http://codepen.io/thecoder15/full/wMZgVw/
Cooper Reck
@cooperreck
Feb 17 2016 21:40 UTC
That looks much better, thanks! @brettfelts
CamperBot
@camperbot
Feb 17 2016 21:40 UTC
cooperreck sends brownie points to @brettfelts :sparkles: :thumbsup: :sparkles:
:star: 360 | @brettfelts | http://www.freecodecamp.com/brettfelts
hajeansonne
@hajeansonne
Feb 17 2016 21:42 UTC
So I used position:absolute to position links over particular parts of the background image, and when I go to full page view, they are no longer where I want them. I am VERY new to this and I am not sure how to fix this
zackluckyf
@zackluckyf
Feb 17 2016 21:42 UTC
any api recommendations for the random quote machine?
Brett Felts
@brettfelts
Feb 17 2016 21:42 UTC
@cooperreck No problem. If it has trouble when responsive, try setting the left and right margins to the same amount
@caleb272 I would suggest adding a bit of padding around your text, and making it a bit smaller
the list items are a bit overwhelming
Andrew Vanboxel
@avanbox
Feb 17 2016 21:44 UTC
so ive been working on this calculator, think im done, go to submit it and the project is gone from the map?
Sujit Karki
@Swoozeki
Feb 17 2016 21:45 UTC
@hajeansonne instead of using px or em, use %
George
@gxenos
Feb 17 2016 21:45 UTC
@caleb272 nice work man.you can maybe try to change the a tag text color
Andrew Vanboxel
@avanbox
Feb 17 2016 21:45 UTC
@zackluckyf i just used an array
Sujit Karki
@Swoozeki
Feb 17 2016 21:46 UTC
@avanbox Calculator's been moved from basic front-end to intermediate front-end, I think
Andrew Vanboxel
@avanbox
Feb 17 2016 21:46 UTC
oh really? Guess I got a head start then haha
it must have moved while i was working on it
Sujit Karki
@Swoozeki
Feb 17 2016 21:47 UTC
Yup, congrats :D Your learning curve is going to appreciate it
wyattelliott
@wyattwade
Feb 17 2016 21:50 UTC
Hey guys
I'm about to submit my tic tac toe challenge for an application
AnnasLab
@AnnasLab
Feb 17 2016 21:50 UTC
Yoo whssup campers ^^, anyone know how to use local font file on codepen something like host the files on dropbox work ?
wyattelliott
@wyattwade
Feb 17 2016 21:50 UTC
anyones critissm is much appreciated
Mariya
@mariyadiminsky
Feb 17 2016 21:51 UTC
I'm trying to create an indexOf function for an assignment and for some reason my checkDuplicate object always shows the array item = NaN, like the +1 in the for loop isn't working. Why doesn't it work and how can I fix this issue? Advice appreciated :)
indexOf([11,33, 22,33], 33); 
2    
3    function indexOf(array, value) {
4        var result = -1;
5        var checkDuplicate = {};
6        
7        for(var i = 0; i < array.length; i++) {
8            if(array[i] === value) {
9                checkDuplicate[array[i]] += 1;
10                if(checkDuplicate[array[i]] !== 1) {
11                    result = i;
12                }
13            }
14        }
15        
16        return result;
17    
18    }
Where my error is: http://goo.gl/BmkhUc
hajeansonne
@hajeansonne
Feb 17 2016 21:52 UTC
@Swoozeki its not as bad, but still moves out of alignment with the background
criticism much appreciated
if you can beat it pleeasee let me knwo
Mariya
@mariyadiminsky
Feb 17 2016 21:54 UTC
updated code
indexOf([11,33, 22,33], 33); 

function indexOf(array, value) {
    var result = -1;
    var checkDuplicate = {};

    for(var i = 0; i < array.length; i++) {
        if(array[i] === value) {
            checkDuplicate[array[i]] += 1;
            if(checkDuplicate[array[i]] > 1) {
                result = i;
            }
        }
    }

    return result;

}
Mariya
@mariyadiminsky
Feb 17 2016 22:01 UTC
nvm ty :)
hajeansonne
@hajeansonne
Feb 17 2016 22:06 UTC
I think some of the problem I had with links moving when I went into page view, has something to do with the editor layout that i was using, is that possible?
kiel barry
@kielbarry
Feb 17 2016 22:16 UTC
 <div class="navi">
          <ul>
                      <li>About</li>
            <li>Work</li>
            <li>Team</li>
            <li>Contact</li>
          </ul>
        </div>

        .navi {
          display: inline;
          tex-align: center;
        }
how isn't this working? keeps displaying as a block text
the css above is in a css stylesheet
.... can only get it to work if i post class="navi" into each LI
George
@gxenos
Feb 17 2016 22:21 UTC
@declanPaz well inline doesnt work this way
kiel barry
@kielbarry
Feb 17 2016 22:22 UTC
i thought it would put all items that inherit the class with inline onto one line
George
@gxenos
Feb 17 2016 22:22 UTC
@declanPaz you can use
''' .navi *{ display: inline; }
CamperBot
@camperbot
Feb 17 2016 22:23 UTC
:bulb: to format code use backticks! ``` more info
George
@gxenos
Feb 17 2016 22:23 UTC
.navi *{ display: inline; }
@declanPaz does this work?
kiel barry
@kielbarry
Feb 17 2016 22:24 UTC
yes.. ty @gxenos
@gxenos thanks
CamperBot
@camperbot
Feb 17 2016 22:24 UTC
declanpaz sends brownie points to @gxenos :sparkles: :thumbsup: :sparkles:
:star: 246 | @gxenos | http://www.freecodecamp.com/gxenos
George
@gxenos
Feb 17 2016 22:24 UTC
@declanPaz do you understand how it works though?
kiel barry
@kielbarry
Feb 17 2016 22:25 UTC
not entirely, i understand the * works as a "get all"
but i thought all children of parents would inherit every trait of the class assigned to the parent
George
@gxenos
Feb 17 2016 22:25 UTC
@declanPaz basicly you apply the styles to all the children elements of the div
Sujit Karki
@Swoozeki
Feb 17 2016 22:26 UTC
var lat;
var long;
if(navigator.geolocation){
  navigator.geolocation.getCurrentPosition(function(position){
    lat=position.coords.latitude;
    long=position.coords.longitude;

  });

}
$("#temperature").html(lat+" and " + long);
Why the fudge does the lat and lang variable not get assigned?
I get undefined and undefined as result...
George
@gxenos
Feb 17 2016 22:28 UTC
@Swoozeki i have no idea what the if does exactly but if the if is false the variables never get defined
@Swoozeki try giving them a value when you define them,before the if statement to check it out
Sujit Karki
@Swoozeki
Feb 17 2016 22:31 UTC
@gxenos if I assign lat and long=0, the end result will be 0 and 0
var lat=0;
var long=0;
if(navigator.geolocation){
  navigator.geolocation.getCurrentPosition(function(position){
    lat=position.coords.latitude;
    long=position.coords.longitude;
    $("#temperature").html(lat+" and " + long);
  });

}
If I have the above code, inside the function, then it works
However, I'm unable to use lat and long outside of the function
AnnasLab
@AnnasLab
Feb 17 2016 22:33 UTC
Hey guys tomorrow I'll create my portfolio project ^^ so I created a small HTML/CSS made logo to warming-up, take a look ^^
http://codepen.io/AnnasLab/full/mVgGba/
Lanitta
@DivaWeb
Feb 17 2016 22:34 UTC
Can someone explain to me why on my portfolio page I have lonely floater out of place:http://codepen.io/DivaWeb/pen/XXOdEX
Sujit Karki
@Swoozeki
Feb 17 2016 22:34 UTC
@AnnasLab you should begin assigning ids or classes right away, and applying css for ids and classes instead of the elements as a whole
AnnasLab
@AnnasLab
Feb 17 2016 22:35 UTC
@Swoozeki thanks for the advice I'll do ^^
Sujit Karki
@Swoozeki
Feb 17 2016 22:36 UTC
@DivaWeb Woah, your page takes forever to load. What's up with that?
Lanitta
@DivaWeb
Feb 17 2016 22:36 UTC
@Swoozeki beats me because it loads right up for me
Sujit Karki
@Swoozeki
Feb 17 2016 22:37 UTC
must be my old computer, sigh...
Mike Mols
@mikemols
Feb 17 2016 22:38 UTC
he just used a rather large img as background: https://static.pexels.com/photos/28325/pexels-photo.jpg
Zay
@incognitonerd
Feb 17 2016 22:39 UTC
i would like to see how someone add FCC to their resume. i finished the frontend section and would liek to add it to my resume. an HR said it should be added to my resume
please message me
George
@gxenos
Feb 17 2016 22:40 UTC
@Swoozeki check the pm i sent you
Lanitta
@DivaWeb
Feb 17 2016 22:40 UTC
@Swoozeki sorry can you help me with my problem:(
disjfa
@disjfa
Feb 17 2016 22:43 UTC
@DivaWeb it is in a new row -fluid in a row-fluid
Pauline
@chumswap
Feb 17 2016 22:43 UTC
Anyone willing to critique my weather app? It takes too long to load the data for my taste. I think it's because of the callback function hell I wrote. I can't think of a way to streamline it or even a different way to write it. Apparently you can't return data from asynchronous functions? So my code looks like a mess. Not sure how to fix it. Appreciate any ideas! Weather app
George
@gxenos
Feb 17 2016 22:45 UTC
@DivaWeb did you fix it?
Lanitta
@DivaWeb
Feb 17 2016 22:45 UTC
@disjfa thank you for your help but I am not understanding what you are saying
CamperBot
@camperbot
Feb 17 2016 22:45 UTC
divaweb sends brownie points to @disjfa :sparkles: :thumbsup: :sparkles:
:star: 83 | @disjfa | http://www.freecodecamp.com/disjfa
Lanitta
@DivaWeb
Feb 17 2016 22:46 UTC
@gxenos no I have not fixed it yet still racking the marbles in my head lol
AnnasLab
@AnnasLab
Feb 17 2016 22:46 UTC
@Swoozeki is this the proper way to implement the logo in code or there's a smarter way (best practice) I used an ID instead of Class because there just single logo in the page, thanks
http://codepen.io/AnnasLab/full/mVgGba/
CamperBot
@camperbot
Feb 17 2016 22:46 UTC
annaslab sends brownie points to @swoozeki :sparkles: :thumbsup: :sparkles:
:star: 289 | @swoozeki | http://www.freecodecamp.com/swoozeki
disjfa
@disjfa
Feb 17 2016 22:47 UTC
@DivaWeb remove the </div><div id="row2"..> and click tidy on top so you can see your code more correct
Pauline
@chumswap
Feb 17 2016 23:14 UTC
Anyone willing to critique my weather app? It takes too long to load the data for my taste. I think it's because of the callback function hell I wrote. I can't think of a way to streamline it or even a different way to write it. Apparently you can't return data from asynchronous functions? So my code looks like a mess. Not sure how to fix it. Appreciate any ideas! Weather app
Sujit Karki
@Swoozeki
Feb 17 2016 23:26 UTC
@chumswap Woah, it's amazing! I just started the weather app as well, and maybe just finally starting to get the gist of JSON. But that seems like the only way to do it so far
@chumswap instead of all that addClass and removeClass, try toggleClass to shorten
Caleb Martin
@caleb272
Feb 17 2016 23:33 UTC
nice weather app looks great very simplistic i like @Swoozeki
Pauline
@chumswap
Feb 17 2016 23:33 UTC
@Swoozeki I will look into toggleClass but I think the bigger issue is the getting the data. Thanks. :)
CamperBot
@camperbot
Feb 17 2016 23:33 UTC
chumswap sends brownie points to @swoozeki :sparkles: :thumbsup: :sparkles:
:star: 290 | @swoozeki | http://www.freecodecamp.com/swoozeki
Sujit Karki
@Swoozeki
Feb 17 2016 23:34 UTC
@caleb272 That's @chumswap , my friend
Caleb Martin
@caleb272
Feb 17 2016 23:34 UTC
o ok sorry
but it looks good
@chumswap your weather app looks very simplistic which is good
how long have you guys been on this site
Sujit Karki
@Swoozeki
Feb 17 2016 23:37 UTC
I have been here for a month now
Rex Schrader
@SaintPeter
Feb 17 2016 23:38 UTC

New Server Live

Report any "Oops" messages here, please.
Pauline
@chumswap
Feb 17 2016 23:40 UTC
I started in December. I put anywhere from 1 to 18 hours a week into it.
Caleb Martin
@caleb272
Feb 17 2016 23:41 UTC
nice i learned of this site about a month ago and i did like 3 hours a day in Jan but i just started 3 days ago this site is the best
@Swoozeki how far along are you?
and i mean 3 hours on one of the days not each day
disjfa
@disjfa
Feb 17 2016 23:42 UTC
i heard it on the changelog podcast this week, so couple of hours now :+1:
Pauline
@chumswap
Feb 17 2016 23:42 UTC
I agree I think this has been the best free resource I have found. I did a bunch on Odin Project first but then switched to FCC.
Caleb Martin
@caleb272
Feb 17 2016 23:44 UTC
ya i have been programming for 3 years but i needed to learn front and back end stuff so this is where i came
Sujit Karki
@Swoozeki
Feb 17 2016 23:53 UTC
definitely the best website I've come across in my whole search
I'm currently doing the weather project @caleb272
I have kind of put 60% of my eggs in FCC, so I do this very often
Caleb Martin
@caleb272
Feb 17 2016 23:55 UTC
ya are you in the states?
Sujit Karki
@Swoozeki
Feb 17 2016 23:55 UTC
well, in web development, I mean
Canada
Caleb Martin
@caleb272
Feb 17 2016 23:56 UTC
nice ya i have put all my web dev eggs in FCC too i stayed up all night doing last night
do you have stuff on your git
Zay
@incognitonerd
Feb 17 2016 23:57 UTC
im having a hard time addin FCC to my resume....god
Caleb Martin
@caleb272
Feb 17 2016 23:58 UTC
why is that^
Sujit Karki
@Swoozeki
Feb 17 2016 23:58 UTC
I have a private repo, but that's dedicated for school project _(ツ)_/¯
@incognitonerd what's up?
Caleb Martin
@caleb272
Feb 17 2016 23:59 UTC
Same i need to really start working on some opensource projects te build my resume
Zay
@incognitonerd
Feb 17 2016 23:59 UTC
i need an example of addin online courses to a resume
@Swoozeki i need an example of addin online courses to a resume