These are chat archives for FreeCodeCamp/HelpFrontEnd

1st
Apr 2017
Keon Samuel
@keonsam
Apr 01 2017 00:01
what's up with that html and script action?
just write pure JS
aRtoo
@artoodeeto
Apr 01 2017 00:03
@keonsam are you talking to me sir?? how??
how can i print a character on my website??
@keonsam using JS??
@keonsam or using console??
Keon Samuel
@keonsam
Apr 01 2017 00:05
what challenge you on?
Ben Line
@Benwebdev
Apr 01 2017 00:06
There is a typo in your code.
fisrtName should be firstName.
@artoodeeto
aRtoo
@artoodeeto
Apr 01 2017 00:15
@Benwebdev thank you :))
CamperBot
@camperbot
Apr 01 2017 00:15
artoodeeto sends brownie points to @benwebdev :sparkles: :thumbsup: :sparkles:
:cookie: 322 | @benwebdev |http://www.freecodecamp.com/benwebdev
Ben Line
@Benwebdev
Apr 01 2017 00:17
@artoodeeto no problem :)
Assuming you're hitting a mixed-content error or a navigator.geolocation error
Sam Griffen
@ssgriffen
Apr 01 2017 00:36

@artoodeeto do

console.log(lastLetter);

open up the browser console (ctr shift j) for chrome and run the pen

do that console.log in your script as the last line
Faddah Wolf
@faddah
Apr 01 2017 00:38
hello all - i need help with a couple things with my Portfolio page HTML project, at this codeine, here — http://codepen.io/faddah/pen/egVyrM?editors=1000 . the first issue i am having is down in the section for the portfolio panes itself. the first two, my “tribute page” and a “calculator” i am working on is fine, but a WordPress site I did in the third pane has the top corners of the iframed site bleeding over the frame. i’m not doing anything different there in HTML/CSS than the other two panes. can anyone tell me why this is going on and how to fix? i can’t seem to figure it out.
Gulsvi
@gulsvi
Apr 01 2017 00:39
@ssgriffen Nice work on the Tic Tac Toe. One bug I found is that I can click on the same square over and over.
Sam Griffen
@ssgriffen
Apr 01 2017 00:40
@SkyCoder01 Wait just in 1 player mode right?
I thought i fixed that for 2 player
Gulsvi
@gulsvi
Apr 01 2017 00:40
@ssgriffen I didn't try 2 player mode
Sam Griffen
@ssgriffen
Apr 01 2017 00:40
Ya try it real quick see if its fixed there
@SkyCoder01 I just need to add the same logic I think to one player mode
Gulsvi
@gulsvi
Apr 01 2017 00:41
@ssgriffen Yeah, I can't get the same letter to go twice in a row. Only the computer is cheating now :)
If the square isn't empty, return
Sam Griffen
@ssgriffen
Apr 01 2017 00:42
@SkyCoder01 okay hell ya. Just need to add in that logic.
@SkyCoder01 thanks for taking a look
CamperBot
@camperbot
Apr 01 2017 00:42
ssgriffen sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 798 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 01 2017 00:43
No problem :)
PedroCSilva
@PedroCSilva
Apr 01 2017 00:43
tips for solving the cors error when using api?
Gulsvi
@gulsvi
Apr 01 2017 00:49

@faddah Best I could do was to use overflow: hidden on the surrounding element around the iFrame. :/

.span4 {
  border-top-left-radius: 4rem;
  border-top-right-radius: 4rem;  
  overflow: hidden;
}

Not sure how the codepen ones are different.

@PedroCSilva It usually depends on the API - I think you said you were going to use Vue, maybe they also have some cross origin parameters that need to be used for their .get method? Like using dataType: 'jsonp' in ajax
Faddah Wolf
@faddah
Apr 01 2017 00:51
@SkyCoder01 - thank you, i will try that.
CamperBot
@camperbot
Apr 01 2017 00:51
faddah sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 799 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 01 2017 00:52
@faddah Well, don't thank me yet :) , it's not perfect, but maybe playing around with the border radius or putting another div outside of that one iFrame will get you closer.
CamperBot
@camperbot
Apr 01 2017 00:52
skycoder01 sends brownie points to @faddah :sparkles: :thumbsup: :sparkles:
:cookie: 123 | @faddah |http://www.freecodecamp.com/faddah
Gulsvi
@gulsvi
Apr 01 2017 00:52
lol cbot
Faddah Wolf
@faddah
Apr 01 2017 00:53
yeah, @camperbot is a little generous on the praise/brownie-points when you incl. ‘thank’ in the message, eh, @SkyCoder01 ?
Gulsvi
@gulsvi
Apr 01 2017 00:53
Well, give yourself a pat on the back, it's a nice portfolio :)
Chris
@omniprime
Apr 01 2017 00:55
Anyone have a second to confirm my suspicion that the Twitchtv JSON API will not get an error returned if a channel does not exist? I only get it to return the same thing as if the channel is offline. I also don't find any reference to an error in the documentation for the API call
Keon Samuel
@keonsam
Apr 01 2017 00:56
@SkyCoder01 you putting in work
Gulsvi
@gulsvi
Apr 01 2017 00:58
@omniprime You will get an error in the JSON for non-existent channels. Easy way to see is to call all three endpoints (users, channels, streams) with three different types of accounts (online, offline, non-existent) and compare.
@keonsam Learning a lot still
Keon Samuel
@keonsam
Apr 01 2017 00:59
you finish the front end?
Gulsvi
@gulsvi
Apr 01 2017 01:00
nah, think I'll wait for beta to finish now.
Doing codewars to get better at JS
Keon Samuel
@keonsam
Apr 01 2017 01:00
Cool
Chris
@omniprime
Apr 01 2017 01:01
@SkyCoder01 I'll give it another go. Thanks :smile:
CamperBot
@camperbot
Apr 01 2017 01:01
:cookie: 800 | @skycoder01 |http://www.freecodecamp.com/skycoder01
omniprime sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
Gulsvi
@gulsvi
Apr 01 2017 01:01
Might do the calculator this weekend though
@omniprime I had a hard time juggling all the different JSON responses at first, but as a hint, the error for non-existent accounts is hard to miss :)
Chris
@omniprime
Apr 01 2017 01:03
@SkyCoder01 I figured it would be when looking at the example returns. I just wanted to make sure that it does still happen. I'll find what I am missing soon enough.
how can i make it so the bar follows where the user is?
Chris
@omniprime
Apr 01 2017 01:05
@Carter4502 just to clarify. You want your menu bar to always stay on the top of the page?
Keon Samuel
@keonsam
Apr 01 2017 01:08
bro look up nav bar
Carter4502
@Carter4502
Apr 01 2017 01:09
nevermind got it
Faddah Wolf
@faddah
Apr 01 2017 01:10
@SkyCoder01 - that helped a bit with the third pane in my portfolio - it seems only the “hamburger” menu button at top now sticks out. i might just have to live with it. 4 or 5 more things to add/fix & i’m done.
Keon Samuel
@keonsam
Apr 01 2017 01:12
@Carter4502 you may want to look up nav bar
Pagnito
@Pagnito
Apr 01 2017 01:32
when u fried ur brain trying to solve a problem, then walk away for a little but, come back still fried and just try random shit with less than half effort of putting thought into ur logic and ur code works...lol
PedroCSilva
@PedroCSilva
Apr 01 2017 01:32
hahah
buiphuking
@buiphuking
Apr 01 2017 02:28
hi guys, i have 2 questions,
  1. plz tell me meaning of min-width ... something to do with responsive ?
  2. i have a psd file, and i want to use the color with rgba parameter, how can i do that? cuz i can't see opacity parameter, i use cs6,
    plz help me
Pagnito
@Pagnito
Apr 01 2017 02:46
hey so i checked my wiki viewer on my phone and i noticed when i pressed enter, they keyboard didnt dissapear. anyone know if there is a method or a function to do that, ima google it right now, ill proly have the answer soon, but still i thought its a good thing to bring up
Gulsvi
@gulsvi
Apr 01 2017 03:01
You probably already found it, but .blur() seems to do it: http://stackoverflow.com/questions/4810984/hide-the-ipad-keyboard-by-hitting-the-return-key
Tom
@moT01
Apr 01 2017 03:04
@buiphuking min-width (minimum-width) means whatever it's applied to will have that width at least
the fourth number in rgba is the opacity
the first three are the amount of primary colors
for example... in css rgba would look like... background-color: rgba(255,255,255, 0.5);
0.5 opacity
Pagnito
@Pagnito
Apr 01 2017 03:14
hey i was trying to go on https//:codepen.io but i couldnt. i was trying to see my weather app since it was https api
on my phine
phone
i can do on laptop but not my phone
Gulsvi
@gulsvi
Apr 01 2017 03:16
maybe location is blocked on your phone?
Chaz
@Chrljnsn
Apr 01 2017 03:57
hi guys, im mega stuck on creating a random quote generator, cant get my quote button to bring the quotes from js to html. Can you help if i post my coding please :)
<p></p>
<button id= "new"><a target = "_blank" on.click= "document.getElementById("newQuote")"> New Quote</a> <script src=javascript.jc ></script></button>
document.getElementById("newQuote").onclick = doFunction;
function newQuote(){
var randomNumber = Math.floor(Math.random()* (quotes.length));
h1tag
@h1tag
Apr 01 2017 04:02
@Chrljnsn can you provide a link to the pen?
Chaz
@Chrljnsn
Apr 01 2017 04:02
yeah sure
ive googled and googled for days and tried all sorts of things but im obviously missing something
h1tag
@h1tag
Apr 01 2017 04:08
<button id= "new"><a target = "_blank" on.click= "document.getElementById("newQuote")"> New Quote</a> <script src=javascript.jc ></script></button>
what is this?
why are you nesting all of this in your button
Chaz
@Chrljnsn
Apr 01 2017 04:09
i was going of what people hasve said on stack overflow i think its called
to try and get the button to link to my function
Gregory Garzon
@chibieee
Apr 01 2017 04:12
@Chrljnsn your onclick should point to a defined function
h1tag
@h1tag
Apr 01 2017 04:12
@Chrljnsn <button id="new" onclick = "newQuote()"> New Quote </button>
and remove the listener from you js code but keep the function definition of newQuote()
cause you were like using two listeners or two onclick's, and I don't think it's right to link the js file in your button and you certainly don't need an anchor element in your button (redundant)
Chaz
@Chrljnsn
Apr 01 2017 04:18
ok thank you, lets hope i get this right now then :+1:
Doni Yafi
@yafiwebdev
Apr 01 2017 04:18
hey guys, check this website http://www.campoallecomete.it/#!/de do you know what technologies it takes to make something like this?
h1tag
@h1tag
Apr 01 2017 04:18
@Chrljnsn note: this will only generate a random number
Chaz
@Chrljnsn
Apr 01 2017 04:19
i noticed that before, i need to figure out how to link it to the quotes array, ill get it
Swekyde
@Swekyde
Apr 01 2017 04:19
I'm pretty much at my wit's end on the Weather App, my JSON call starts with "https://crossorigin.me/http://api.openweathermap.org..." more or less the same as it did in the quote generator. But on the Weather App, my browser gives me this in the console: "[CodePen] was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.openweathermap.org..."
h1tag
@h1tag
Apr 01 2017 04:20
@Swekyde read about the mixed content error
Swekyde
@Swekyde
Apr 01 2017 04:20
I know it's a mixed content error, but it's saying I'm making a request to a different URL than I supplied
And the quote generator didn't have this problem
h1tag
@h1tag
Apr 01 2017 04:21
it's treating it like http
Swekyde
@Swekyde
Apr 01 2017 04:21
I see, I'm trying to figure out why it's doing that
h1tag
@h1tag
Apr 01 2017 04:21
because it still has one in the URL
Swekyde
@Swekyde
Apr 01 2017 04:22
But the quote generator doesn't do that, and it's request is structured the same way
h1tag
@h1tag
Apr 01 2017 04:23
@Swekyde can you link to your random quote project?
I had been quite frustrated with that one because I'd accidentally removed a '?' from the request URL and couldn't for the life of me figure out why it wasn't working until I compared the string with a different successful request =\
'$.getJSON("https://crossorigin.me/http://api.forismatic.com...' worked once, I'm just not sure why it's not working again, unless I have a fundamental misunderstanding of how to get JSON from an external source (which is probably true, I probably don't correctly understand it yet)
h1tag
@h1tag
Apr 01 2017 04:37
@Swekyde are you using Bootstrap 4 intentionally?
Swekyde
@Swekyde
Apr 01 2017 04:39
Probably not, it's just what the pen defaulted to when I added it
h1tag
@h1tag
Apr 01 2017 04:39
because you're getting this error Uncaught Error: Bootstrap tooltips require Tether
and this happens in bs4
Swekyde
@Swekyde
Apr 01 2017 04:40
That's not the point, I'm pretty sure I don't even use any Bootstrap elements
I could just remove Bootstrap from my stuff and clean up any of the references that I don't actually need
What I don't get is a mixed content error, but I do on my other page
h1tag
@h1tag
Apr 01 2017 04:42
I'm not getting the mixed content error at all
GET https://crossorigin.me/http://api.openweathermap.org/data/2.5/weather?lat=31.9525753&lon=35.839919&APPID=a49d908431ca055f1ea42082886c88aa net::ERR_CONNECTION_RESET
I'm getting this one
You don't need crossorigin with openweather
Swekyde
@Swekyde
Apr 01 2017 04:44
My page didn't seem to work if the codepen isn't loaded on https
h1tag
@h1tag
Apr 01 2017 04:44
yea, that's the mixed content error, the crossorigin error is a different one
Swekyde
@Swekyde
Apr 01 2017 04:45
But why do I get a mixed content error on my weather page but not on my quote page?
h1tag
@h1tag
Apr 01 2017 04:45
if you you're not getting a crossorigin error, you don't need it
Swekyde
@Swekyde
Apr 01 2017 04:45
I should get it on both or neither from what my understanding tells me
h1tag
@h1tag
Apr 01 2017 04:45
because they're different apis
Swekyde
@Swekyde
Apr 01 2017 04:46
Okay, I thought that would have something to do with it but I have no idea how to check for sure
h1tag
@h1tag
Apr 01 2017 04:46
they use different rules for how to use their api
Swekyde
@Swekyde
Apr 01 2017 04:47
Then how do I address the mixed content error? My codepen doesn't seem to try to do anything on http which would let me talk to the weather api, but on https it won't be able to because that's mixed content
h1tag
@h1tag
Apr 01 2017 04:49
and the page has to be loaded over https because you're using geoloaction see this, which leads to the mixed content error, because openweather doesn't use https, so it won't work over https
Swekyde
@Swekyde
Apr 01 2017 04:49
I mean, I know why it doesn't really work because I can't get the lat/long unless I'm on https
h1tag
@h1tag
Apr 01 2017 04:51
so, you either use a different weather api that works over https or a different location api that works over http
Pagnito
@Pagnito
Apr 01 2017 05:07
k so in case anyone was wondering, if u wanna hide the keyboard on mobile after you hit submit, enter w/e event, you basically have to take focus off of the input which automatically closes the soft keyboard. you just type in $('input).blur(); which is the opposite of .focus() and takes focus off of an element
after function call of course
Swekyde
@Swekyde
Apr 01 2017 05:23
@fortMaximus Got it working since I finally managed to find a free way to figure out where the user is without https
Richard Andreasen
@Richand83
Apr 01 2017 05:59
hey all can i have a second pair of eyes on this i'm trying to get my jquery code to scroll to an id when i target my href"#" http://codepen.io/Richand83/pen/evMMYg
maybe i just have a typo somewhere but this should be working i think?
:P
h1tag
@h1tag
Apr 01 2017 06:05
@Richand83 no, you have to use your own eyes
Richard Andreasen
@Richand83
Apr 01 2017 06:05
:'(
kirbyedy
@kirbyedy
Apr 01 2017 06:07
@Richand83 you are naming your sections with sectionone sectiontwo, yet your buttons are pointing to portfolio,...
@Richand83 the easiest would be to add ids to your div classes, for example you have sectiontwo, so just add an id="portfolio" to it
Richard Andreasen
@Richand83
Apr 01 2017 06:10
i have the id portfolio to the h1 element you think that would make a difference if i moved it to the div?
kirbyedy
@kirbyedy
Apr 01 2017 06:11
obviously that does not work :D
Richard Andreasen
@Richand83
Apr 01 2017 06:11
lol i mean it just snaps to it i'm wishing to animate and scroll to it :/
Brian
@jelloneck
Apr 01 2017 06:12
Completed the tribute project. http://codepen.io/jelloneck/pen/ryoXra
kirbyedy
@kirbyedy
Apr 01 2017 06:12
@Richand83 scrolling can be done with offset top
or scrollspy in bootstrap I think
Richard Andreasen
@Richand83
Apr 01 2017 06:13
here's what i have

$(document).ready(function(){
$('a[href^=#"]').on('click',function(e) {
e.prevention();
var target = this.hash;
var $target = $(target);

  $('html, body').animate({
    'scrolltop': $target.offset().top
  }, 1000, 'swing', function() {
    window.location.hash = target;
  });
});

});

also working example
Richard Andreasen
@Richand83
Apr 01 2017 06:15
by all means i think this should be selecting the href dead link and scrolling to my id
thanks i'm going to read those
kirbyedy
@kirbyedy
Apr 01 2017 06:16
I mean I could give you the already finish working code, but you will just copy paste and wont learn anything :)
Richard Andreasen
@Richand83
Apr 01 2017 06:16
@kirbyedy exactly i don't want that i've learned so much more concepts by reading articles
Alex Johnson
@alxmjo
Apr 01 2017 06:16
I'm working on the random quote machine page. Using a button to grab a quote is working fine: http://codepen.io/alxmjo/pen/zZyRON
Does anyone know how I can run the same code on page load so a quote is visible as soon as page loads?
Richard Andreasen
@Richand83
Apr 01 2017 06:16
i finally understand margin border and padding
kirbyedy
@kirbyedy
Apr 01 2017 06:21
@alxmjo maybe with iife ?
Alex Johnson
@alxmjo
Apr 01 2017 06:24
Thanks. I'll look into that.
Nitin Chandran Nair
@NitinNair89
Apr 01 2017 06:25
@alxmjo Run the quote on document ready
Swagnik Dutta
@swagnikdutta
Apr 01 2017 06:37
I have 2 same glyphicons . One is obeying the css specifications while the other is not. other one is appearing enlarged. Can't figure out
what can be the reason
Benjamin Hike
@BenJess
Apr 01 2017 06:42

can anyone tell me what's wrong with my array iteration? $(document).ready(function() {

var channels = ["freecodecamp", "brunofin", "OgamingSC2"],
i = 0;

$(document).on('click', '#cycle', function() {
if (i < channels.length) {
channels.length = i++;
}
else {
i = 0;
}
});

Suraj Regmi
@Suraj1127
Apr 01 2017 06:50
Guys, how can I represent space characters like " ", " ", " ", etc as a whole? Do you have any idea?
I should be able to represent " ", " ", " ", by one thing.
How can I do that?
Geoffrey Lai
@azngeoffdog
Apr 01 2017 07:02
@Suraj1127 you may be referring to printing raw strings: see here
kirbyedy
@kirbyedy
Apr 01 2017 07:32
@BenJess what is your if statement suppose to do?
Michael Bomholt
@bomholtm
Apr 01 2017 07:37
Does anyone know how to make the outer circle (of fccs pomodoro) completely clickable? I'm talking about the parts under the inner circle divs corners
SaiChand Duppala
@saichandd
Apr 01 2017 07:41
Hey all, Are the numbers below treated as numbers or strings?
[["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.10]];
Jim Tryon
@jimtryon
Apr 01 2017 07:45
@theNuclearman Numbers, your strings would be the key
SaiChand Duppala
@saichandd
Apr 01 2017 07:47
@jimtryon Hey thanks, I have a problem with my code, just look at the first few lines and the console result
function checkCashRegister(price, cash, cid) {
  var change = [];
  var due = Number(cash - price).toFixed(2);
  var cashLeft = remainingMoney(cid);

  console.log(cashLeft, due, cashLeft < due);

  if(cashLeft < due){
      console.log("Insufficient Funds DAFAQ");
      return "Insufficient Funds";
  }

//number of significant digits is different so .. .. . ..
  if(cashLeft === due){
      console.log(due);
      return "Closed";
  }

  console.log(change, due);
  due = getChange(change, due, cid, 100.00);
  console.log(change, due);

  due = getChange(change, due, cid, 20.00);
  console.log(change, due);

  due = getChange(change, due, cid, 10.00);
  console.log(change, due);

  due = getChange(change, due, cid, 5.00);
  console.log(change, due);

 due = getChange(change, due, cid, 1.00);
  console.log(change, due);

 due = getChange(change, due, cid, 0.25);
  console.log(change, due);

  due = getChange(change, due, cid, 0.10);
  console.log(change, due);

  due = getChange(change, due, cid, 0.05);

  due = getChange(change, due, cid, 0.01);

  console.log(change , due);

  if(due === 0){
      return change;
  }
  return "Insufficient Funds"
}

function getChange(change, due, cid, currency){
    var key = getKey(currency);
    if(due >= currency && Object.values(cid[key])[1] >= due){
        var counter = 0;
        while(due >= currency && Object.values(cid[key])[1] >= due){
            due -= currency;
            Object.values(cid[key])[1] -= currency;
            counter++;
        }
        pushIt(counter, change, key);
    }
    console.log(due);
    return due;
}

function getKey(currency){
    var key;
    if(currency === 100.00)
        key = 8;
    else if(currency === 20.00)
        key = 7;
    else if(currency === 10.00)
        key = 6;
    else if(currency === 5.00)
        key = 5;
    else if(currency === 1.00)
        key = 4;
    else if(currency === 0.25)
        key = 3;
    else if(currency === 0.10)
        key = 2;
    else if(currency === 0.05)
        key = 1;
    else if(currency === 0.01)
        key = 0;
    else
        return "something is wrong";

    return key;
}

function pushIt(counter, change, key){
    if(key === 8)
        change.push(["ONE HUNDRED", 100.00 * counter]);
    else if(key === 7)
        change.push(["TWENTY", 20.00 * counter]);
    else if(key === 6)
        change.push(["TEN", 10.00 * counter]);
    else if(key === 5)
        change.push(["FIVE", 5.00 * counter]);
    else if(key === 4)
        change.push(["ONE", 1.00 * counter]);
    else if(key === 3)
        change.push(["QUARTER", 0.25 * counter]);
    else if(key === 2)
        change.push(["DIME", 0.10 * counter]);
    else if(key === 1)
        change.push(["NICKEL", 0.05 * counter]);
    else if(key === 0)
        change.push(["PENNY", 0.01 * counter]);
    else
        return "something is wrong";
}


function remainingMoney(cid){
    var remaining = 0;
    for(var i = 0; i< cid.length; i++){
        remaining += Object.values(cid[i])[1];
    }
    return Number(remaining).toFixed(2);
}

checkCashRegister(3.26, 100.00, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.10], ["QUARTER", 4.25], ["ONE", 90.00], ["FIVE", 55.00], ["TEN", 20.00], ["TWENTY", 60.00], ["ONE HUNDRED", 100.00]]);
CamperBot
@camperbot
Apr 01 2017 07:47
thenuclearman sends brownie points to @jimtryon :sparkles: :thumbsup: :sparkles:
:cookie: 91 | @jimtryon |http://www.freecodecamp.com/jimtryon
SaiChand Duppala
@saichandd
Apr 01 2017 07:49
can you please take a look at it
it returning true for 335.41 < 96.74
mrdang
@khacquyetdang
Apr 01 2017 07:49
Hi everyone, i'm on the calculator project. Could you please help me to solve this problem (0.2*3).toString() = 0.600000000000000000000001. I don't want to use Number.toFixed(length) because for another compute, the decimal part may be variable
PhilipGossmann
@PhilipGossmann
Apr 01 2017 07:55
Hi guys, sorry this is a rookie question but I am now getting so frustrated with this and have no more idea. I have problems to get padding and margin correct. It seems to me I use them to often and the elements influence each other and then nothing works. I am right now in the second project and want to build this menu. I was able to place the logo correctly and now I am not able to move the class .topmenu into the right position and i am as well not able to even move the seperate menu times away from each other
Thanks a lot and hope this mistake is not too obvious
mrdang
@khacquyetdang
Apr 01 2017 07:58
hello @PhilipGossmann i cannot see your page
PhilipGossmann
@PhilipGossmann
Apr 01 2017 08:00
weird I see the embedded Pen. Do I need to activate something?
mrdang
@khacquyetdang
Apr 01 2017 08:04
The owner of this Pen needs to verify their email address to enable Full Page View.
PhilipGossmann
@PhilipGossmann
Apr 01 2017 08:07
oh sorry activated it
now it should work
mrdang
@khacquyetdang
Apr 01 2017 08:17
you forgot something
instead of class="topmenu" you write class"topmenu"
PhilipGossmann
@PhilipGossmann
Apr 01 2017 08:22
switched but still its not moving
mrdang
@khacquyetdang
Apr 01 2017 08:22
then in topmenu you can do something like float: right
it sould work
PhilipGossmann
@PhilipGossmann
Apr 01 2017 08:22
nice float:right did the job
Thanks a lot @khacquyetdang
CamperBot
@camperbot
Apr 01 2017 08:23
philipgossmann sends brownie points to @khacquyetdang :sparkles: :thumbsup: :sparkles:
:cookie: 218 | @khacquyetdang |http://www.freecodecamp.com/khacquyetdang
mrdang
@khacquyetdang
Apr 01 2017 08:24
glad to help @PhilipGossmann
Kavindra Nikhurpa
@kavi-nikhurpa
Apr 01 2017 08:34
Hi, anyone online?
mrdang
@khacquyetdang
Apr 01 2017 08:37
yep
Tanushree Samanta
@TSamanta
Apr 01 2017 09:17
hi! can we learn REST api without knowing javasript?
I am new to this so I just wanted to ask
mrdang
@khacquyetdang
Apr 01 2017 09:30
hi, i'm just finish the calculator project, could you give feedback: http://codepen.io/MrDang/pen/aJXbqX
V Arun Kumar
@arunvkumr
Apr 01 2017 09:36
hey guys, i just completed the quotes project, have a look and share your feedbacks and concerns about the page. i decided to keep the page as simple as possible so didn't do much on design, if you have any design idea let me know thanks :smile: https://codepen.io/arunkumrv/full/YZJpwb/
@khacquyetdang looks good :+1: , the buttons are too big i think and for fraction numbers like 7.5 or so i have to scroll to reach the .(dot) and again scroll back up to the display to see the result. it would be nice to have everything on the screen imo. Only onscreen buttons are working, keyboard buttons are not working.
AbradolfLinclr
@AbradolfLinclr
Apr 01 2017 09:46
@arunvkumr hey man how did you get a quote to show right when you open? Im having difficulty figuring it out
V Arun Kumar
@arunvkumr
Apr 01 2017 09:48
@AbradolfLinclr i used setTimeout function and trigger function. when the page loads, the setTimeout function is called which triggers a click to the newquote button, it's like a virtual click to the new quote button when page loads
AbradolfLinclr
@AbradolfLinclr
Apr 01 2017 09:49
so it gives you an instant click. cool man, ill do some research on that , thanks!
V Arun Kumar
@arunvkumr
Apr 01 2017 09:50
@AbradolfLinclr you're welcome. :+1:
Keon Samuel
@keonsam
Apr 01 2017 10:07
who is the great programmer of all time?
greatest
meeee
Jaynil Patel
@jaynilpatel97
Apr 01 2017 10:40
@arunvkumr hey i cannot open twitter to share the quote .Can you please look at my code->http://codepen.io/jaynilpatel97/pen/MpQvQR?editors=1011
mrdang
@khacquyetdang
Apr 01 2017 10:42
@arunvkumr thank you
CamperBot
@camperbot
Apr 01 2017 10:42
khacquyetdang sends brownie points to @arunvkumr :sparkles: :thumbsup: :sparkles:
:cookie: 573 | @arunvkumr |http://www.freecodecamp.com/arunvkumr
V Arun Kumar
@arunvkumr
Apr 01 2017 10:42
@jaynilpatel97 what is openURL? where is the defination of that function i cant find it. is it a inbuilt function?
@khacquyetdang you're welcome :+1:
Jaynil Patel
@jaynilpatel97
Apr 01 2017 10:46
@arunvkumr thanks mate.It should be just open instead openURL.It works now.
CamperBot
@camperbot
Apr 01 2017 10:46
jaynilpatel97 sends brownie points to @arunvkumr :sparkles: :thumbsup: :sparkles:
:cookie: 574 | @arunvkumr |http://www.freecodecamp.com/arunvkumr
Keon Samuel
@keonsam
Apr 01 2017 11:14
put the icon in an <a> element
TarasKharkhalis
@TarasKharkhalis
Apr 01 2017 11:56
'GET http://s.codepen.io/boomerang/iFrameKey-ae762f43-c51f-b9b5-3fcb-e410857b9f3…2.5/weather?lat=49.8383&lon=24.0232&APPID=a0b2a5f52d9b9680499f69ea1fb91507 404 (Not Found)'
I`m currently making a weather API and i keep getting this error while i push the button which fires a getJSON jQuery.
Keon Samuel
@keonsam
Apr 01 2017 12:04
give me the link to your codepen
agbaje michael olugbenga
@AgbajeMike
Apr 01 2017 12:22
how do I start creating my portifolio
Roxroy
@roxroy
Apr 01 2017 12:28
@AgbajeMike , take a look at some example ones and come up with your own design. Then add your the content. I had to do it several times until I got one that I liked.
Gulsvi
@gulsvi
Apr 01 2017 12:45
@TarasKharkhalis Just a few issues. Add http:// in front of your API URL and move your closing brackets on line 8 to the end of your code. Use your browser's developer/debug console to see the errors to fix after that (Ctrl + Shift + J), should be easier to identify.
rfvergeldedios
@rfvergeldedios
Apr 01 2017 12:47
Finally done with the weather app. Instead of the temperature, I used openweathermap's icon codes to determine which background will load. http://codepen.io/RafaelVD/pen/evbgOM
Roxroy
@roxroy
Apr 01 2017 12:53
@rfvergeldedios , nice. Shows my correct location and temp. Good job.
Gulsvi
@gulsvi
Apr 01 2017 13:04
@rfvergeldedios Nice work. You might want to add some more code comments, indent your code, and clean up unused code. For example:

.button-section button {




}

    //alert("Where: "+city+", "+country);
    //alert("Temp: "+temp);
    //alert("Climate: "+climate+": "+clouds);
    //alert("Wind Speed: "+wind);
Ken Haduch
@khaduch
Apr 01 2017 13:05
@rfvergeldedios - looks good on mobile phone
Gulsvi
@gulsvi
Apr 01 2017 13:05
Also, your background image isn't quite full screen - check out this article to help with it: https://css-tricks.com/perfect-full-page-background-image/
PedroCSilva
@PedroCSilva
Apr 01 2017 13:12
Hi everyone! Need inspiration for the design of the random quote app
PedroCSilva
@PedroCSilva
Apr 01 2017 13:17
Anyone? :P @SkyCoder01 ?
Gulsvi
@gulsvi
Apr 01 2017 13:20
@PedroCSilva Ahh, so Axios was the way to do JSONP in Vue? It is inspiring to see something other than jQuery :)
PedroCSilva
@PedroCSilva
Apr 01 2017 13:21
in Vue2 its one of the ways, yes
not JSONP but ajax calls
JSONP is another issue :D
Gulsvi
@gulsvi
Apr 01 2017 13:22
Oh lol, I didn't see the proxy :)
PedroCSilva
@PedroCSilva
Apr 01 2017 13:23
I'd like to try a cool design but I'm lacking ideas :D
Gulsvi
@gulsvi
Apr 01 2017 13:23
Hmmm, I'll have to think of some ideas to give you. On my first cup of coffee right now and still waking up :laughing:
PedroCSilva
@PedroCSilva
Apr 01 2017 13:23
Hahah
I'm gonna get an expresso as well, that's a good idea already! :D
Keon Samuel
@keonsam
Apr 01 2017 13:43
this wiki thing sounds hard
what you guys used to display all that result? a for loops?
PedroCSilva
@PedroCSilva
Apr 01 2017 13:46
with jQuery yes
Dany Din
@danydin
Apr 01 2017 13:47
hey, how to add class through js
Keon Samuel
@keonsam
Apr 01 2017 13:47
addClass
Dany Din
@danydin
Apr 01 2017 13:50
not working
@keonsam
var button = document.createElement('button');
button.textContent = 'Delete';
button.id = i;
button.addClass = 'delete';
all working except class
:o:
Keon Samuel
@keonsam
Apr 01 2017 13:51
oh
that JS
jquery I meant
Dany Din
@danydin
Apr 01 2017 13:52
witohut jquery
Atanas Kolev Beychev
@morfeibox
Apr 01 2017 13:53
@morfeibox
Hello Everyone, i need help. The issue is that i can't take the nescessary data from this object. I can't access the
desired . title
http://www.clipular.com/c/4960348965961728.png?k=iQ47A-xlf4m-OL7H6lpVBBxTwBw
can sombody help me with the "path"
Dany Din
@danydin
Apr 01 2017 13:55
@keonsam got it className
Keon Samuel
@keonsam
Apr 01 2017 13:55
cool
h1tag
@h1tag
Apr 01 2017 13:59
@morfeibox can you show me how did you try to access it?
Dany Din
@danydin
Apr 01 2017 13:59
@morfeibox also its not full maybe there is an array at the beginning or sometihng it may change everything
Atanas Kolev Beychev
@morfeibox
Apr 01 2017 14:00
var forcastDay1 =json.forcast[0].title;
a access freely the "current_observation" by 'var feelsLikeC= json.current_observation.feelslike_c;" for example
Dany Din
@danydin
Apr 01 2017 14:02
@morfeibox try
var forcastDay1 =json.forcast.forecastday[0].title;
HasaMatej
@HasaMatej
Apr 01 2017 14:03
have a problem with codepen editor.. i coded good looking page (project) in sublime text.. then i inserted it into codepen and the layout is different... dunno why, bootstrap is on :worried:
Keon Samuel
@keonsam
Apr 01 2017 14:06
I am guessing the search bar on the freecodecamp Wikipedia Viewer is jquery?
the effects are done with jquery
h1tag
@h1tag
Apr 01 2017 14:08
@HasaMatej check the Bs version that you added on Codepen
PedroCSilva
@PedroCSilva
Apr 01 2017 14:09
angularjs
alpox
@alpox
Apr 01 2017 14:12
@keonsam The effects are done with mainly css only
(SCSS)
HasaMatej
@HasaMatej
Apr 01 2017 14:13
@fortMaximus there is only 4.0 version avalible... in sublime i insered 3.3.7 version
Keon Samuel
@keonsam
Apr 01 2017 14:13
css can do that search bar?
PedroCSilva
@PedroCSilva
Apr 01 2017 14:13
what do you mean by search bar?
h1tag
@h1tag
Apr 01 2017 14:13
@HasaMatej you can add it manually, without using quick add. Just copy version 3 CDN link into the CSS settings
Keon Samuel
@keonsam
Apr 01 2017 14:13
the big search icon thing
right below the click for random search
Nazar
@IsaakNazar
Apr 01 2017 14:14
whats up guys, need some JS help
Keon Samuel
@keonsam
Apr 01 2017 14:15
what kind of help you need?
Nazar
@IsaakNazar
Apr 01 2017 14:15
how to adda and b using sum() function?
var calculator = {
  read: function(){
    var a = prompt('a?', '');
    var b = prompt('b?', '');    
  }
  sum: function(a, b){
    return this.a + this.b;
  }

}
calculator.read();
alert( calculator.sum() );
Nitin Chandran Nair
@NitinNair89
Apr 01 2017 14:17
I think you should declare your variables outside the read function
alpox
@alpox
Apr 01 2017 14:17
@keonsam yes, together with some javascript
Keon Samuel
@keonsam
Apr 01 2017 14:19
@alpox cool I found a webpage that explain it, thanks.
CamperBot
@camperbot
Apr 01 2017 14:19
keonsam sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 898 | @alpox |http://www.freecodecamp.com/alpox
agbaje michael olugbenga
@AgbajeMike
Apr 01 2017 14:20
Roxroy. OK l'll so that
HasaMatej
@HasaMatej
Apr 01 2017 14:20
@fortMaximus thank you bro
CamperBot
@camperbot
Apr 01 2017 14:20
hasamatej sends brownie points to @fortmaximus :sparkles: :thumbsup: :sparkles:
:cookie: 685 | @fortmaximus |http://www.freecodecamp.com/fortmaximus
Nazar
@IsaakNazar
Apr 01 2017 14:22
@NitinNair89
var calculator = {
var a,b;
  read: function(){
     a = prompt('a?', '');
     b = prompt('b?', '');    
  }
  sum: function(){
    return a + b;
  }

}
calculator.read();
alert( calculator.sum() );
didnt work
Nitin Chandran Nair
@NitinNair89
Apr 01 2017 14:22
Yes @IsaakNazar
Nazar
@IsaakNazar
Apr 01 2017 14:22
Uncaught SyntaxError: Unexpected identifier
alpox
@alpox
Apr 01 2017 14:23
@IsaakNazar it looks a bit like you'd better make use of javascript prototyping there
Benjamin Hike
@BenJess
Apr 01 2017 14:24

@kirbyedy It's just supposed to iterate through the array and then assign it to a string. like this. $(document).ready(function() {

var channels = ["freecodecamp", "brunofin", "OgamingSC2"],
i = 0;

$(document).on('click', '#cycle', function() {
if (i < channels.length) {
channels.length = i++;
}
else {
i = 0;
}
});

$.getJSON('https://wind-bow.glitch.me/twitch-api/channels/' + channels[i] + '?callback=?',
function(data) {

  if
alpox
@alpox
Apr 01 2017 14:26
@IsaakNazar
function calculator() { }

calculator.prototype = {
  read: function(){
     this.a = parseInt(prompt('a?', ''));
     this.b = parseInt(prompt('b?', ''));    
  },
  sum: function(){
    return this.a + this.b;
  }
}

var calcInstance = new calculator();
calcInstance.read();
alert(calcInstance.sum());
Gulsvi
@gulsvi
Apr 01 2017 14:27
image.png
@PedroCSilva How about something like this? With the WikiQuotes API, I'm guessing you could get images
Nitin Chandran Nair
@NitinNair89
Apr 01 2017 14:27
@alpox Why close the function braces { } in the start itself?
Nazar
@IsaakNazar
Apr 01 2017 14:27
@alpox great :+1:
@alpox but the task is:
Read () prompts two values and stores them as object properties
Sum () returns the sum of these two values
Mul () returns the product of these two values
Moisés Man
@moigithub
Apr 01 2017 14:28
@NitinNair89 cuz its a empty constructor
and he attaching methods after using prototype
Nazar
@IsaakNazar
Apr 01 2017 14:28
var calculator = {
  ...code..
}

calculator.read();
alert( calculator.sum() );
alert( calculator.mul() );
so I need a code only in the calculator
alpox
@alpox
Apr 01 2017 14:29
@IsaakNazar Ah okay if its specified like this :D
Nazar
@IsaakNazar
Apr 01 2017 14:29
@alpox thx anyway
CamperBot
@camperbot
Apr 01 2017 14:29
isaaknazar sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 899 | @alpox |http://www.freecodecamp.com/alpox
Keon Samuel
@keonsam
Apr 01 2017 14:29
I have no limit.
alpox
@alpox
Apr 01 2017 14:30
@IsaakNazar Then just go like:
var calculator = {
  read: function() {
    this.a = <prompt>;
    this.b = <prompt>;
  },
  sum: function() {
    return this.a + this.b;
  }
}
@NitinNair89 What do you mean by that?
Atanas Kolev Beychev
@morfeibox
Apr 01 2017 14:31
@danydin it is working in this format ' json.forecast.txt_forecast.forecastday[0].title; ' Thanks for the path !!!
CamperBot
@camperbot
Apr 01 2017 14:31
morfeibox sends brownie points to @danydin :sparkles: :thumbsup: :sparkles:
:cookie: 343 | @danydin |http://www.freecodecamp.com/danydin
Dany Din
@danydin
Apr 01 2017 14:31
glad to hear that keep it up! @morfeibox
Nazar
@IsaakNazar
Apr 01 2017 14:33
@alpox :+1:
KatSaldivar
@KatSaldivar
Apr 01 2017 14:47
Screen Shot 2017-04-01 at 7.46.21 AM.png
Any ideas why my search bar won't center in mobile? https://codepen.io/KatSaldivar/pen/ZeRqBV
nvm
Gulsvi
@gulsvi
Apr 01 2017 14:52
@KatSaldivar Your .outer class is 1000px wide and you have your input centered inside of that
Padding adds an extra 100px to that
KatSaldivar
@KatSaldivar
Apr 01 2017 14:53
@SkyCoder01 thanks. I think I might have fixed it. I had my search term set to 1000px and I changed it to 700px and now it looks better.
CamperBot
@camperbot
Apr 01 2017 14:53
katsaldivar sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 806 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 01 2017 14:55
@KatSaldivar Replace your .outer class CSS with this:
body {
  margin-top: 100px;
}
.outer{
  text-align: center;
}
#searchterm definitely needs a smaller width on mobile though - 600px is wider than most mobile devices. You can use vw units to specify a percentage of the viewport width
KatSaldivar
@KatSaldivar
Apr 01 2017 14:56
@SkyCoder01 ooooh! thats so cool. Thanks!
CamperBot
@camperbot
Apr 01 2017 14:56
katsaldivar sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: katsaldivar already gave skycoder01 points
KatSaldivar
@KatSaldivar
Apr 01 2017 15:04
@SkyCoder01 Thats so so neat! Thank you for teaching me. :)
CamperBot
@camperbot
Apr 01 2017 15:04
katsaldivar sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: katsaldivar already gave skycoder01 points
KatSaldivar
@KatSaldivar
Apr 01 2017 15:06
maybe its just me, but do you happen to know why my buttons look slightly lower than the search bar?
PedroCSilva
@PedroCSilva
Apr 01 2017 15:10
@SkyCoder01 wow :o amazing
Keon Samuel
@keonsam
Apr 01 2017 15:11
what is cool?
alpox
@alpox
Apr 01 2017 15:16
@KatSaldivar
.inner {
    text-align: center;
    font-size: 24pt;
    display: inline-block;
}
KatSaldivar
@KatSaldivar
Apr 01 2017 15:18
@alpox so I only need to make the font bigger?
@KatSaldivar oh, duh. the buttons need to match the size of the search bar. Thanks!
CamperBot
@camperbot
Apr 01 2017 15:20
sorry katsaldivar, you can't send brownie points to yourself! :sparkles: :sparkles:
KatSaldivar
@KatSaldivar
Apr 01 2017 15:20
@alpox thakns
@alpox apparently I'm struggling today. THANK YOU!
CamperBot
@camperbot
Apr 01 2017 15:20
:cookie: 900 | @alpox |http://www.freecodecamp.com/alpox
katsaldivar sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
Keon Samuel
@keonsam
Apr 01 2017 15:29
still can't figure out this search icon
Swagnik Dutta
@swagnikdutta
Apr 01 2017 15:38
please look at the experience section in this template
how to create such a thing? any resources?
the timeline kind of thing..
Keon Samuel
@keonsam
Apr 01 2017 15:41
web development for the win.
great design though
robobertk
@robobertk
Apr 01 2017 15:47
tribute page troubles, how in the world do I submit my codepen?
Geoffrey Lai
@azngeoffdog
Apr 01 2017 15:48
there'll be an address of your codepen, send that link here
Gulsvi
@gulsvi
Apr 01 2017 15:50
@keonsam Use a click function to hide the icon when you click on it, append an <input> element to the page, and then use .animate() to change the width of your <input>.
Keon Samuel
@keonsam
Apr 01 2017 15:51
yes that what I was thinking
tpondant
@tpondant
Apr 01 2017 15:51
Hello everyone.
Gulsvi
@gulsvi
Apr 01 2017 15:52
hello @tpondant
tpondant
@tpondant
Apr 01 2017 15:52
I am doing the Show Local Weather challenge but the data does not change on the page
This is my javascript so far:
//http://api.openweathermap.org/data/2.5/weather?q=Brussels&APPID=6678c26ac96965ad2a21b906dec9632e
$(document).ready(function() {
$.getJSON("http://api.openweathermap.org/data/2.5/weather?q=Brussels&APPID=6678c26ac96965ad2a21b906dec9632e", function(json) {
var html = "";
html += "<div>" + json["coords"] + "</div>";
})
$("#box").html(html);
})
Gulsvi
@gulsvi
Apr 01 2017 15:53
@tpondant Are there any errors in your browser's debug console?
V Arun Kumar
@arunvkumr
Apr 01 2017 15:53
Hey guys, i'm working on weather project and i would like to know if you guys are seeing your location or not, just let me know whatever you see. https://codepen.io/arunkumrv/full/oZmXWq/
tpondant
@tpondant
Apr 01 2017 15:53
I'll check this right now
@SkyCoder01 It says that my html is not defined
Gulsvi
@gulsvi
Apr 01 2017 15:54
@tpondant This line needs to inside your getJSON function: $("#box").html(html);
@arunvkumr Yep, location looks good
h1tag
@h1tag
Apr 01 2017 15:55
@SkyCoder01 Have you seen this ... this is awsome
KatSaldivar
@KatSaldivar
Apr 01 2017 15:56
@arunvkumr its kinda close. it is choosing a location thats 10 miles awayfrom me
Gulsvi
@gulsvi
Apr 01 2017 15:56
@fortMaximus Lol, yes, I shared it earlier on HelpJavaScript and fooled some people :laughing:
V Arun Kumar
@arunvkumr
Apr 01 2017 15:56
@SkyCoder01 thanks.
CamperBot
@camperbot
Apr 01 2017 15:56
:cookie: 807 | @skycoder01 |http://www.freecodecamp.com/skycoder01
arunvkumr sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
Gulsvi
@gulsvi
Apr 01 2017 15:57
@fortMaximus j.a.va.scr.ip.t = b.e.s.t. l.angu.age.ever
h1tag
@h1tag
Apr 01 2017 15:57
:joy:
V Arun Kumar
@arunvkumr
Apr 01 2017 15:57
@KatSaldivar hmm, it's using ip as of now, i will switch to geolocation for more accurate details. thanks for the info :smile:
CamperBot
@camperbot
Apr 01 2017 15:57
arunvkumr sends brownie points to @katsaldivar :sparkles: :thumbsup: :sparkles:
:cookie: 273 | @katsaldivar |http://www.freecodecamp.com/katsaldivar
Gulsvi
@gulsvi
Apr 01 2017 15:57
Google Maps is pacman today too lol
Geoffrey Lai
@azngeoffdog
Apr 01 2017 15:57
especially fun on iconic maps
like the high five interchange
h1tag
@h1tag
Apr 01 2017 16:00
Google wind is gonna be the next big thing
Keon Samuel
@keonsam
Apr 01 2017 16:02
why is js the best language?]
tpondant
@tpondant
Apr 01 2017 16:02
@SkyCoder01 ok I've done that but now I still cannot see the city's coordinates in my HTML element
Geoffrey Lai
@azngeoffdog
Apr 01 2017 16:02
that sounds quite ridiculous how it says it's powered by the cloud :p
alpox
@alpox
Apr 01 2017 16:02
@keonsam Its really not :D
Geoffrey Lai
@azngeoffdog
Apr 01 2017 16:03
coz it's one of the only full stack languages to learn
Gulsvi
@gulsvi
Apr 01 2017 16:03
@tpondant Small typo: json["coord"] not "coords"
You will need to JSON.stringify() the value to show it in your HTML though
  $.getJSON("http://api.openweathermap.org/data/2.5/weather?q=Brussels&APPID=6678c26ac96965ad2a21b906dec9632e", function(json) {
    $("#box").html("<div>" + JSON.stringify(json["coord"]) + "</div>");
  });
@keonsam That was a joke if you watch the April Fools video about ES 2018
It claims all brackets, braces, and parentheses can be replaced by dots
tpondant
@tpondant
Apr 01 2017 16:10
@SkyCoder01 Thank you for your patience by the way!
CamperBot
@camperbot
Apr 01 2017 16:10
tpondant sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 808 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 01 2017 16:10
No problem! Good luck with the weather app
tpondant
@tpondant
Apr 01 2017 16:10

@SkyCoder01 $("#box").html("<div>" + JSON.stringify(json["coord"]) + "</div>");
});

});
this is the end of my js

why is it still not working then? did I miss something?
Gulsvi
@gulsvi
Apr 01 2017 16:12

@tpondant All of your JS should look like:

$(document).ready(function() {
  $.getJSON("http://api.openweathermap.org/data/2.5/weather?q=Brussels&APPID=6678c26ac96965ad2a21b906dec9632e", function(json) {
    $("#box").html("<div>" + JSON.stringify(json["coord"]) + "</div>");
  });
});

And your HTML needs an element with id="box", like <div id="box"></div>

Spyrantis Theodoros
@thodorisanta
Apr 01 2017 16:13
im working on the twitch api project. is it wrong to have two $.getJSON('https://wind-bow.gomix.me/twitch-api/streams/ESL_SC2?callback=?', function(data) {...... }; getJSON calls one inside the other exactly similar with this?
$.getJSON('https://wind-bow.gomix.me/twitch-api/streams/ESL_SC2?callback=?', function(data) { ............ ............ $.getJSON('https://wind-bow.gomix.me/twitch-api/streams/ESL_SC2?callback=?', function(data) { ............ ............ }; };
like i did in here:
http://codepen.io/oshikurou/pen/YZrqBy?editors=0111
tpondant
@tpondant
Apr 01 2017 16:16
@SkyCoder01 yes it does, I've even copied your javascript to be sure I did not miss something, there must be a problem in my HTML. Yet the box id is there:
<body>
<h1>
freeCodeCamp
</h1>
<h2>
Local Weather App
</h2>
<br><br>
<div>
<div><img alt="icon"></div>
</img>
<div id="temp">62 F°</div>
</div>
<br><br>
<div>
<div id="box">
Alameda, California
</div>
<br>
<div id="box">
sky is clear
</div>
<br>
<div id='box' class="wind">
SW 7.67 knots
</div>
</div>
<div id="text"></div>
</body>
Gulsvi
@gulsvi
Apr 01 2017 16:16
@tpondant Do you have a codepen you can share? I can take a closer look
tpondant
@tpondant
Apr 01 2017 16:16
@SkyCoder01 yes I'll send it to you
Gulsvi
@gulsvi
Apr 01 2017 16:18
@tpondant A couple of issues - IDs need to be unique. Only one div can have id="box".
And, you need to open your codepen over HTTP. Open Weather Map doesn't support HTTPS unless you pay them money.
Open it with this link and you'll see it working: http://codepen.io/TomPo03/pen/dvwVvj?editors=1010
danalogue
@danalogue
Apr 01 2017 16:21
I'm having real trouble getting the NavBar Highlight to move when scrolling through my page. Can anyone help?https://codepen.io/danalogue/pen/oZpeLz
V Arun Kumar
@arunvkumr
Apr 01 2017 16:21
@KatSaldivar i switched to geolocation, can you check again and see if the location is of your city.
https://codepen.io/arunkumrv/full/oZmXWq/
tpondant
@tpondant
Apr 01 2017 16:22
@SkyCoder01 Thanks again! You helped a lot, I understand it much better now :)
CamperBot
@camperbot
Apr 01 2017 16:22
tpondant sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: tpondant already gave skycoder01 points
Gulsvi
@gulsvi
Apr 01 2017 16:22
Happy to help!
V Arun Kumar
@arunvkumr
Apr 01 2017 16:23
@SkyCoder01 can you check my weather proj and see if it shows your location, i switched from ip to geolocation.
Gulsvi
@gulsvi
Apr 01 2017 16:24
@arunvkumr Sure
@arunvkumr Looks great - nice work!
V Arun Kumar
@arunvkumr
Apr 01 2017 16:25
@SkyCoder01 thanks :smile:
CamperBot
@camperbot
Apr 01 2017 16:25
arunvkumr sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: arunvkumr already gave skycoder01 points
Gulsvi
@gulsvi
Apr 01 2017 16:27
@thodorisanta Yeah, that works fine as far as I know. It's how I did it:
$.getJSON(url1, url1Data => {
  $.getJSON(url2, url2Data => {

  // now url1Data and url2Data can be used below

    if (/* test if not existent or closed */) {
      // process non-existent / closed channels
    } else if (/* test if offline */) {
      // process offline channels
    } else {
      // process online channels
    }

  }).fail(errorHandler);
}).fail(errorHandler);
Nazar
@IsaakNazar
Apr 01 2017 16:27
any hints, how to implement it?
sum(1)(2) == 3; // 1 + 2
sum(1)(2)(3) == 6; // 1 + 2 + 3
sum(5)(-1)(2) == 6
sum(6)(-1)(-2)(-3) == 0
sum(0)(1)(2)(3)(4)(5) == 15
alpox
@alpox
Apr 01 2017 16:30
@IsaakNazar return functions from functions ;-)
Anastasios
@BarousAnastasios
Apr 01 2017 16:34
how do i post code here?
Nazar
@IsaakNazar
Apr 01 2017 16:35

@alpox

function sum(a) {

  return function(b) {
    return a + b; 
  };

}

only with two numbers

Ivan Gonzalo Bonfigli
@IvanBonfigli
Apr 01 2017 16:36
hey guys, how can i do a banner with no margin?
i made a <header id="banner" class="navbar navbar-default navbar-fixed-top"></header>
but it steel has a margin
respect the body
Anastasios
@BarousAnastasios
Apr 01 2017 16:38
im stuck for like more than 5 weeks now in the "show the local weather app".Can anyone help?
Gulsvi
@gulsvi
Apr 01 2017 16:39
@danalogue Seems you're using a bootstrap 4 navbar with Bootstrap 3 CSS. Maybe this example on using scroll spy will help you get it set up better, it uses Bootstrap 3 CSS.
http://codepen.io/skycoder/pen/KaYQoQ?editors=0110
danalogue
@danalogue
Apr 01 2017 16:41
@SkyCoder01 Cheers. I thought I got rid of all the BS4 references. I'll look into it again.
Anastasios
@BarousAnastasios
Apr 01 2017 16:41
code camp's lessons on introduction to json handling with js is really unefficient i have zero clue on how to get json data from api through url and then display the data in my html
Ivan Gonzalo Bonfigli
@IvanBonfigli
Apr 01 2017 16:42
@SkyCoder01 thanks
CamperBot
@camperbot
Apr 01 2017 16:42
ivanbonfigli sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 809 | @skycoder01 |http://www.freecodecamp.com/skycoder01
alpox
@alpox
Apr 01 2017 16:42
@IsaakNazar Hmm yes i guess you'd run into troubles with making the thing you showed because a return value cannot be both: A number and a function
Gulsvi
@gulsvi
Apr 01 2017 16:45
@IvanBonfigli Oh maybe I helped on accident lol, but usually you can set body margin to 0 to fix that.
body {
  margin: 0;
}
Or include reset.css or normalize.css in your project
Anastasios
@BarousAnastasios
Apr 01 2017 16:48
code
Gulsvi
@gulsvi
Apr 01 2017 16:49
@BarousAnastasios The profile lookup challenge was a good example of teaching us how to get data from a JSON object: https://www.freecodecamp.com/challenges/profile-lookup
V Arun Kumar
@arunvkumr
Apr 01 2017 16:52
@BarousAnastasios not only profile-lookup, there are lessons especially for retrieving json data. you should revisit those lessons.
https://www.freecodecamp.com/challenges/get-json-with-the-jquery-getjson-method
https://www.freecodecamp.com/challenges/convert-json-data-to-html
https://www.freecodecamp.com/challenges/get-geolocation-data (for weather project)
Gulsvi
@gulsvi
Apr 01 2017 16:53
^^ good examples too
Anastasios
@BarousAnastasios
Apr 01 2017 16:54
the problem is those examples use internal json data, the app demands data from api through url
how can i send my code here so people can take a look?
Gulsvi
@gulsvi
Apr 01 2017 16:55
@BarousAnastasios You can send the link to your codepen here - just copy/paste from your browser's address bar
getJSON, ajax, etc. all give you JSON data stored in a variable. It can be treated the same as in those challenges:
$.getJSON(url, function(data) {
  console.log(data) // this data can now be treated as internal json data assigned to the 'data' variable
});
V Arun Kumar
@arunvkumr
Apr 01 2017 16:56
@BarousAnastasios if you are working on codepen, just paste the link of your pen.
for js use thiis format
```js
paste your code here.
```
Gulsvi
@gulsvi
Apr 01 2017 16:59
@BarousAnastasios are you using chrome by chance?
Anastasios
@BarousAnastasios
Apr 01 2017 16:59
yes chrome
V Arun Kumar
@arunvkumr
Apr 01 2017 16:59
@BarousAnastasios where are you callling the success function? navigator.geolocation.getCurrentPosition(success)
Anastasios
@BarousAnastasios
Apr 01 2017 16:59
at the bottom of the javascript file?
Gulsvi
@gulsvi
Apr 01 2017 17:00
Chrome requires navigator.geolocation to use HTTPS, but OpenWeatherMap only supports HTTP. I wrote a post with more info because lots of people run into this problem: http://codepen.io/skycoder/post/apisandlocation
V Arun Kumar
@arunvkumr
Apr 01 2017 17:01
@BarousAnastasios oh i see.. i didn't see there..
Gulsvi
@gulsvi
Apr 01 2017 17:02
Also, you're going to need an API key to call your API and the URL has to start with HTTP:// or HTTPS://
Gulsvi
@gulsvi
Apr 01 2017 17:06
@BarousAnastasios Yes, that's a start, but you should also have a API key added to that url
But it won't work either way if you use navigator.geolocation... Best to use a different location API or a different weather API that supports HTTPS
Anastasios
@BarousAnastasios
Apr 01 2017 17:07
okay thanks
V Arun Kumar
@arunvkumr
Apr 01 2017 17:08
http://api.openweather.~ or api.openweather.~ aren't both the same? @SkyCoder01
Gulsvi
@gulsvi
Apr 01 2017 17:08
@arunvkumr When you use the URL with getJSON, it has to start with http:// or it won't work
Try it in your weather app and remove the https:// you have in front of api.wunderground.com/api and you'll get a 404 error in your console
V Arun Kumar
@arunvkumr
Apr 01 2017 17:12
@SkyCoder01 yea because its not in https://, if i remove https:// it becomes a normal http:// request. the error i'm getting is this
blob
Gulsvi
@gulsvi
Apr 01 2017 17:15
That's different - that error comes from navigator.geolocation when the URL in your browser's address bar starts with HTTP://
Your getJSON URL has to start with either HTTP:// or HTTPS:// (if it supports both)
Keon Samuel
@keonsam
Apr 01 2017 17:16
are front end people called web designer?
Gulsvi
@gulsvi
Apr 01 2017 17:16
Design and Development are two different things, but they can be done by the same person
V Arun Kumar
@arunvkumr
Apr 01 2017 17:17
@keonsam designer is the one who is more involved in editing images and making layout, wireframes and etc. and developers are the one's who actually code the design.
Keon Samuel
@keonsam
Apr 01 2017 17:18
cool
V Arun Kumar
@arunvkumr
Apr 01 2017 17:20
@SkyCoder01 hmm, i'm still confused how getJSON only takes http://api.~ not api.~ as both are same. i will do some research on this. you have any good reference for this topic?
Gulsvi
@gulsvi
Apr 01 2017 17:22
@arunvkumr It's just your browser is smarter than getJSON - it assumes that if you don't add "http://" you meant to. With getJSON, it just gives an error because it needs to know if you mean 'http://' or 'file://', 'ftp://' etc.
I don't have any good reference - just from trial and error in my own code unfortunately
Keon Samuel
@keonsam
Apr 01 2017 17:50
Sky can you fadein a bunch of html code?
nvm
append
Keon Samuel
@keonsam
Apr 01 2017 18:01
hot
Simon Miller
@simonmillerr
Apr 01 2017 18:07
Why is my weather var not working??!!!
Keon Samuel
@keonsam
Apr 01 2017 18:14
probably out of scope
console log it to see the value
greggy
@glonsdale
Apr 01 2017 18:15
hi guys
Ivan Gonzalo Bonfigli
@IvanBonfigli
Apr 01 2017 18:15
how can i do to resize a .btn?
greggy
@glonsdale
Apr 01 2017 18:15
if anyone has a minute to peruse my code i think i have a scope problem
i have a couple statements trying to get location for my weather app
they work inside their respective loops but when i use the vars later they are undefined and zero

$(document).ready(function(){
//data vars

var lat, lon = 0;
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
lat = position.coords.latitude;
lon = position.coords.longitude;
console.log(lat);//works over https
console.log(lon);//works over https
})
}

console.log(lat);// always undefined
console.log(lon);// always 0

my other statement is for http using ipinfo, still working on that one so its not shown
Gulsvi
@gulsvi
Apr 01 2017 18:18
@IvanBonfigli
.btn {
  width: 100px;
}
@glonsdale With navigator.geolocation, the location data is only available inside function(position). If you want to use it elsewhere, you have to pass the position data to another function
greggy
@glonsdale
Apr 01 2017 18:20
i tried having function(position) be a separate function which returned the values
is that a possible solution also?
Gulsvi
@gulsvi
Apr 01 2017 18:21
@glonsdale It would look like this:
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(function(position) {
      var lat = position.coords.latitude;
      var lon = position.coords.longitude;
      console.log(lat); //works over https
      console.log(lon); //works over https
      logThePosition(lat, lon);
    })
  }

  function logThePosition(lat, lon) {
    console.log(lat);  // here you'll get it logged again correctly
    console.log(lon);
  }
greggy
@glonsdale
Apr 01 2017 18:21
it didnt seem to work
Nitin Chandran Nair
@NitinNair89
Apr 01 2017 18:22
Hello, I need some help with SVG
Ivan Gonzalo Bonfigli
@IvanBonfigli
Apr 01 2017 18:22
@SkyCoder01 thanks again!
Keon Samuel
@keonsam
Apr 01 2017 18:22
bro look up promises
Gulsvi
@gulsvi
Apr 01 2017 18:22
@glonsdale This also works:
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(success, fail)
}

function success(position) {
  var lat = position.coords.latitude;
  var lon = position.coords.longitude;
  console.log(lat); //works over https
  console.log(lon); //works over https
  logThePosition(lat, lon);
}

function logThePosition(lat, lon) {
  console.log(lat);
  console.log(lon);
}
Nitin Chandran Nair
@NitinNair89
Apr 01 2017 18:22
My pen works fine in Edge browser but looks like shi*t in others. Can anyone help?
greggy
@glonsdale
Apr 01 2017 18:24
thanks for the help @SkyCoder01
CamperBot
@camperbot
Apr 01 2017 18:24
glonsdale sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 810 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 01 2017 18:24
@glonsdale no problem! Just tried the code above and it works for me - (in the second example, the fail function needs to be there though)
greggy
@glonsdale
Apr 01 2017 18:25
what would an example of a fail function be in this instance @SkyCoder01
Gulsvi
@gulsvi
Apr 01 2017 18:26
function fail(err) {
  console.log(err)
}
@glonsdale
Or, this is a more robust overall solution for getting location (IMO): http://codepen.io/skycoder/post/apisandlocation#sample-code-5
Akheloes
@Akheloes
Apr 01 2017 18:45
hey guys! does the .getJSON and .ajax work fine for you on codepen ?
Leafie Tutoring
@www-leafie-io
Apr 01 2017 18:48
@Akheloes I think .getJSON is a jquery function so you would need to have jquery imported for it to work
Akheloes
@Akheloes
Apr 01 2017 18:49
Hey @www-leafie-io ! I did that, my worry is that there should be some problem with the GET protocol
Leafie Tutoring
@www-leafie-io
Apr 01 2017 18:49
@Akheloes how do you mean there should be some problem
Akheloes
@Akheloes
Apr 01 2017 18:51
@www-leafie-io : I guess codepen doesn't communicate the get messages or something of that sort
could that be possible ?
Leafie Tutoring
@www-leafie-io
Apr 01 2017 18:53
@Akheloes you can get json in codepen
@Akheloes All of those api challenges from the front end section can be done in codepen
Keon Samuel
@keonsam
Apr 01 2017 18:55

$(document).ready(function(){
 $("#icon1").on("click", function(){
   $("#icon1").fadeOut(0);
   $(".searchBar").append('<form><input type="text" name="search" placeholder="Search  Wikipedia Viewer" /><a href="#"><i class="fa fa-times-circle" aria-hidden="true" id="cancel"></i></a></form>');
 });
  //icon1 ends
  // start of the cancel icon function
  $("#cancel").on("click", function(){
    $("#cancel").fadeOut(0);


  });
  //end of cancel
});
//end of document ready
the second fadeOut not working.
alpox
@alpox
Apr 01 2017 18:57
@Akheloes You can post the url to your pen here so we can help
Akheloes
@Akheloes
Apr 01 2017 19:01
alpox
@alpox
Apr 01 2017 19:02
@Akheloes you cannot use the geolocation service together with the openweather api. Either choose another weather service or another ip location service
Akheloes
@Akheloes
Apr 01 2017 19:04
@alpox : mkay, on there documentation though they seem to permit the use of location by lon/lat coordinates, is it the accuracy that's offsetting the openweather api in particular ?
Ivan Gonzalo Bonfigli
@IvanBonfigli
Apr 01 2017 19:06
why i cant move these to the right?
<div class="row" id="navi">
<div class="col-md-1" id="aboutbtn">
<a href="#" class="btn btn-block">About</a>
</div>
<div class="col-md-1" id="portfoliobtn">
<a href="#" class="btn btn-block">Portfolio</a>
</div>
<div class="col-md-1">
<a href="#" class="btn btn-block" id="contactbtn">contact</a>
</div>
</div>
alpox
@alpox
Apr 01 2017 19:06
@Akheloes Not at all.
Chrome doesn't allow the use of the geolocation service without a https connection. Therefore you have to access the codepen by https to use it.
BUT: If you use codepen in https mode, you are only allowed to call services by https (The openweather api as example)
BUT: The openweather api offers no free plan for the access through https
CONCLUSION: They don't work together for you
@Akheloes Most people use either: http://ip-api.com/docs/api:json or https://ipinfo.io/developers#jsonp-requests for getting the location data
@Akheloes You might be interested to read this section: https://ipinfo.io/developers/replacing-getcurrentposition
Akheloes
@Akheloes
Apr 01 2017 19:10
@alpox : alright !
Keon Samuel
@keonsam
Apr 01 2017 19:11
alpox why my second fadeout not working?
Akheloes
@Akheloes
Apr 01 2017 19:11
@alpox : let me try that and thanks a bunch !
CamperBot
@camperbot
Apr 01 2017 19:11
akheloes sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 901 | @alpox |http://www.freecodecamp.com/alpox
alpox
@alpox
Apr 01 2017 19:16
@keonsam Thats because at the time you want to add the event handler to the cancel button, this button does not exist yet. You have to add the click event at the time of creation.
Keon Samuel
@keonsam
Apr 01 2017 19:17
oh
alpox
@alpox
Apr 01 2017 19:17

@keonsam

$(document).ready(function(){
 $("#icon1").on("click", function(){
   $("#icon1").fadeOut(0);
   $(".searchBar").append('<form><input type="text" name="search" placeholder="Search  Wikipedia Viewer" /><a href="#"><i class="fa fa-times-circle" aria-hidden="true" id="cancel"></i></a></form>');

   $("#cancel").on("click", function(){
    $("#cancel").fadeOut(0);
  });
 });
});

Like this, the cancel event can do something

Keon Samuel
@keonsam
Apr 01 2017 19:18
@alpox i see thanks
CamperBot
@camperbot
Apr 01 2017 19:18
:cookie: 902 | @alpox |http://www.freecodecamp.com/alpox
keonsam sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
Keon Samuel
@keonsam
Apr 01 2017 19:27
that works
Ivan Gonzalo Bonfigli
@IvanBonfigli
Apr 01 2017 19:31
why i cant move the nav buttons to the right?
<div id="banner" class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="col-md-2">
<a id="brand" class="btn btn-block navbar-brand" href="#">Ivan Bonfigli</a>
</div>
<div class="row">
<a href="#" class="btn btn-block">About</a>
<a href="#" class="btn btn-block">Portfolio</a>
<a href="#" class="btn btn-block" id="contactbtn">contact</a>
</div>
</div>
Mostafa Masri
@thefakeweed
Apr 01 2017 19:37
hey guys can you please help me ? im trying to do a responsive color grid system
Keon Samuel
@keonsam
Apr 01 2017 19:38
what help you need?
Mostafa Masri
@thefakeweed
Apr 01 2017 19:40
for some reason boxes 2 are not next to each other
thats my code
neither boxes 3
Gulsvi
@gulsvi
Apr 01 2017 19:42
.box2 {
    width: 25%;
    height: 100px;
    background-color: hotpink;
}
(25% * 4 = 100%)
Mostafa Masri
@thefakeweed
Apr 01 2017 19:42
oh
@SkyCoder01 thank you so much ! how can i make it responsive now ?
CamperBot
@camperbot
Apr 01 2017 19:44
mml3b sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 813 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Mostafa Masri
@thefakeweed
Apr 01 2017 19:44
i want to use media queries for that
István Kozma
@Manfred28
Apr 01 2017 19:45
could someone tell me why there is a white line between the two spans here? http://codepen.io/Manfred28/pen/zZeKJv
I cant figure it out for the life of me
Gulsvi
@gulsvi
Apr 01 2017 19:45
@mml3b Yeah, you have to use media queries now. You would add additional classes to each box that only work at specific breakpoints. Similar to what bootstrap does.
Keon Samuel
@keonsam
Apr 01 2017 19:46
try using margin
@Manfred28
István Kozma
@Manfred28
Apr 01 2017 19:46
err?
its not a margin
at least not a margin of the spans
okay
im retarded
new line in the html
Keon Samuel
@keonsam
Apr 01 2017 20:02
that is what programming is debugging
Sebastian
@sebgrebe
Apr 01 2017 20:02
Screen Shot 2017-04-01 at 21.00.41.png
^^Hi, I want Options(memory) to loop through the array memory and return an array of 9 variants of "memory" such that the first object is [1: 1, 2: undefined, 3: undefined, ...], the second object is [1: undefined, 2: 1, 3: undefined, ...], the third object is [1: undefined, 2: undefined, 3: 1, ...], etc. Instead, Options(memory} returns an array of 9 times the same object [1:1, 2:1, 3:1, 4:1,...] I don't understand what's going on. Any ideas?
Mostafa Masri
@thefakeweed
Apr 01 2017 20:11
hey i want to make the page responsive so that it be liek the second photo when i zoom out
i want to use media queries but it looks a lil bit complicated
BreJohn
@BreJohn
Apr 01 2017 20:18
can someone tell me why the collapse button doesn't work? I tried everything, I can't understand where is the problem site
Roxroy
@roxroy
Apr 01 2017 20:22
@BreJohn , you using bootstrap 4 alpha, try changing to bootstrap 3x for it to work.
Unknown
@Unknownhezipaz
Apr 01 2017 20:25

$User_FName = $_POST['U_fname'];
I want to know if the explanation below for the code above is right and if I can add to it

//superglobal variable captures the value passed by form and store in local variable it is created when you use the post method in form to get the value that is entered in the form called u_fname.

BreJohn
@BreJohn
Apr 01 2017 20:32
@roxroy the really weird thing is that I tried using 3.3.7 and copied example code from the documentation pages and still it doesn't show anything when I press the button
Keon Samuel
@keonsam
Apr 01 2017 20:35
do I have to learn angularJS for the wikipedia viewer?
aRtoo
@artoodeeto
Apr 01 2017 20:36

hello guys. im doing fcc JS and im trying to display a character in my browser. and i saved the file as html should i saved it as JS??

heres the code btw: <!Doctype HTML>

<html>
<head>
<title>test
</title>
</head>
<body>

<script>
var text = "HelloWorld";
var lastLetter = text[text.length - 1];
console.log(text);
</script>

</body>
</html>

Keon Samuel
@keonsam
Apr 01 2017 20:37
what challenge you on?
aRtoo
@artoodeeto
Apr 01 2017 20:38
@keonsam at the moment 160. but im just trying to display it on my browser to practice
Roxroy
@roxroy
Apr 01 2017 20:39
@BreJohn , in any case stick with BS3 instread of the the alpha version of BS4. check the example and work back.
Dean Hawkins
@thawktrue
Apr 01 2017 20:39
I dont know where to start on my portfolio
Keon Samuel
@keonsam
Apr 01 2017 20:40
what's the name of the challenge?
Dean Hawkins
@thawktrue
Apr 01 2017 20:40
how do you get to scroll through? how do i separate pages but be on one page?
Keon Samuel
@keonsam
Apr 01 2017 20:40
start at the nav bar
Dean Hawkins
@thawktrue
Apr 01 2017 20:41
ok
Keon Samuel
@keonsam
Apr 01 2017 20:42
codepen is buggy
created 3 different pens of my Wikipedia Viewer .
Johnny
@jtan3
Apr 01 2017 20:47
@thawktrue you don't have enough on the page to be able to scroll through
Ben Line
@Benwebdev
Apr 01 2017 20:47
@artoodeeto I see the issue again 😏
aRtoo
@artoodeeto
Apr 01 2017 20:48
@Benwebdev yea. when i open the browser it displays the whole text not the last letter
@Benwebdev i got it bro. thanks
CamperBot
@camperbot
Apr 01 2017 20:50
artoodeeto sends brownie points to @benwebdev :sparkles: :thumbsup: :sparkles:
:cookie: 323 | @benwebdev |http://www.freecodecamp.com/benwebdev
Gulsvi
@gulsvi
Apr 01 2017 20:51
@BreJohn Bootstrap's collapse button requires bootstrap.js, which you have added, but bootstrap.js requires jQuery. Add jQuery to your project and make sure it is listed above bootstrap.js - then your collapse button will work.
Dean Hawkins
@thawktrue
Apr 01 2017 20:56
@jtan3 yes like i said scrolling through with the ability to click and go im working on the nav bar right now so
see if i cant break that lol
stevemax22
@stevemax22
Apr 01 2017 20:58
Can someone help me out moving my nav pills? Using nav pills on my Portfolio Webpage. I want to experiment with "pull-right" etc but it's not pulling?
Dean Hawkins
@thawktrue
Apr 01 2017 21:00
yep already broke it lol so why wont it go in a row?
nvmd
aRtoo
@artoodeeto
Apr 01 2017 21:08

hi guys. im on 162 of the fcc tutorial. i just want someone to explain the code here. of you can PM me please. i got the answer right but i dont know why am i correct.

heres the code: function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = "";
// Your code below this line

      result = myNoun + " " + myAdjective + " " + myVerb + " " + myAdverb; 

// Your code above this line
return result;
}

// Change the words here to test your function
wordBlanks("cat", "little", "hit", "slowly");

Keon Samuel
@keonsam
Apr 01 2017 21:09
put characters in those ""
Conrad Kay
@conradkay
Apr 01 2017 21:10
  $(".well: nth-child(2)").addClass("animated bounce");
  });
Keon Samuel
@keonsam
Apr 01 2017 21:10
.target
Conrad Kay
@conradkay
Apr 01 2017 21:10
do any of you know the issue of this code
what should it look like then?
Keon Samuel
@keonsam
Apr 01 2017 21:11
".target: etc
Conrad Kay
@conradkay
Apr 01 2017 21:11
how will the code know i am editing the items with a class of well though? @keonsam
Keon Samuel
@keonsam
Apr 01 2017 21:12
it target all the 2 child lol
since you only have 1 so
yeah
or something like that
Conrad Kay
@conradkay
Apr 01 2017 21:13
can you show me how you would solve this?
Keon Samuel
@keonsam
Apr 01 2017 21:13
didn't that solve it?
replace well with target.
Conrad Kay
@conradkay
Apr 01 2017 21:14
$(".target: nth-child(2)").addClass("animated bounce");
this is what i have now
stevemax22
@stevemax22
Apr 01 2017 21:14
Can someone tell me how to make the "pull-right" and "pull-left" work in nav pills? I can't get it to work. Here's what I have.
<div class= "container-fluid">
<ul class= "nav nav-pills">
<li>
<!-- work at spacing correctly !-->
<ul class="nav nav-pills">
<li class="active"><a href="#">Steve Max</a></li>
<li class="active"><a href="#">About</a></li>
<li class="active"><a href="#">Portfolio</a></li>
<li class="active"><a href="#">LinkedIn</a></li>
<li class="active"><a href="#">Contact Me</a></li>
</ul></div>
alpox
@alpox
Apr 01 2017 21:14
@conradkay no whitespace in there
Conrad Kay
@conradkay
Apr 01 2017 21:15
oh
now works
Deepan Udaiyar
@CodeToOvercome
Apr 01 2017 21:16
Hi guys, how do i get display in center using bootstrap .
I am working on tribute page project right now..
Keon Samuel
@keonsam
Apr 01 2017 21:17
what display?
Deepan Udaiyar
@CodeToOvercome
Apr 01 2017 21:17
displaying image in center of the page..
Keon Samuel
@keonsam
Apr 01 2017 21:17
try turning it to an inline element
stevemax22
@stevemax22
Apr 01 2017 21:17
@CodeToOvercome put it in a <div class="text-center"> image here </div>
Keon Samuel
@keonsam
Apr 01 2017 21:18
don't give answer
Deepan Udaiyar
@CodeToOvercome
Apr 01 2017 21:18
Ok let me give that a try..
@keonsam @stevemax22 that works..
Thank you..
Keon Samuel
@keonsam
Apr 01 2017 21:20
no problem
Conrad Kay
@conradkay
Apr 01 2017 21:22
$text-color: red;
  .blog-post h2 {
    color: $text-color;
  }
Keon Samuel
@keonsam
Apr 01 2017 21:23
what is that?
lol
Conrad Kay
@conradkay
Apr 01 2017 21:23
sass
Keon Samuel
@keonsam
Apr 01 2017 21:23
oh
why wont this go in a row ive put it in nav class in div class and in ul class what am i missing
Richard Andreasen
@Richand83
Apr 01 2017 21:31
you need to give it a position
@thawktrue .navbar a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
your css is showing as blank
you need to style it
anyone know of any articles explaining the concepts of scrolling to a div using jquery
Dean Hawkins
@thawktrue
Apr 01 2017 21:34
@Richand83 thanks i do ok with existing code its starting from scratch i really struggle with
CamperBot
@camperbot
Apr 01 2017 21:34
thawktrue sends brownie points to @richand83 :sparkles: :thumbsup: :sparkles:
:cookie: 128 | @richand83 |http://www.freecodecamp.com/richand83
Richard Andreasen
@Richand83
Apr 01 2017 21:34
having a hard time selecting my href anchors and animating the body doesn't seem to work with my code
@thawktrue lol i got ya it took me a long time to make mine
i'm trying to get the scrolling functionality to work right
Dean Hawkins
@thawktrue
Apr 01 2017 21:43

ul {
border: 1px solid #e7e7e7;
background-color: #f3f3f3;
list-style-type: none;
margin: 0;
padding: 0;
display: inline;
}

li a {
color: #666;
display: inline;
}

not working still
Keon Samuel
@keonsam
Apr 01 2017 21:46
is there any thing that can trigger some jquery when some press enter?
Gulsvi
@gulsvi
Apr 01 2017 21:48
@thawktrue Looks like you're using Bootstrap 3 HTML, but you have the Bootstrap 4 CSS loaded in your Codepen Settings. That's going to cause a lot of stuff to not work.
Unknown
@Unknownhezipaz
Apr 01 2017 21:48

$User_FName = $_POST['U_fname'];
I want to know if the explanation below for the code above is right and if I can add to it

//superglobal variable captures the value passed by form and store in local variable it is created when you use the post method in form to get the value that is entered in the form called u_fname.

Jake
@NeelDVirus
Apr 01 2017 21:49
a simple question. is "Node type" a type of "reference type" or it is just an instance of "Object Type"??
i am in great dilemma. please help
Keon Samuel
@keonsam
Apr 01 2017 21:50
what you on? the wiki app?
@majedmahmood27
Gulsvi
@gulsvi
Apr 01 2017 21:52
@Richand83 the this keyword will be helpful so it animates the specific anchor you've clicked rather than attempting to animate all of them at once.
Richard Andreasen
@Richand83
Apr 01 2017 21:52
var target = $(this).attr('href')
like that
Keon Samuel
@keonsam
Apr 01 2017 21:53
@SkyCoder01 do I have to learn angular for the wikipedia viewer?
Dean Hawkins
@thawktrue
Apr 01 2017 21:53
@SkyCoder01 oh thank you
CamperBot
@camperbot
Apr 01 2017 21:53
thawktrue sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 817 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 01 2017 21:53
@Richand83
$('a[href^="#"]').click(function()){
  $(this) // <--- that now refers the anchor you just clicked
Unknown
@Unknownhezipaz
Apr 01 2017 21:53
@keonsam nope this is just a question I wanted to ask
Muhammad Hasham
@MohammadHasham
Apr 01 2017 21:54
can i install wordpress customized wrbsite from localhost to cpanel of a proper web hosting?
Gulsvi
@gulsvi
Apr 01 2017 21:54
@keonsam No, you can do wikipedia with jQuery or pure javascript
Keon Samuel
@keonsam
Apr 01 2017 21:55
cool
Unknown
@Unknownhezipaz
Apr 01 2017 22:19
$SQL5="UPDATE orders SET orderTotal=".$total."
WHERE orderNo=".$latestorderNo;// this updates the total value of orderTotal column in order table
where the order No matches the order No of the order of the current user.
Conrad Kay
@conradkay
Apr 01 2017 22:24
does anyone know much sass
@each $color in blue, black, red {
    .#{$color}-bg {background-color: $color;}
  }
Mojammel
@MojammelW
Apr 01 2017 22:25
well im on the build portfolio page, but i have no idea how to make a site as good as the sample site they showed me, i dont know how to start it
Conrad Kay
@conradkay
Apr 01 2017 22:25
i am supposed to create a class with the color's name followed by -bg
then set the background color to that color
Mojammel
@MojammelW
Apr 01 2017 22:25
it looks harder than anything ive ever created before
how do i make it
Keon Samuel
@keonsam
Apr 01 2017 22:30
conradkey did you learn sass on this site?
Conrad Kay
@conradkay
Apr 01 2017 22:31
beta.freecodecamp.com
@MojammelW it shouldn't be as good as theirs
Keon Samuel
@keonsam
Apr 01 2017 22:31
cool
that might be a better example
Thecoward
@Thecoward
Apr 01 2017 22:36
Do I have to signup to Mashape in order to build the random quote generator?
Mikael Carlsson
@mmcarlsson
Apr 01 2017 23:13
@Thecoward see my answer to you in the help chat :)
stevemax22
@stevemax22
Apr 01 2017 23:15
I'm on Build a Personal Portfolio Webpage. Need help spacing elements from one another.
Mikael Carlsson
@mmcarlsson
Apr 01 2017 23:16
use css and margin :)
like
.classname {
margin-right: 10px;
}
stevemax22
@stevemax22
Apr 01 2017 23:17
The issue is I'm using nav-pills for links, and it has padding of its own which I don't want in the spacing between the pills and my h1
Mikael Carlsson
@mmcarlsson
Apr 01 2017 23:18
do you got your source code on like codepen or something so we can review it ? :)
stevemax22
@stevemax22
Apr 01 2017 23:18
Yep.
Keon Samuel
@keonsam
Apr 01 2017 23:20
lol
that an empty port bro
Mikael Carlsson
@mmcarlsson
Apr 01 2017 23:20
and what exactly do you need ? :)
stevemax22
@stevemax22
Apr 01 2017 23:20
huh? What did I do wrong. I'm a noob
Keon Samuel
@keonsam
Apr 01 2017 23:21
try to get everything on the example pen in terms of functionality.
Mikael Carlsson
@mmcarlsson
Apr 01 2017 23:22
The link works for me if i click it, what do you need help with @stevemax22
stevemax22
@stevemax22
Apr 01 2017 23:22
@mmcarlsson My top line, the nav-pills has a black background. I want to get my h1 element spaced well below my nav-pills.
Keon Samuel
@keonsam
Apr 01 2017 23:23
the wiki app is kicking my butt
Mikael Carlsson
@mmcarlsson
Apr 01 2017 23:23
do you want it in the same container as the links ? but on its own row?
stevemax22
@stevemax22
Apr 01 2017 23:24
Yes. I'm fine with my h1 having the links with it. So everything in the faded black box I want spaced below my nav-pills. So in other words, the containers not touching
@mmcarlsson would this have to do with the padding of those elements?
Promie Yutasane
@promie
Apr 01 2017 23:40
blob
Can someone please help on what am I trying to achieve here?
Roxroy
@roxroy
Apr 01 2017 23:48
@stevemax22 , you are try to put together a sentence but stringing the words together. In the process you have to add a word in between the ones given to you.
robobertk
@robobertk
Apr 01 2017 23:57
Looking at a video for the portfolio project and they tried using pull-right and this doesn't work on my code pen followed declarations I dentically
I can make it work in a <ul> but I don't want to waste space because of crap limitations