These are chat archives for FreeCodeCamp/HelpFrontEnd

10th
Jun 2016
Aata-allah
@Atalaa
Jun 10 2016 00:09
Hello guys, i searched on internet and i can't find the way to put Berry Chuck picture under Huey Lewis picture please
https://codepen.io/Atalaa/pen/ezpgzM?editors=1100
Eric Bezanson
@ericbezanson
Jun 10 2016 00:19
sorry which pictures are you trying to align?

if you are talking about the first picture not lining up with whats below it, I would use offest columns. you can find it in the bootstrap documentation it allows you to basically create fake columns for positioning .

if they are all in the same column you could add margins or padding to the img by asigning it an ID

Aata-allah
@Atalaa
Jun 10 2016 00:22
its ok bro i forget on closing div element
thank u anyways
Eric Bezanson
@ericbezanson
Jun 10 2016 00:25
np
Micah
@miciah123
Jun 10 2016 00:30
How do I put these three buttons in the same row using bootstrap grid system
Greg Duncan
@GregatGit
Jun 10 2016 00:35
@miciah123 you already have- change md to xs if you want them to always stay in the same row
Micah
@miciah123
Jun 10 2016 00:36
How come changing the size from md to xs made it work@GregatGit
?
Greg Duncan
@GregatGit
Jun 10 2016 00:39
@miciah123 the grid system has default values - so if your screen is lg - because there is not lg set it defaults to md - which you set
Micah
@miciah123
Jun 10 2016 00:39
@GregatGit thanks
CamperBot
@camperbot
Jun 10 2016 00:39
miciah123 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 573 | @gregatgit |http://www.freecodecamp.com/gregatgit
Greg Duncan
@GregatGit
Jun 10 2016 00:40
@miciah123 but because the smallest setting you put was md - when the screen got smaller than md it has a default setting of col-xs-12 which kicked in
@miciah123 because you're using code pen - cut and paste everything in the styles tag into the css tab
if you want to add any librarys or js using the setting button
Micah
@miciah123
Jun 10 2016 00:42
my screen goes white when I doe that @GregatGit
Greg Duncan
@GregatGit
Jun 10 2016 00:43
all the html is wrapped in the body tag
Greg Duncan
@GregatGit
Jun 10 2016 00:44
remove style
tags
Micah
@miciah123
Jun 10 2016 00:44
Oh okay that worked @GregatGit
thanks
@GregatGit
Greg Duncan
@GregatGit
Jun 10 2016 00:48
:+1:
Why does the computer start making such weird noises?
Kyle W Pilkinton
@tadake
Jun 10 2016 01:17
hey guys can anyone help me figure out how to make this responsive??
http://codepen.io/tadake/pen/gMadEz
@aryandua because you have an interval that plays the sound over and over every 300th of a second
Kyle W Pilkinton
@tadake
Jun 10 2016 01:37
thanks @jdtdesigns !
CamperBot
@camperbot
Jun 10 2016 01:37
tadake sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 454 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Jun 10 2016 01:37
welcome ;)
Ken Haduch
@khaduch
Jun 10 2016 01:40
@aryandua - probably the setInterval timer that you use is just repeating - it will never stop until you clear the interval timer.
Ethan Rose
@ethanrose
Jun 10 2016 01:42
hey y'all I've got a few (maybe dumb) questions.. I'm working on the "Random Quote Generator" project. I've finally got my API to work!!! yeheyy!! but now I'm trying to clean up my messy code
first is a jQuery question.. why doesn't this call back the function when I click my button?
$(".newQuoteBtn").on("click", pullUpQuote());
Kyle W Pilkinton
@tadake
Jun 10 2016 01:45
why not use .click? it should do the job your wanting. heres the docs https://api.jquery.com/click/ @aidansven
Ethan Rose
@ethanrose
Jun 10 2016 01:46
@tadake ah wow thanks! I didn't know that shortcut existed :) :) pleasant surprise haha!
CamperBot
@camperbot
Jun 10 2016 01:46
aidansven sends brownie points to @tadake :sparkles: :thumbsup: :sparkles:
:cookie: 399 | @tadake |http://www.freecodecamp.com/tadake
JD Tadlock
@jdtdesigns
Jun 10 2016 01:46
@aidansven it's fine to use .on(). Just call it like this instead .on('click', pullUpQuote);
Kyle W Pilkinton
@tadake
Jun 10 2016 01:46
welcome @aidansven
JD Tadlock
@jdtdesigns
Jun 10 2016 01:46
no parentheses after the function call
Ethan Rose
@ethanrose
Jun 10 2016 01:47
$(".newQuoteBtn").click(pullUpQuote);
ah ok ok
Aata-allah
@Atalaa
Jun 10 2016 01:49

I dont know why the Berry Chuk caption is a link target to youtube please help

https://codepen.io/Atalaa/pen/ezpgzM?editors=1000

Ethan Rose
@ethanrose
Jun 10 2016 01:49
ah awesome thanks
Kyle W Pilkinton
@tadake
Jun 10 2016 01:53
your missing a </a> tag @Atalaa
Aata-allah
@Atalaa
Jun 10 2016 01:54
@tadake where please
Kyle W Pilkinton
@tadake
Jun 10 2016 01:54
looks like its after where you added the youtube link. @Atalaa
yeah at the end of line 80
Aata-allah
@Atalaa
Jun 10 2016 01:55
@tadake oh great ! Thank you
CamperBot
@camperbot
Jun 10 2016 01:55
atalaa sends brownie points to @tadake :sparkles: :thumbsup: :sparkles:
:cookie: 400 | @tadake |http://www.freecodecamp.com/tadake
Aata-allah
@Atalaa
Jun 10 2016 01:55
@tadake do you know how to set the automatic indentation ?
Ethan Rose
@ethanrose
Jun 10 2016 01:56

Thanks to you too @jdtdesigns !!

now my other question is about the function itself

function pullUpQuote() {
  $.ajax({
    url: 'https://andruxnet-random-famous-quotes.p.mashape.com/?cat=famous',
    type: 'GET',
    data: {},
    dataType: 'json',
    success: function(data) {
      document.getElementById("quoteText").innerHTML = data.quote;
      document.getElementById("quoteAuthor").innerHTML = data.author;
    },
    error: function(err) {
      alert(err);
    },
    beforeSend: function(xhr) {
      xhr.setRequestHeader("X-Mashape-Authorization", "bDEv0VpVECmshUX66t2sGsVFSWu9p1056UNjsnQJsAJeqaqksI");
    }
  });
}
CamperBot
@camperbot
Jun 10 2016 01:56
aidansven sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 455 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Kyle W Pilkinton
@tadake
Jun 10 2016 01:56
your welcome !! @Atalaa back to the future is the best! keep up the good work! :+1:
Ethan Rose
@ethanrose
Jun 10 2016 01:56
do I have to call all of that every time I want to pull a new quote?
Kyle W Pilkinton
@tadake
Jun 10 2016 01:56
hmm im note sure @Atalaa
Ethan Rose
@ethanrose
Jun 10 2016 01:57
this is the code that I found from Mashape, to use the API
JD Tadlock
@jdtdesigns
Jun 10 2016 01:57
@aidansven to pull a single random quote, yes
Aata-allah
@Atalaa
Jun 10 2016 01:57
@tadake yes its my favorite movie im glad that you approve hahah
JD Tadlock
@jdtdesigns
Jun 10 2016 01:58
you can pull like 50 quotes and store them in an array and use that as your api for the app
@aidansven
Kyle W Pilkinton
@tadake
Jun 10 2016 01:58
1.21 gigawatts !!!! @Atalaa
Aata-allah
@Atalaa
Jun 10 2016 01:58
@tadake wow its heavy !
Ethan Rose
@ethanrose
Jun 10 2016 01:59
@jdtdesigns ok great thanks. so just to verify-- when I'm using the .click(function), all that code needs to be run again with every click?
CamperBot
@camperbot
Jun 10 2016 01:59
aidansven sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:warning: aidansven already gave jdtdesigns points
Ethan Rose
@ethanrose
Jun 10 2016 01:59
ohhhh! Is that better to store the quotes in an array?
JD Tadlock
@jdtdesigns
Jun 10 2016 02:00
@aidansven it depends on how much the api lets you pull data
if it limits you to a certain amout of queries then storing the quotes on one click and them using the array for getting a random one is a better idea
Ethan Rose
@ethanrose
Jun 10 2016 02:01
ahh ok ok .. makes sense :D
JD Tadlock
@jdtdesigns
Jun 10 2016 02:01
so basically when the app loads, you get a bunch of quotes from the api and store them in an array, then just use your click function to pull a random one from the array. ;)
Ethan Rose
@ethanrose
Jun 10 2016 02:02
fortunately (as far as I know) this API doesn't have a limit
JD Tadlock
@jdtdesigns
Jun 10 2016 02:02
usually not
and if they do it's way higher than we'll be using :P
Ethan Rose
@ethanrose
Jun 10 2016 02:02
haha true ;)
there's my project so far.. the twitter button isn't working yet
but the quotes are ;)
I was thinking I want to get the twitter and facebook buttons closer together, but they are where the bootstrap columns automatically put them
JD Tadlock
@jdtdesigns
Jun 10 2016 02:05
@aidansven that's what BS is
a strict prototyping framework
it's not great for custom design
Ethan Rose
@ethanrose
Jun 10 2016 02:06
ah ok ok , so float:left might be better?
JD Tadlock
@jdtdesigns
Jun 10 2016 02:06
never float lol
float is so 2000
Ethan Rose
@ethanrose
Jun 10 2016 02:06
ohh... haha
JD Tadlock
@jdtdesigns
Jun 10 2016 02:06
display: flex on the parent of the buttons
Ethan Rose
@ethanrose
Jun 10 2016 02:07
ah is that using flexbox then?
JD Tadlock
@jdtdesigns
Jun 10 2016 02:07
yes
i can do 10 things that make things fall beside each other
and all never use floats :P
Le Anh Duy (Andrew)
@leanhduy1998
Jun 10 2016 02:08
Hi guys, can you help me with the Arguments Optional bonfire? I don't know how to do the single argument part.
Ethan Rose
@ethanrose
Jun 10 2016 02:09
ok ok I will read on that..lol excited to learn this now! thanks @jdtdesigns
CamperBot
@camperbot
Jun 10 2016 02:09
aidansven sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:warning: aidansven already gave jdtdesigns points
JD Tadlock
@jdtdesigns
Jun 10 2016 02:09
@leanhduy1998 can you post the function?
Le Anh Duy (Andrew)
@leanhduy1998
Jun 10 2016 02:10
@jdtdesigns you mean my code?
JD Tadlock
@jdtdesigns
Jun 10 2016 02:10
yes
Le Anh Duy (Andrew)
@leanhduy1998
Jun 10 2016 02:10

function addTogether(first, second) {
/*
function sumTwoAnd(num){
return number+num;
}
if(addTogether.length==1){
return sumTwoAnd()
var number=addTogether(argument[0]);

}
*/

if(typeof first=="number"&& typeof second=="number"){
return first+second;
}
else{
return undefined;
}
}

addTogether(2,3);

the thing in the comment part I was just trying thing around
JD Tadlock
@jdtdesigns
Jun 10 2016 02:14
hmm
is it just asking you to add the 2 arguments?
ah, i just looked it up
so if the second argument is a function call (2)(3), you have to return a function that adds the first argument with the argument that's passed into your returning function
@leanhduy1998 a little tricky, but it's straightforward
JD Tadlock
@jdtdesigns
Jun 10 2016 02:19
return function(arg) {// some code that you can figure out :P };
Ryan
@ispeakcomputer
Jun 10 2016 02:19
Hey guys , do you have any clue how I would pass a var say "weather" into the URL in the $.getJSON?
Le Anh Duy (Andrew)
@leanhduy1998
Jun 10 2016 02:19
@jdtdesigns if you do it like that, a function call (2)(3) will work right?
to be honest, it's the first time I see this form
Ryan
@ispeakcomputer
Jun 10 2016 02:20
i know in ruby something related to that would be www.stuff.com?#{weather}
JD Tadlock
@jdtdesigns
Jun 10 2016 02:20
@needsMoreCoffee $.getJSON('http://api.com/' + weather, function() {});
Kyle W Pilkinton
@tadake
Jun 10 2016 02:20
This message was deleted
JD Tadlock
@jdtdesigns
Jun 10 2016 02:21
@leanhduy1998 it's weird because we're so used to returning a value and not a function
Pawan
@pawan92
Jun 10 2016 02:21
i think i finished my twitch streamer! but i want to add buttons to categorize the streams. http://codepen.io/pawan92/full/ezpjgM/
JD Tadlock
@jdtdesigns
Jun 10 2016 02:21
but it's the same concept
Ryan
@ispeakcomputer
Jun 10 2016 02:21
@jdtdesigns had a duh moment thanks!
CamperBot
@camperbot
Jun 10 2016 02:21
needsmorecoffee sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 456 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Le Anh Duy (Andrew)
@leanhduy1998
Jun 10 2016 02:22
@jdtdesigns I see. Thank you!
CamperBot
@camperbot
Jun 10 2016 02:22
leanhduy1998 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 457 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Chris Cullen
@123xylem
Jun 10 2016 02:34
```js

function smallestCommons(arr) {
 var num=0;
  var i;
  var j;
  var args = Array.prototype.slice.call(arguments[0]);

var args1=args[0];
  var args2=args[1];

   while ( i!== j);{//While Args1 doesnt equal args2


  for( i=args1;;i++){ //increment args1 by itself
  for( j=args2;;j++){ //ditto
  }
    num=i;//This should be where the while loop has stopped so num == i where i = j  
 break;
  }

}
  return  num;
}


smallestCommons([2,7]);
I thinkthe issue could be where im doing num=i
JD Tadlock
@jdtdesigns
Jun 10 2016 02:39
@123xylem I ended up creating a function that returns the greatest common and then using that to get the least common
Chris Cullen
@123xylem
Jun 10 2016 02:40
@jdtdesigns interesting... that maybe a better way.. Any idea why my loops arent changing value of num?
Samuel Cupidon
@Zerazera
Jun 10 2016 02:40
@123xylem Your while loop doesn't do anything
Plus you break out of it after one iteration
Chris Cullen
@123xylem
Jun 10 2016 02:41
I thought it says while theyre not equal let them ++ eachother
Rémi Fortier
@mizujin
Jun 10 2016 02:41
@123xylem can you explain to me why are you doing this : var args = Array.prototype.slice.call(arguments[0]); ?
Chris Cullen
@123xylem
Jun 10 2016 02:41
@mizujin so i can work with both arguments
individually
Samuel Cupidon
@Zerazera
Jun 10 2016 02:42
@123xylem Your sole argument is already an array though
Rémi Fortier
@mizujin
Jun 10 2016 02:42
there's no need really, you can pick array indexes
JD Tadlock
@jdtdesigns
Jun 10 2016 02:42
@123xylem they give you an array
Chris Cullen
@123xylem
Jun 10 2016 02:42
o yea ><
JD Tadlock
@jdtdesigns
Jun 10 2016 02:42
arr[0] arr[1] :P
Chris Cullen
@123xylem
Jun 10 2016 02:43
So what is my while loop doing wrong then? Ive moved break down a bracket
JD Tadlock
@jdtdesigns
Jun 10 2016 02:44
@123xylem tbh, i don't know what those loops are supposed to do lol
Chris Cullen
@123xylem
Jun 10 2016 02:44
the loops just say args1 ++ which should be EG 2+2+2+2+2
So the forloops run through the multiples of arg1 and 2 and when they match the while loop is complete
JD Tadlock
@jdtdesigns
Jun 10 2016 02:46
for ( var i = 0; i < arr[0]; i++ ) { arr[0] += arr[0]; }?
Samuel Cupidon
@Zerazera
Jun 10 2016 02:47
@123xylem I would suggest looking at a different approach .There are two main ways to get the least common multiple, using GCD or prime factorization. I suggest GCD, since it's easy to understand and implement.
Diego
@disofu234
Jun 10 2016 02:47
hello! for the quote machine project did you guys use a quote api?
JD Tadlock
@jdtdesigns
Jun 10 2016 02:48
@123xylem what @Zerazera said. I tried multiple routes and the gcm was the easiest
@disofu234 yes
Diego
@disofu234
Jun 10 2016 02:48
which one?
Rémi Fortier
@mizujin
Jun 10 2016 02:49
@disofu234 Hello ! yes I did, but many people hardcode them with arrays
Elbert Cortez
@trip16661
Jun 10 2016 02:49
guys I have a little question about jquery that I havent been able to solve myself
Diego
@disofu234
Jun 10 2016 02:49
for a lot of the ones i found you have to pay
JD Tadlock
@jdtdesigns
Jun 10 2016 02:49
Rémi Fortier
@mizujin
Jun 10 2016 02:50
@disofu234 this one is free http://startupquote.com/api/read/json
JD Tadlock
@jdtdesigns
Jun 10 2016 02:50
quoteondesign.com
and so forth :P
Samuel Cupidon
@Zerazera
Jun 10 2016 02:50
@disofu234 There are a few you don't have to pay for. Try forismatic, or advice slip. I think there's a Chuck Norris one too.
Benmhz
@Benmhz
Jun 10 2016 02:50
While on the subject, has anyone tried to use CodePen Pro to host a JSON object on their pens?
JD Tadlock
@jdtdesigns
Jun 10 2016 02:50
@Benmhz are you trying to create a database with the json?
Chris Cullen
@123xylem
Jun 10 2016 02:51
function smallestCommons(arr) {
 var num=0;
  var i;
  var j;


   while ( arr[0]!== arr[1]){//While Args1 doesnt equal args2


  for( i=arr[0];;i++){ i+=i;//increment args1 by itself and add it to args1 value
  for( j=arr[1];;j++){ j+=j; //ditto


 num=i;} //This should be where the while loop has stopped so num == i where i = j  

   }break; // Not sure why i have this.. trying to break loop

}
  return  num;
}


smallestCommons([2,7]);
I dont get what its missing tho
It says while i!=j increment i and j by itself (multiples) until they are equal...
JD Tadlock
@jdtdesigns
Jun 10 2016 02:52
@123xylem quite a lot lol
Benmhz
@Benmhz
Jun 10 2016 02:52
Yes. @jdtdesigns Right now I'm trying to figure out what the JSON were teaching by reading up the MDN refs, but I wanted to try to write my own JSON files and post them in CodePen's asset serv.
Elbert Cortez
@trip16661
Jun 10 2016 02:53
I have a dynamically added element with a button to exit that element
the thing is that to target that element i need to look up for the closest element and then search down $("body").on("click", ".theDivToClose button", call back);
then thing is when i want to access this it just don't select the element so I cant do this $(this).parent() or $(this).closest("div") mby im doing something wrong?
Diego
@disofu234
Jun 10 2016 02:53
Thank you so much guys
Samuel Cupidon
@Zerazera
Jun 10 2016 02:53
@123xylem Take a look at Euclid's algorithm. https://en.wikipedia.org/wiki/Greatest_common_divisor It can be programmed very succintly if you use recursion.
JD Tadlock
@jdtdesigns
Jun 10 2016 02:53
@Benmhz firebase.google.com is way better for cloud database storage
@Zerazera recursion lol. don't overload the poor guy :P
Chris Cullen
@123xylem
Jun 10 2016 02:54
@Zerazera Man im sure theres a better way but I really Want to know Why this wont work as it looks to me like it works... I dont see whats missing even though its just simple for loops
while someting not true.. make multiples
when both multiples are equal
return the value
Samuel Cupidon
@Zerazera
Jun 10 2016 02:55
@jdtdesigns It can be a bit overwhelming, but I actually think the recursive solution to this is easier to understand than the iterative solution
Elbert Cortez
@trip16661
Jun 10 2016 02:55
anyone knows why?
Benmhz
@Benmhz
Jun 10 2016 02:56
Cool, thanks @jdtdesigns, I'll save this for later. I'm just trying to handcode this stuff so I can get my feet wet and brain wrapped around what's happening between the page and the JSON obj.
CamperBot
@camperbot
Jun 10 2016 02:56
benmhz sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 458 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Jun 10 2016 02:56
@trip16661 add the element and then use a callback after you add it to set up the listener
Benmhz
@Benmhz
Jun 10 2016 02:56
I'm still on the Quote Page challange.
Samuel Cupidon
@Zerazera
Jun 10 2016 02:56
@123xylem Your code is incrementing both at the same time. Frankly it's not that great an approach. Let's take 2 and 3, for example. You would be comparing 2 and 3, and 4 and 6, and 6 and 9, etc. when the lcd is 6
JD Tadlock
@jdtdesigns
Jun 10 2016 02:57
@Benmhz I actually did that awhile back, which is why i knew what you were doing lol
Elbert Cortez
@trip16661
Jun 10 2016 02:57
@jdtdesigns what do you mean? sorry im dumb xD
JD Tadlock
@jdtdesigns
Jun 10 2016 02:57
i used a free json storage api though that's pretty crap
Chris Cullen
@123xylem
Jun 10 2016 02:58
@Zerazera yea i realised its not i++ its i+i
but I see what ur saying
if i gets to 15 before j will it skip to the next number
15 being the lowest shared multiple
Samuel Cupidon
@Zerazera
Jun 10 2016 02:59
@123xylem Which is why you should just use the GCD method
JD Tadlock
@jdtdesigns
Jun 10 2016 03:01
$('#parent').append(
'<div id="main">' +
  '<h1>Title</h1>' +
  '<button id="exit">Exit</button>' +
'</div>');

$('#exit').on('click', exit);

 function exit() {
  $('#main').hide();
}
@trip16661
Elbert Cortez
@trip16661
Jun 10 2016 03:02
@jdtdesigns that wont work
JD Tadlock
@jdtdesigns
Jun 10 2016 03:02
@trip16661 .......
Elbert Cortez
@trip16661
Jun 10 2016 03:02
because it's a dinamically added element you need to do a search up first
JD Tadlock
@jdtdesigns
Jun 10 2016 03:03
@trip16661 are you adding the element from js?
Elbert Cortez
@trip16661
Jun 10 2016 03:03
y
JD Tadlock
@jdtdesigns
Jun 10 2016 03:03
then that will work bro
make sure you set the listener up after you append the element
Elbert Cortez
@trip16661
Jun 10 2016 03:03
so when you try to access it it will just wont read it because its not initialized
when the page loaded
JD Tadlock
@jdtdesigns
Jun 10 2016 03:04
look above
Elbert Cortez
@trip16661
Jun 10 2016 03:04
    $(".dashboard").on("click", ".city-wraper button", (e) => {
        var id = $(this).attr("class");
        console.log(id);
    });
i have something like this
JD Tadlock
@jdtdesigns
Jun 10 2016 03:04
i appended, then set the listener
@trip16661 you have to think in order of what you are doing
you can't set listeners on elements that aren't there yet
you have to set up the order by which things happen when you add code to the DOM
Elbert Cortez
@trip16661
Jun 10 2016 03:05
I have a function that create divs with class city-wrapper and inside of that it has a city and a button
JD Tadlock
@jdtdesigns
Jun 10 2016 03:05
ok
Elbert Cortez
@trip16661
Jun 10 2016 03:06
so even if i do the way you do
the js wont know the dom element is there
JD Tadlock
@jdtdesigns
Jun 10 2016 03:06
@trip16661 post your code
Elbert Cortez
@trip16661
Jun 10 2016 03:06
since its not initialized when the page loads
JD Tadlock
@jdtdesigns
Jun 10 2016 03:06
it's not about page load
it's about order
Elbert Cortez
@trip16661
Jun 10 2016 03:07
    const displayWeather = (weather) => {
        let div = document.createElement('div')
        const thisId = weather.weatherdata.location.name;
        const country = weather.weatherdata.location.country;
        let thisDiv = `#${thisId}`
        console.log(weather.weatherdata);
        weather = weather.weatherdata.forecast.time;
        $(div).addClass("city-wraper")
            .attr("id", thisId)
            .appendTo(".dashboard");
        $(thisDiv).append(
            $("<div/>").addClass("city"),
            $("<button/>")
               .text("X")
        );
        $(thisDiv + " .city").append(
            $("<div/>").addClass("weather-icon")
                .html('<img src="http://megaicons.net/static/img/icons_sizes/8/178/256/weather-sun-icon.png">'),
            $("<div/>").addClass("city-name days")
                .html(`<h2>${thisId}, ${country}</h2>
                        <h1>${Math.floor(weather[0].temperature["@day"])}</h1>`)
        )
        for (let i = 1, leng = weather.length; i < leng; i++) {
            $(thisDiv + " .city").append(
                $("<div/>").addClass("days")
                    .html(`<h3>${weekDay(weather[i]["@day"])}</h3>` +
                        `<h2>${Math.floor(weather[i].temperature["@day"])}</h2>`)
            );
        }
    }
JD Tadlock
@jdtdesigns
Jun 10 2016 03:07
@trip16661 after the for loop, add the function that sets the listener
pretty standard order of operations ;)
Elbert Cortez
@trip16661
Jun 10 2016 03:08
you mean inside of the function? :D
let me check xD
JD Tadlock
@jdtdesigns
Jun 10 2016 03:09
  for ( blah blah) {
    // blah blah
  }
  setListener();
}
yes
Elbert Cortez
@trip16661
Jun 10 2016 03:15
@jdtdesigns still says undefined xD
$(".close").on("click", (e) => {
        var id = $(this).attr("class");
        $(this).closest("div").hide();
        console.log(id);
});
William Coleman
@wcdevworks
Jun 10 2016 03:17
Can anyone tell me how to style the contents of a Bootstrap menu after it drops down?
Not a dropdown menu per se, but the mobile toggle menu contents
I've got my navbar links positioned to the right side, but when in a viewport size that changes them to a button, they drop down on the left side of the page
Elbert Cortez
@trip16661
Jun 10 2016 03:18
the element to close responds but not really on $(this)
Kyle W Pilkinton
@tadake
Jun 10 2016 03:25

hey guys im trying to style a buttons color. ive done this a million times so i must be overlooking someting small
why is this

#red{
  color:#f44336;
}

not styling this

 <div class='col-xs-6'>
          <button id='red'  class='btn'></button>
        </div>
Bruce Young
@mutantspore
Jun 10 2016 03:27
@tadake at a guess that wil only effect any text you write within the button tags
Elbert Cortez
@trip16661
Jun 10 2016 03:27
@tadake try
#red{
  background-color:#f44336;
}
else
#red{
  background-color:#f44336 !important;
}
Kyle W Pilkinton
@tadake
Jun 10 2016 03:28
ahhhhhhhhhhhh ok ! i totally forgot about that ! thanks @mutantspore @trip16661
CamperBot
@camperbot
Jun 10 2016 03:28
tadake sends brownie points to @mutantspore and @trip16661 :sparkles: :thumbsup: :sparkles:
:cookie: 382 | @trip16661 |http://www.freecodecamp.com/trip16661
:star2: 1727 | @mutantspore |http://www.freecodecamp.com/mutantspore
JD Tadlock
@jdtdesigns
Jun 10 2016 03:28
@trip16661 have you looked at the console?
it threw 10 errors even with es6 turned on
Elbert Cortez
@trip16661
Jun 10 2016 03:29
@jdtdesigns y i tried to do this as well
$(".close").on("click", (e) => {

            var id = $(this);
            console.log($(this).parent(".city-wraper").attr("class"));
            $(this).hide();
            console.log(id.attr("class"));
        });
and both return undefined
@jdtdesigns well its because the code is more than what i sent xD
JD Tadlock
@jdtdesigns
Jun 10 2016 03:30
I can show you a es5 way for sure lol
Elbert Cortez
@trip16661
Jun 10 2016 03:30
go ahead there is no much difference
JD Tadlock
@jdtdesigns
Jun 10 2016 03:30
@trip16661 If you look, you're missing semi-colons
Elbert Cortez
@trip16661
Jun 10 2016 03:30
where?
oh yeah
i missed two
Aata-allah
@Atalaa
Jun 10 2016 03:32

i want to put a responsive embed ender Bloopers, but it doesnt show, please someone?

https://codepen.io/Atalaa/pen/ezpgzM?editors=1000

Elbert Cortez
@trip16661
Jun 10 2016 03:33
@jdtdesigns I trully have no idea of whats going on because the button itself works and worked outside of the function but in both cases
$(this) is not working or returning the element itself
so i cant do $(this).closest(".parent")
or $(this).parent(".parent")
in fact not even $(this).hide()
which means that what im getting in this is not exactly the item itself
I wish i knew how the object that i return with log($(this)) work like so i could know what the f im getting on $(this)
Elbert Cortez
@trip16661
Jun 10 2016 03:38
okay...
this doesnt make any sense at all
it works removing the arrow function ahaha
I have no idea of whats going on xD
Tulio Natale
@tuliodnw
Jun 10 2016 03:43
@Atalaa the bloopers works, you click bloopers the video appears looks good, btw if you move the code to the sides, you can see how the page looks on different screens
Aata-allah
@Atalaa
Jun 10 2016 03:46
yeah because i fix it, i made a mistake i put directlythe youtube link instead of embed link hahah
@tuliodnw thnak u
@tuliodnw thank u
CamperBot
@camperbot
Jun 10 2016 03:46
atalaa sends brownie points to @tuliodnw :sparkles: :thumbsup: :sparkles:
:cookie: 381 | @tuliodnw |http://www.freecodecamp.com/tuliodnw
basic process of how i would do it
Sanchit Dhiman
@sanchit13
Jun 10 2016 03:50
Can anyone explain why the bottom of my page is acting up? I'm missing a logo on the top because I didn't hotlink the image, I was coding natively on atom.io
Tulio Natale
@tuliodnw
Jun 10 2016 03:52
@jdtdesigns what am i looking here?, i didnt post any project
JD Tadlock
@jdtdesigns
Jun 10 2016 03:53
@tuliodnw sorry, wrong person lol
Jimmy Hernandez
@dismister
Jun 10 2016 03:55
Hello everyone. I'm having a bit of trouble with Bootstrap. The issue is with getting my content to not overlap or "push" each other. I understand the grid system can help me, but after watching several youtube videos I don't understand how to position with bootstrap.
Pawan
@pawan92
Jun 10 2016 03:55
can anyone tell me how to add a online,offline,NA filter? i can create the buttons but im not sure about the logic. http://codepen.io/pawan92/pen/ezpjgM
Elbert Cortez
@trip16661
Jun 10 2016 03:55
@jdtdesigns y i just found out that was the arrow function that was screwing and changing the value of this therefore it was never the element but something else (which im not sure what it is)
Eric Bezanson
@ericbezanson
Jun 10 2016 03:55
hey anyone have any suggestions on how I can get the project images to center ont he page ? http://codepen.io/BZanZ/full/OXyyMN/
Jimmy Hernandez
@dismister
Jun 10 2016 03:55
Hello everyone. I'm having a bit of trouble with Bootstrap. The issue is with getting my content to not overlap or "push" each other. I understand the grid system can help me, but after watching several youtube videos I don't understand how to position with bootstrap.
Samuel Cupidon
@Zerazera
Jun 10 2016 03:56
@dismister Position with bootstrap is pretty much done using the grid system http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-grid-system.php
Elbert Cortez
@trip16661
Jun 10 2016 03:56
@jdtdesigns it was giving back an object, it wasn't because the event handler was outside of the function that creates dinamically add divs but
Jimmy Hernandez
@dismister
Jun 10 2016 03:57
@Zerazera This is exactly the detailed tutorial I was looking for thank you!
CamperBot
@camperbot
Jun 10 2016 03:57
:cookie: 460 | @zerazera |http://www.freecodecamp.com/zerazera
dismister sends brownie points to @zerazera :sparkles: :thumbsup: :sparkles:
Elbert Cortez
@trip16661
Jun 10 2016 03:57
it was all because the arrow function, i will try to post that on stack to see why would that be
and if there is a ES6 walk around
@jdtdesigns really thanks btw without you suggesting about ES5 i wouldnt have tried xD
CamperBot
@camperbot
Jun 10 2016 03:58
trip16661 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 459 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Jun 10 2016 03:59
@trip16661
function Person(){
  this.age = 0;

  setInterval(() => {
    this.age++; // |this| properly refers to the person object
  }, 1000);
}

var p = new Person();
welcome ;)
arrow functions scope differently
Samuel Cupidon
@Zerazera
Jun 10 2016 04:00
@trip16661 Arrow notation is really best used for short, simple functions. Think of it as syntactically similar to a lambda.
Elbert Cortez
@trip16661
Jun 10 2016 04:01
@Zerazera you mean is a bad practice to use it on bigger functions?
Tulio Natale
@tuliodnw
Jun 10 2016 04:01
@pawan92 in line 15, of the js change the append for prepend, and you will have online first
Eric Bezanson
@ericbezanson
Jun 10 2016 04:01
hey anyone have any suggestions on how I can get the project images to center ont he page ? Id prefer to have them centered with the project class I created instead of adjusting margins and padding on each one individually
http://codepen.io/BZanZ/full/OXyyMN/
Tulio Natale
@tuliodnw
Jun 10 2016 04:01
easy fix for that
Samuel Cupidon
@Zerazera
Jun 10 2016 04:03
@trip16661 In general, yes. Arrow notation, like lambdas, is meant for small, anonymous functions.
Tulio Natale
@tuliodnw
Jun 10 2016 04:03
@pawan92 you added a class the online ones, also add a class to the offline, the you make a button that all it does is, $(".offline").hide(); $(".online").show();
Elbert Cortez
@trip16661
Jun 10 2016 04:04
@Zerazera in that case it would be perfectly fine to use it on an event handler
Tulio Natale
@tuliodnw
Jun 10 2016 04:04
and Vice versa
Elbert Cortez
@trip16661
Jun 10 2016 04:04
but in this case it didn't work as usual
Samuel Cupidon
@Zerazera
Jun 10 2016 04:04
@trip16661 Right, except for the scoping issue.
Pawan
@pawan92
Jun 10 2016 04:05
@tuliodnw thanks! that puts the NA first, online, then all the offline
CamperBot
@camperbot
Jun 10 2016 04:05
pawan92 sends brownie points to @tuliodnw :sparkles: :thumbsup: :sparkles:
:cookie: 382 | @tuliodnw |http://www.freecodecamp.com/tuliodnw
Tulio Natale
@tuliodnw
Jun 10 2016 04:07
@pawan92 what is NA?
Pawan
@pawan92
Jun 10 2016 04:07
@tuliodnw stream not available for those that are closed
Tulio Natale
@tuliodnw
Jun 10 2016 04:08
@pawan92 in mine online are first, http://codepen.io/tuliodnw/pen/GqoOyg?editors=0010
Pawan
@pawan92
Jun 10 2016 04:10
@tuliodnw yea i just changed it haha. so if i wanted to add buttons and filter how can i do that
Tulio Natale
@tuliodnw
Jun 10 2016 04:10
@pawan92 btw on big screen the wallpaper doesnt cover all, and in small screens the margins are too big and the box looks odd
@pawan92 like this
$("#online").click(function online() {
  $(".hueco").show();
  $(".sacalo").hide();
});
for you hueco would be online, you must make an offline one, also give it to the na,
and #online is the id of the button
Pawan
@pawan92
Jun 10 2016 04:17
@tuliodnw ugh ok ill find a new wallpaper lol. let me try that out
Tulio Natale
@tuliodnw
Jun 10 2016 04:23
@pawan92 no no, just fit it better,
@pawan92 i used this in the css where the wallpaper is, should fix it
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
Jimmy Hernandez
@dismister
Jun 10 2016 04:41
using Bootstrap how do I keep a title within a row from being overlapped by a col of content ?
Eric Bezanson
@ericbezanson
Jun 10 2016 04:43

just finished my portfolio ! if anyone would care to check it out I would love some feedback, there is kind of a bug with the nav bar to where it does not float on top of other elements :S

also I used boiler text for the about and i dont have any projects or photos yet so imagine there are beautiful projects pictured :P

http://codepen.io/BZanZ/full/OXyyMN/

Rouque
@Rouque
Jun 10 2016 04:58
Hey can anyone give me a hand
How do I keep my buttons from running into each other and overlapping?
Sanchit Dhiman
@sanchit13
Jun 10 2016 05:00
Any tips of making my skills section more appealing? Right now I feel like the headings aren't exactly centered right compared to the Icons. https://codepen.io/sanchit13/pen/yJYKbP
bscyrpt
@bscyrpt
Jun 10 2016 05:03
@sanchit13 i would make it much smaller, its not really a focual point, just something saying hey, i know these
Sanchit Dhiman
@sanchit13
Jun 10 2016 05:04
I see, do you have any advice on getting the text's midpoint to be the same midpoint as that of the icons? it looks like the text is slightly offcenter compareed to the icons @bscyrpt
bscyrpt
@bscyrpt
Jun 10 2016 05:06
say the div is height:30px; set your line-height:30px; and text will center in div vertically, then set the icons position:relative; then nudge up/down with top:+/-px
@Rouque to make your buttons not overlap you need to not have them as float elements.
Rouque
@Rouque
Jun 10 2016 05:09
@bscyrpt How would I go about that?
Jimmy Hernandez
@dismister
Jun 10 2016 05:10
How do I get my port class to go down? i'm trying to reposition with bootstrap
bscyrpt
@bscyrpt
Jun 10 2016 05:11

@Rouque instead of col-sm-1 as the class make a new class and put in

.cssclass{
display:inline-block;
margin-left:somenumber;
}

should make the elements flow inline and you can space them apart with the margin-left.

Rouque
@Rouque
Jun 10 2016 05:12
somenumber should be px yes?
like 30px
bscyrpt
@bscyrpt
Jun 10 2016 05:13
yea
So @bscyrpt How do I get my little box moved down away from the header?
bscyrpt
@bscyrpt
Jun 10 2016 05:20
you mean the text and image?
you need to add margin-top:000px; to the container they are in
Rouque
@Rouque
Jun 10 2016 05:26
No I mean with the green header
and the Text block
Rouque
@Rouque
Jun 10 2016 05:32
Any ideas?
Eli
@elisspace
Jun 10 2016 05:55
Hey folks! Hope your evening/day/morning is treating you well!
kirbyedy
@kirbyedy
Jun 10 2016 05:56
@Rouque the text ?
Eli
@elisspace
Jun 10 2016 05:56

I have a mysterious few <br> tags showing up before my header (when I inspect the output in Firefox I see them) but they aren't in the CodePen code. Any idea where they are coming from and how to get rid of them?

http://codepen.io/elisspace/pen/KMpMBx

Sanchit Dhiman
@sanchit13
Jun 10 2016 05:56
Is there a way to get say a .col-md-4 css block to display it's content differently than .col-sm-12 if an element has both classes applied to it? Like I want the same content to be positioned differently when it's on a wide screen and on a phone
Rouque
@Rouque
Jun 10 2016 05:56
@kirbyedy Yeah where I say "My name Is Nic" the box around that is touching the green header. How do I separate them
Samuel Cupidon
@Zerazera
Jun 10 2016 05:57
@sanchit13 Depending on what the inner content is, you can either nest columns inside to position, or use absolute/relative positioning with percents
kirbyedy
@kirbyedy
Jun 10 2016 05:59
@Rouque where your div row is, and a class named 'about' for example, and than add margin-top to that about class
Rouque
@Rouque
Jun 10 2016 05:59
add a class named about?
Okay
kirbyedy
@kirbyedy
Jun 10 2016 06:00
yes
could be anything... I just made that up
Rouque
@Rouque
Jun 10 2016 06:00
margin top or padding top?
kirbyedy
@kirbyedy
Jun 10 2016 06:00
and then target that class
margin-top
Rouque
@Rouque
Jun 10 2016 06:01
mmmm that didn't work.
Eli
@elisspace
Jun 10 2016 06:01

Also worth mentioning the menu doesn't work on mobile. For some reason I can't click the button to expand and show all of the menu's content if it's collapsed.

http://codepen.io/elisspace/pen/KMpMBx

Rouque
@Rouque
Jun 10 2016 06:01
oh I added it to the wrong div class="Row"
kirbyedy
@kirbyedy
Jun 10 2016 06:02
the second row :)
btw in the codepen setting add jquery and bootstrap with quick add but in the javascript section
Rouque
@Rouque
Jun 10 2016 06:03
How do I keep my elements from smushing together?
If I change the page size it mashes everything together.
kirbyedy
@kirbyedy
Jun 10 2016 06:04
that is exactly why I told you to add that things
jquery and bootstrap
Jimmy Hernandez
@dismister
Jun 10 2016 06:17
I'm having trouble moving my description to be even with my picture can someone help please? http://codepen.io/dismister/pen/xVBOKa
kirbyedy
@kirbyedy
Jun 10 2016 06:19
@dismister can you explain me what is this ?
col.xs.12
first time I see it...
Jimmy Hernandez
@dismister
Jun 10 2016 06:20
@kirbyedy omg that's where I messed up no wonder it wasn't working
its suppose to be - not .
lol
thank you @kirbyedy
CamperBot
@camperbot
Jun 10 2016 06:20
dismister sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1090 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
kirbyedy
@kirbyedy
Jun 10 2016 06:21
:)
@dismister also in the codepen setting add jquery and bootstrap in that order
in the javascript section
Jimmy Hernandez
@dismister
Jun 10 2016 06:26
hmm I fixed the code but my text is still not in line with my picture
kirbyedy
@kirbyedy
Jun 10 2016 06:34
@dismister you mean like this ?
Screen Shot 2016-06-10 at 09.34.13.png
Jaren Escueta
@jarenescueta731
Jun 10 2016 06:43
@dismister check out the vertical-align css property
Jimmy Hernandez
@dismister
Jun 10 2016 06:46
@kirbyedy yes
@jarenescueta731 Thank you
CamperBot
@camperbot
Jun 10 2016 06:46
:cookie: 285 | @jarenescueta731 |http://www.freecodecamp.com/jarenescueta731
dismister sends brownie points to @jarenescueta731 :sparkles: :thumbsup: :sparkles:
kirbyedy
@kirbyedy
Jun 10 2016 06:47
not sure how good are you with flexbox, that is the easiest way
also if you have time it would be good to learn it
Jimmy Hernandez
@dismister
Jun 10 2016 06:51
Thank you @kirbyedy I will watch it now.
CamperBot
@camperbot
Jun 10 2016 06:51
dismister sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:warning: dismister already gave kirbyedy points
Guys I want to append the numbers in the screen in pure JS
need help
function append()
Jaren Escueta
@jarenescueta731
Jun 10 2016 06:53
so i've been stuck for almost a week on the wikipedia viewer project, my attempts to debug using .html() are inconclusive. i can't tell if my program is getting the value from the input field at all, i'm pretty sure the .getJSON() parameter is correct. the problem is that i don't know what happens when i click my Search button because nothing happens, except clearing the input field. http://codepen.io/jarenescueta/pen/VjLvgm
@Whiplash5057 i haven't reached that project yet, but have you looked at the .append() method of jQuery?
Richard Andrews
@Whiplash5057
Jun 10 2016 06:56
@jarenescueta731 I'm actually trying to do this project using js only...hehe...!! Want to learn
hence no jQuery
Jaren Escueta
@jarenescueta731
Jun 10 2016 06:57
well it's a library of js, but i see what you mean i guess
@Whiplash5057 or a set of js libraries rather
Sorin Ruse
@sorinr
Jun 10 2016 06:58
@jarenescueta731 its because the search btn is submiting the <form>. try to prevent this default behavior
Jaren Escueta
@jarenescueta731
Jun 10 2016 06:59
@sorinr oh ok, thanks
CamperBot
@camperbot
Jun 10 2016 06:59
jarenescueta731 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 354 | @sorinr |http://www.freecodecamp.com/sorinr
Jaren Escueta
@jarenescueta731
Jun 10 2016 06:59
im stupid for not asking help sooner
Sorin Ruse
@sorinr
Jun 10 2016 07:00
@jarenescueta731 welcome
Fourbits
@Fourbits
Jun 10 2016 07:03
Would anyone mind checking out my Simon game and giving constructive criticism? https://codepen.io/fourbits/full/rLxYPr/
I've set it to let you win if you get to 10 so it can be tested faster.
Jaren Escueta
@jarenescueta731
Jun 10 2016 07:07
@Fourbits that's awesome! i haven't reached this project yet, what's the strict button for?
Fourbits
@Fourbits
Jun 10 2016 07:09
@jarenescueta731 If it's not in strict mode, when you press the wrong button, it will repeat the pattern and let you try again.
If it's in strict mode, you will lose and have to restart the game again.
Ivan Villa
@ivanvillacreative
Jun 10 2016 07:11
@Whiplash5057 first thing i would do is make the text black, so you can see it. I was trying all sorts of things untill i realised it was white text on a white box lol
Jaren Escueta
@jarenescueta731
Jun 10 2016 07:13
@jarenescueta731 gotcha. also, just aesthetic, not important, but it would be cool if the on/off switch moves when you toggle it. that's what i expected it to do at first
Fourbits
@Fourbits
Jun 10 2016 07:15
@jarenescueta731 It moves for me in Chrome. What browser are you using?
I guess I should check for cross-browser compatibility.
Jaren Escueta
@jarenescueta731
Jun 10 2016 07:18
firefox latest version
Richard Andrews
@Whiplash5057
Jun 10 2016 07:20
@ivanvillacreative
Fourbits
@Fourbits
Jun 10 2016 07:20
OK, I'll see what's wrong. It seems it doesn't move in Edge, either.
Richard Andrews
@Whiplash5057
Jun 10 2016 07:21
I'm not getting the result of the expression'
@ivanvillacreative
Dakota Bryant
@dakotabryant
Jun 10 2016 07:25
This message was deleted
This message was deleted
Ivan Villa
@ivanvillacreative
Jun 10 2016 07:31
@Whiplash5057 looking good to me!
Richard Andrews
@Whiplash5057
Jun 10 2016 07:34
@ivanvillacreative I COMPLETED IT....!!! :smile:
thanks @ivanvillacreative
CamperBot
@camperbot
Jun 10 2016 07:34
whiplash5057 sends brownie points to @ivanvillacreative :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for ivanvillacreative
Guys check it out ...!!! I'm done!!
Fourbits
@Fourbits
Jun 10 2016 07:52
@Whiplash5057 Good job!
Richard Andrews
@Whiplash5057
Jun 10 2016 07:53
:smile: thanks
@Fourbits
Fourbits
@Fourbits
Jun 10 2016 08:04
@jarenescueta731 Does it work properly for you now?
https://codepen.io/fourbits/full/rLxYPr/
Chethan Bhat
@chethanbhat
Jun 10 2016 08:18
how to go about twitch tv app
facing problem related to asynchronous nature of api calls
i believe we have to make two api calls
Fourbits
@Fourbits
Jun 10 2016 08:45
@chethanbhat You need to be able to keep track of which user's information you're querying in your callback function. one way to do that is to put the callback inside a closure:
(function(target) {
    return function(data) {
        // data == JSON data
        // target == the user you are querying
    }
})(target)
The data variable is provided by the system, but you need to define the target variable yourself.
Clem
@ctataru
Jun 10 2016 09:58
the code here will only run if checkWin() returns something, right?
if (checkWin()) {
checkWin();
gameOver = true;
}
whoops:
if (checkWin()) {
checkWin();
gameOver = true;
}
Clem
@ctataru
Jun 10 2016 10:23
or will that only be the case of the function has return true?
Stephen James
@sjames1958gm
Jun 10 2016 10:24
@ctataru True or anything not falsy so any non-zero number, non-empty string, non-empty object, etc
@ctataru Not sure you need to call checkWin() twice.
sandeepnarayan
@sandeepnarayan
Jun 10 2016 10:27
@ctataru @Fourbits hi guys
can you guys suggest me a best infinte scroll plugin
for large amount of data in case
@ctataru @Fourbits hi guys
i was cheking on http://jscroll.com/,https://github.com/cubiq/iscroll and clusterize.js
any suggestion
Clem
@ctataru
Jun 10 2016 10:30
@sjames1958gm well right now the function just returns a confirm(). would that count?
http://codepen.io/wise/pen/dXbqMK?editors=0010
Stephen James
@sjames1958gm
Jun 10 2016 10:35
@ctataru If they click ok then it returns true.
@ctataru So yes
Clem
@ctataru
Jun 10 2016 10:37
@sjames1958gm ahh right. awesome. thank you
CamperBot
@camperbot
Jun 10 2016 10:37
ctataru sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 1507 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Jun 10 2016 10:37
@ctataru :+1:
Clem
@ctataru
Jun 10 2016 10:53
@sjames1958gm i just don't understand why i get a draw message after my win message, then. if there is a win or loss on the last block (and every block is filled) then it gives me both messages. shouldn't my if/else on line 201 only give me the win message? possibly even twice, seeing as i call it in the function and the code block inside it
Joel Santos
@St3ps
Jun 10 2016 11:50
Any idea on how i can vertically align the text in the middle column?
https://codepen.io/Steps/pen/Vjemer
kirbyedy
@kirbyedy
Jun 10 2016 11:53
@St3ps you can try with flexbox
Joel Santos
@St3ps
Jun 10 2016 11:55
@kirbyedy does flexbox integrate well with bootstrap?
kirbyedy
@kirbyedy
Jun 10 2016 11:58
why not ?
Screen Shot 2016-06-10 at 14.58.28.png
Clem
@ctataru
Jun 10 2016 11:58
anyone have any ideas?
Joel Santos
@St3ps
Jun 10 2016 12:00
@kirbyedy hahah... awesome, alright ill try it out. Do i have to do anything special? Like should i follow the instructione here? http://v4-alpha.getbootstrap.com/getting-started/flexbox/
kirbyedy
@kirbyedy
Jun 10 2016 12:01
its up to you
I would suggest searching for the flexbox youtube video tutorial, which explains how it works
it will make things more clear
Joel Santos
@St3ps
Jun 10 2016 12:03
@kirbyedy sweet, i'll check it out, thanks!
CamperBot
@camperbot
Jun 10 2016 12:03
st3ps sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1094 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Ankur sharma
@ankur1163
Jun 10 2016 12:10

@ankur1163
can someone tell me
how do i align image
in center
http://screencast.com/t/kaTUcsyWV

.outerbox{
  background-color:#EEEEEE;
  height:1000px;
  border-style: none;
   margin:80px;

}
.image{

  width:100px;
}

.name{
  text-align:center;
  color:black;
  font-family:arial;
  font-size:50px;


  }
  .edu{
font-size:20px;


  }

.blue-text{
  color:red;

}


</style>

html code

<html lang="en">
<link rel="stylesheet" href="awesome.css">
<div class= "container-fluid">
  <div class = "row">
   <div class="col-md-2">

    </div>
    <div class="col-md-8">
      <div class="outerbox">

        <div class="name">
          Kiran Bedi
          <div  class="edu">
          She is the first woman to join the Indian Police Service

        </div>
        <div class="image">
      <img src="kiran bedi.jpg" alt="" />

        </div>

      </div>


    </div>
  </div>

    <div class="col-md-2">

    </div>




        </div>

    </div>

</div>



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

</html>
Gerard Dawson
@gerarddawson
Jun 10 2016 12:10
This message was deleted
Ankur sharma
@ankur1163
Jun 10 2016 12:10
I have put image width property to be 100px
then why this image is so big
Gerard Dawson
@gerarddawson
Jun 10 2016 12:11
I'm working on the Random Quote Generator, and trying to add the click to Tweet button. I can't figure out where in the function to pass data.QuoteText and data.QuoteAuthor. Can anyone help me identify that?
var tweet = function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0],
    p = /^http:/.test(d.location) ? 'http' : 'https';
  if (!d.getElementById(id)) {
    js = d.createElement(s);
    js.id = id;
    js.src = p + '://platform.twitter.com/widgets.js';
    fjs.parentNode.insertBefore(js, fjs);
  }
}(document, 'script', 'twitter-wjs');
kirbyedy
@kirbyedy
Jun 10 2016 12:23
@gerarddawson your code is confusing to me, but here is an easy way to do what you want
Gerard Dawson
@gerarddawson
Jun 10 2016 12:25
@kirbyedy yes, i am having trouble making sense of the Twitter API, so it's confusing to me, too unortunately
kirbyedy
@kirbyedy
Jun 10 2016 12:26
well check that code then and try to understand it
Gerard Dawson
@gerarddawson
Jun 10 2016 12:26
@kirbyedy thank you for sharing. this is a much simpler solution.
CamperBot
@camperbot
Jun 10 2016 12:26
gerarddawson sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1095 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
kirbyedy
@kirbyedy
Jun 10 2016 12:26
I think its pretty straight forward
John Delaney
@jdpunk1
Jun 10 2016 12:38
the wikipedia api is doing my head in
just wanted to put that out there
John Delaney
@jdpunk1
Jun 10 2016 12:48
@jarenescueta731 also I've found putting a console.log(somevalue); in your jquery is invaluably useful in debugging on codepen, there's a console button on the bottom pane- helps keep track of var changes or api data output etc
Andy
@Zubenna
Jun 10 2016 13:02

Hello Everyone,

Please review my quote machine and suggest ways to improve on my work.
https://codepen.io/Zubenna/full/EyPvyz/

Thanks.

Clem
@ctataru
Jun 10 2016 13:15
hi guys. could anyone explain why margin: 100px auto isn't aligning the box vertically too?
http://codepen.io/wise/pen/dXbqMK?editors=1100
Leow Wei Xiang
@boyboi86
Jun 10 2016 13:21
Urgently need help for angularJS. Is my custom service correct?
myApp.service('myLocation',['$resource',function('$resource'){
this.getLocation = function(city){

var location = $resource("http://ipinfo.io", 
        { callback: "JSON_CALLBACK" }, 
        { get: { method: "JSONP" }});

return location.get({city: city })
}
}]);
Karolina Kluz
@karolinaKluz
Jun 10 2016 13:25
@ctataru I don't know, maybe because of flexbox. I did try to edit your pen and came with a solution. Wrap everything in a div and give it { display: flex; justify-content: center;}
Ken Haduch
@khaduch
Jun 10 2016 13:26
@jdpunk1 @jarenescueta731 - console.log is very valuable for debugging, and if the CodePen console doesn't show it (it only handles a limited amount of output - I think that they tell you when it cannot handle it) pop up the browser developer tools and the console tab is where you'll find it. You can also use the console to do javascript testing. Firebug (a firefox add-on) has a neat feature in the console to "pretty print" - fix the indentations in your javascript that you enter. That's handy at times. Happy coding!
Tbuglc
@tbuglc
Jun 10 2016 13:27
hey guys, why fontawesome in not working? http://codepen.io/tbuglc/pen/zBvzRM
John D.
@teddydi
Jun 10 2016 13:28
i dunno, buddy
Clem
@ctataru
Jun 10 2016 13:28
@khaduch thanks a bunch! :D
CamperBot
@camperbot
Jun 10 2016 13:28
ctataru sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1293 | @khaduch |http://www.freecodecamp.com/khaduch
Karolina Kluz
@karolinaKluz
Jun 10 2016 13:38
@ctataru Hey, You used my solution so why don't you thank me?
CamperBot
@camperbot
Jun 10 2016 13:38
karolinakluz sends brownie points to @ctataru :sparkles: :thumbsup: :sparkles:
:cookie: 323 | @ctataru |http://www.freecodecamp.com/ctataru
Clem
@ctataru
Jun 10 2016 13:39
@karolinaKluz whoops i had your name wrong
@karolinaKluz i thanked the wrong person.. thanks
CamperBot
@camperbot
Jun 10 2016 13:39
ctataru sends brownie points to @karolinakluz :sparkles: :thumbsup: :sparkles:
:cookie: 125 | @karolinakluz |http://www.freecodecamp.com/karolinakluz
tcwood
@tcwood
Jun 10 2016 13:41
Hey everybody! For the calculator can anyone help me figure out how to get the clear button to be on the same line as the results box? http://codepen.io/Twood/pen/NrPQgJ
James Riall
@JamesRiall
Jun 10 2016 13:43

'''var api = "http://api.openweathermap.org/data/2.5/weather?q=London&units=metric&APPID=95cb066d694049e32c48e0101817e622&callback=JSON_CALLBACK";

$(document).ready(function() {
$.getJSON(api, getTemp);
});

var getTemp = function(data) {
$("#temp").text(data.main.temp);
};'''

CamperBot
@camperbot
Jun 10 2016 13:43
:bulb: to format code use backticks! ``` more info
James Riall
@JamesRiall
Jun 10 2016 13:44
Can anyone help me with getting my weather API set up. Just trying to load the temperature at the moment and this code isn't working
var api = "http://api.openweathermap.org/data/2.5/weather?q=London&units=metric&APPID=95cb066d694049e32c48e0101817e622&callback=JSON_CALLBACK";
$(document).ready(function() {
$.getJSON(api, getTemp);
});
var getTemp = function(data) {
$("#temp").text(data.main.temp);
};
Timm Stelzer
@tstelzer
Jun 10 2016 13:46
anyone here using vvv to develop wordpress sites? im a little bit confused about my setup
Chase
@Belax8
Jun 10 2016 13:52
@JamesRiall I changes your url to this and it seemed to work for me var api = "http://api.openweathermap.org/data/2.5/weather?q=London&units=metric&APPID=95cb066d694049e32c48e0101817e622&callback=";
I just deleted the JSON_CALLBACK at the end of it
JD Tadlock
@jdtdesigns
Jun 10 2016 13:52
@JamesRiall ^
James Riall
@JamesRiall
Jun 10 2016 13:53
@Belax8 YES, PROGRESS :D
@Belax8 @jdtdesigns thanks very much both, been banging my head against a wall trying to figure out even the basics of using APIs but i think it's starting to make sense
CamperBot
@camperbot
Jun 10 2016 13:54
jamesriall sends brownie points to @belax8 and @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 398 | @belax8 |http://www.freecodecamp.com/belax8
:cookie: 460 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
James Riall
@JamesRiall
Jun 10 2016 13:54
Think building the rest of it now should be relatively straightforwards.
Gerard Dawson
@gerarddawson
Jun 10 2016 14:00
Think I'm finally done with my Random Quote Generator. Thanks everyone for help:
James Riall
@JamesRiall
Jun 10 2016 14:04
@gerarddawson nice one, looking great :)
Clyde
@hea-hea
Jun 10 2016 14:07
hi people
can you recommend a good tutorial/article about API basics?
I want to start coding the Weather App but I have trouble figuring out where to start
and how to proceed ;D
James Riall
@JamesRiall
Jun 10 2016 14:09
@hea-hea I had exactly the same problem. I found this helpful: https://www.smashingmagazine.com/2012/02/beginners-guide-jquery-based-json-api-clients/
Clyde
@hea-hea
Jun 10 2016 14:09
@JamesRiall Thanks, exactly what I was looking for :)
CamperBot
@camperbot
Jun 10 2016 14:09
hea-hea sends brownie points to @jamesriall :sparkles: :thumbsup: :sparkles:
:cookie: 299 | @jamesriall |http://www.freecodecamp.com/jamesriall
James Riall
@JamesRiall
Jun 10 2016 14:09
Clyde
@hea-hea
Jun 10 2016 14:10
cool
James Riall
@JamesRiall
Jun 10 2016 14:10
its actually not that complicated, it's just that there don't seem to be many good guides on setting up the API call. Once you have the JSON data loaded, it's a simple case of working with the object data
Clyde
@hea-hea
Jun 10 2016 14:11
right. and how to access it efficiently, I guess
now I have something to watch over the weekend :D thx again
James Riall
@JamesRiall
Jun 10 2016 14:11
no probs
Chase
@Belax8
Jun 10 2016 14:15
@hea-hea this series is pretty good too https://www.youtube.com/watch?v=fEYx8dQr_cQ
Clyde
@hea-hea
Jun 10 2016 14:20
@Belax8 thank you :)
CamperBot
@camperbot
Jun 10 2016 14:20
hea-hea sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 400 | @belax8 |http://www.freecodecamp.com/belax8
Yannick
@yannickhj
Jun 10 2016 14:31
Isn't it better to learn Javascript itself instead of jQuery only?
Shawn
@maple3011
Jun 10 2016 14:33
blob
hi guys, do you know how to set it didnt spacing after enter in brackets editor?
Chase
@Belax8
Jun 10 2016 14:33
@Yannickhj it depends on who you talk to
Chase
@Belax8
Jun 10 2016 14:39
"JQuery is used by 96.1% of all the websites whose JavaScript library we know. This is 70.3% of all websites." So jQuery is still super important https://w3techs.com/technologies/details/js-jquery/all/all
Yannick
@yannickhj
Jun 10 2016 14:39
@Belax8 Guess im talking to all experienced developers here as a student front-end dev
@Belax8 But if you are really good in Javascript you dont need jQuery I guess, and not using it saves space on the website
Chase
@Belax8
Jun 10 2016 14:43
@Yannickhj Yes, but jQuery also simplifies a lot of things. You can write less code to get things done. Also, if you are using a framework like Bootstrap, you need jQuery on your site anyways, so you might as well take advantage of it if it is there. But every project is different.
mcorby17
@mcorby17
Jun 10 2016 14:43
@GregatGit @jdtdesigns here is my pen https://codepen.io/mcorby17/pen/xOwBzB?editors=0011 Should I use http://api.openweathermap.org/data/2.5/weather? as the API url then? there's no /json in the call
Yannick
@yannickhj
Jun 10 2016 14:44
@Belax8 Hmm yea true, guess it depends on the framework and project etc. Also just saw jQuery 3 is released today and they say its faster etc. https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/
Chase
@Belax8
Jun 10 2016 14:46
@Yannickhj Cool. I didn't know that. I'll have to check it out.
Tonye Iyalla
@tiyalla
Jun 10 2016 14:49
Hey y'all. I'm currently working on my wiki viewer. Can anyone help me figure out how to move the div containing the text 'made by tonye' to the next line. I want to position it underneath the search/submit area. Here is a link to my project http://codepen.io/tiyalla/pen/XKXegj/
Cameron Burkholder
@Cameron-Burkholder
Jun 10 2016 14:50
I made my API call to open weather map, and then I printed the stringified results to a div I have on my page, but nothing shows up. Did I make the api call correctly?
https://codepen.io/CameronBurkholder/pen/mEegGq
mcorby17
@mcorby17
Jun 10 2016 14:56
@Cameron-Burkholder i think you might need the "http://" before your api call
Cameron Burkholder
@Cameron-Burkholder
Jun 10 2016 14:58
@mcorby17 I'll try adding that.
mcorby17
@mcorby17
Jun 10 2016 14:59
@Cameron-Burkholder I'm stuck on the same thing :/
John Delaney
@jdpunk1
Jun 10 2016 15:02
@tiyalla if you're using bootstrap you could place the elements in rows?
Tbuglc
@tbuglc
Jun 10 2016 15:04
Help on this please, Scroll spy is not working what's wrong http://codepen.io/tbuglc/pen/zBvzRM
CamperBot
@camperbot
Jun 10 2016 15:04
no wiki entry for: on this please scroll spy is not working whats wrong httpcodepeniotbuglcpenzbvzrm
Cameron Burkholder
@Cameron-Burkholder
Jun 10 2016 15:06
@mcorby17 It still didn't work. At least its good to know someone is suffering through the same thing.
mcorby17
@mcorby17
Jun 10 2016 15:07
@Cameron-Burkholder lol our suffering bonds us
Cameron Burkholder
@Cameron-Burkholder
Jun 10 2016 15:07
True. If one of us figures this thing out, he needs to help the other one. @mcorby17
Chase
@Belax8
Jun 10 2016 15:10
@tbuglc you need to change your <body> tag to this <body data-spy="scroll" data-target=".navbar"> and then you need to add jquery and bootstrap.js to your pen
Tbuglc
@tbuglc
Jun 10 2016 15:15
@Belax8 : thanks!
CamperBot
@camperbot
Jun 10 2016 15:15
tbuglc sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 401 | @belax8 |http://www.freecodecamp.com/belax8
Tbuglc
@tbuglc
Jun 10 2016 15:15
it works
Chase
@Belax8
Jun 10 2016 15:15
@tbuglc awesome!
Tonye Iyalla
@tiyalla
Jun 10 2016 15:16
@jdpunk1 thanks!
CamperBot
@camperbot
Jun 10 2016 15:16
tiyalla sends brownie points to @jdpunk1 :sparkles: :thumbsup: :sparkles:
:cookie: 321 | @jdpunk1 |http://www.freecodecamp.com/jdpunk1
KevinRiv
@KevinRiv
Jun 10 2016 15:20
Hello. I'm working on my personal portfolio webpage, and I have no clue on what to do in regards to navigating a single page using jquery. Specifically, I have no clue as to how I click on a nav button and move on the screen.
mcorby17
@mcorby17
Jun 10 2016 15:22
@KevinRiv I think w3schools.com might have something about that under jQuery
I'd look myself but i'm a bit busy at the moment
KevinRiv
@KevinRiv
Jun 10 2016 15:22
I'll take a look, thanks for the info. Just feeling overwhelmed by jquery and javascript, so I'm looking for any bit of info I can. Thanks again!
Chase
@Belax8
Jun 10 2016 15:24
@KevinRiv there is a way to do it without jquery or javascript. Here is an example http://codepen.io/Belax8/pen/NrxBNG
Philip Eckert
@pae4557
Jun 10 2016 15:24

var lat = 0;
var long = 0;

if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
lat = position.coords.latitude;
long = position.coords.longitude;
$("#location").html("latitude: " + lat + "<br>longitude: " + long);

});
}

console.log(lat);
console.log(long);

Any idea why lat and long still end up being 0?
KevinRiv
@KevinRiv
Jun 10 2016 15:26
@Belax8 Thank you for the reply! Is that just the normal HTML a usage (by just naming the div the same as the a link, it jumps to it?
CamperBot
@camperbot
Jun 10 2016 15:26
kevinriv sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 402 | @belax8 |http://www.freecodecamp.com/belax8
Stephen James
@sjames1958gm
Jun 10 2016 15:26
@pae4557 Because the getCurrentPosition is asynchronous and your console.log's happen before the callback from getCurrentPosition
Chase
@Belax8
Jun 10 2016 15:27
@KevinRiv Yep I think it only works with IDs. I don't think it works with classes, but I'm not sure. It's a super basic way to do it, but it works if you don't want to get super fancy.
Philip Eckert
@pae4557
Jun 10 2016 15:28
So how do I make it not asynchronous? @sjames1958gm
KevinRiv
@KevinRiv
Jun 10 2016 15:28
@Belax8 I definitely don't! Trying to teach myself Javascript to go on top of my HTML/CSS and I was getting overwhelmed by JS and jQuery so I'll try that. Thanks again!
CamperBot
@camperbot
Jun 10 2016 15:28
kevinriv sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:warning: kevinriv already gave belax8 points
Chase
@Belax8
Jun 10 2016 15:29
@KevinRiv anytime!!
KevinRiv
@KevinRiv
Jun 10 2016 15:33
@Belax8 I still can't get it to work correctly. At this point, I'm assuming my HTML is all screwy somewhere so it's not gonna work in my current set-up. But thanks for the info.
CamperBot
@camperbot
Jun 10 2016 15:33
:warning: kevinriv already gave belax8 points
kevinriv sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
Chase
@Belax8
Jun 10 2016 15:35
@KevinRiv If you share the link, I'll take a look at it and see if I can get it to work.
@Belax8 I'm thinking I've screwed something up in my fight to try and use Bootstrap when I don't really know it as well.
Toni Shortsleeve
@KoniKodes
Jun 10 2016 15:39
@KevinRiv I think it looks good except that you forgot to link to your About paragraph
Chase
@Belax8
Jun 10 2016 15:40
@KevinRiv It'll work. You need to add z-index: 100; to your CSS in your .nav this will make sure your nav stays on top of the page.
and like @KoniKodes said you need to add a div with the id of about
Toni Shortsleeve
@KoniKodes
Jun 10 2016 15:42
@Belax8 Thanks for the z-index: 100 to stay on top. I didn't know that.
CamperBot
@camperbot
Jun 10 2016 15:42
konikodes sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 403 | @belax8 |http://www.freecodecamp.com/belax8
KevinRiv
@KevinRiv
Jun 10 2016 15:43
@Belax8 @KoniKodes Thanks for the info. I added the z-index and the id to my about, but the nav buttons still aren't working. I think I'm gonna take a break and look at it with fresh eyes.
CamperBot
@camperbot
Jun 10 2016 15:43
kevinriv sends brownie points to @belax8 and @konikodes :sparkles: :thumbsup: :sparkles:
:warning: kevinriv already gave belax8 points
:cookie: 286 | @konikodes |http://www.freecodecamp.com/konikodes
Toni Shortsleeve
@KoniKodes
Jun 10 2016 15:45
Maybe if you place the id before class?
KevinRiv
@KevinRiv
Jun 10 2016 15:47
@KoniKodes Dang, I thought that was gonna work, but nope.
Toni Shortsleeve
@KoniKodes
Jun 10 2016 15:47
@KevinRiv Sorry. Let me look again.. I know you can do this.
Diego
@disofu234
Jun 10 2016 15:48
Hey guys, so just yesterday my quote machine project was working fine, but today none of the quotes are showing. Do any of you know why?
Toni Shortsleeve
@KoniKodes
Jun 10 2016 15:49
@KevinRiv Try putting your id inside the row div.
@disofu234 What is your codepen?
KevinRiv
@KevinRiv
Jun 10 2016 15:51
@KoniKodes Still nothing. I can only assume it's my wonky HTML/Bootstrap creation that something isn't where it's supposed to be?
it just worked when i clicked on it lol
Cameron Burkholder
@Cameron-Burkholder
Jun 10 2016 15:53
Does anyone know how to make the weather icons show up as icons and not text?
Diego
@disofu234
Jun 10 2016 15:53
for some reason it's not working from my code pen
Ethan Rose
@ethanrose
Jun 10 2016 15:54
I'm trying to make a button with an <i> </i> tag, as in icon.. how can I do that without making the text italicised?
KevinRiv
@KevinRiv
Jun 10 2016 15:55
@aidansven <button class="btn-primary"><i class="fa fa-facebook"><a href="#">Facebook</a></i> That's what I have for a Facebook button. My text isn't italicised.
Karolina Kluz
@karolinaKluz
Jun 10 2016 15:55
@aidansven don't put text inside <it> tag.
<i>
Toni Shortsleeve
@KoniKodes
Jun 10 2016 15:56
@disofu234 I've been reading that we now need to link to secure servers. https - that is a recent development.
Ethan Rose
@ethanrose
Jun 10 2016 15:56
ah ok.. I'm trying to use i instead of <button> because I currently have button and there's an annoying outline that stays after it is clicked
apparently that's a chrome/ff accessibility feature to outline buttons from what I read
and even when I try outline:nonel it doesn't go away
Diego
@disofu234
Jun 10 2016 15:59
@KoniKodes Thank you!
CamperBot
@camperbot
Jun 10 2016 15:59
disofu234 sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 287 | @konikodes |http://www.freecodecamp.com/konikodes
Chase
@Belax8
Jun 10 2016 15:59
@KevinRiv It seems to be working for me. I think the problem is that each div is really short, so it's hard to see the change. If you added more content I think it would be more noticeable
@KoniKodes thanks for your help too!!
CamperBot
@camperbot
Jun 10 2016 16:00
belax8 sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 288 | @konikodes |http://www.freecodecamp.com/konikodes
Toni Shortsleeve
@KoniKodes
Jun 10 2016 16:00
@aidansven try border:0 ?
KevinRiv
@KevinRiv
Jun 10 2016 16:01
@Belax8 Hmm, strange. I had kinda thought that might be an issue, but I can't even make it scroll from the about(top) to the contact portion. I might throw in some test <br> and see if I can notice then.
sudarshan gupta
@sudarshan395
Jun 10 2016 16:02
ineed urgent help please
Toni Shortsleeve
@KoniKodes
Jun 10 2016 16:03
I agree with @Belax8 . I can now go to about from the contact and portfolio.
@Belax8 Thank you. I have learned alot by watching your responses to the other campers.
CamperBot
@camperbot
Jun 10 2016 16:03
konikodes sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:warning: konikodes already gave belax8 points
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 16:11
hello guys
KevinRiv
@KevinRiv
Jun 10 2016 16:11
@KoniKodes Thanks for the help. I'm still not seeing anything move on my end, but I might have to keep playing with it.
CamperBot
@camperbot
Jun 10 2016 16:11
kevinriv sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:warning: kevinriv already gave konikodes points
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 16:13
I am having a problem. Whenever I copy and navigator code provided by FreeCodeCamp and place it in Codepen.io it does nothing. Is anyone else having this issue?
mcorby17
@mcorby17
Jun 10 2016 16:14
@RoniqueRicketts Do you have https:// in the codepen url in your browser?
That was my problem
KevinRiv
@KevinRiv
Jun 10 2016 16:14
@KoniKodes @Belax8 I just tried it on a different browser and it worked! Apparently I need to clear my Firefox cache and see if it works as well. Thanks so much!
CamperBot
@camperbot
Jun 10 2016 16:14
:warning: kevinriv already gave konikodes points
kevinriv sends brownie points to @konikodes and @belax8 :sparkles: :thumbsup: :sparkles:
:warning: kevinriv already gave belax8 points
Toni Shortsleeve
@KoniKodes
Jun 10 2016 16:15
@KevinRiv I am so glad! Happy Koding!
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 16:16
@mcorby17 gee thanks.
CamperBot
@camperbot
Jun 10 2016 16:16
roniquericketts sends brownie points to @mcorby17 :sparkles: :thumbsup: :sparkles:
:cookie: 275 | @mcorby17 |http://www.freecodecamp.com/mcorby17
KevinRiv
@KevinRiv
Jun 10 2016 16:16
@KoniKodes Thanks, you too. I'm sure I'll be back in the chat for a multitude of other reasons as I continue attempting to learn javascript/jquery.
CamperBot
@camperbot
Jun 10 2016 16:16
kevinriv sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:warning: kevinriv already gave konikodes points
Toni Shortsleeve
@KoniKodes
Jun 10 2016 16:18
@KevinRiv I'm in here a lot! You are always welcome.
Micah
@miciah123
Jun 10 2016 16:20
How come my navbar is all messed up
I want it to look similar to the one at w3 schools: http://www.w3schools.com/bootstrap/bootstrap_navbar.asp
nobody?
Chase
@Belax8
Jun 10 2016 16:25
@miciah123 ha ha I'm looking at it
Toni Shortsleeve
@KoniKodes
Jun 10 2016 16:26
@miciah123 I'm checking. Give me a few minutes?
@Belax8 :-)
Micah
@miciah123
Jun 10 2016 16:26
Oh sorry I was being a little impatient XD
@Belax8 @KoniKodes
Chase
@Belax8
Jun 10 2016 16:27
@miciah123 Have you also looked at the bootstrap docs? http://getbootstrap.com/components/#navbar
greg
@wearenotgroot
Jun 10 2016 16:29
@miciah123 try using ---------> <ul class="nav navbar-nav">
Tulio Natale
@tuliodnw
Jun 10 2016 16:29

people twi questions, one how can i make the this divs to overlap to make the simon game, 2 how can i remove the center of the 1/4 circles so i can put the start/counter in the game

http://codepen.io/tuliodnw/pen/ZOQjRr?editors=1100

Micah
@miciah123
Jun 10 2016 16:30
@wearenotgroot That worked! thank you
CamperBot
@camperbot
Jun 10 2016 16:30
miciah123 sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1115 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
mtkilic
@mtkilic
Jun 10 2016 16:30
I need help with my portfolio, when click any of the navbar I want make sure it moves to right <div>
Micah
@miciah123
Jun 10 2016 16:30
It's always the little typos grrr
greg
@wearenotgroot
Jun 10 2016 16:31
@miciah123 if you want to put them to the right just add navbar-right
Toni Shortsleeve
@KoniKodes
Jun 10 2016 16:34
@mtkilic first, add bootstrap and fonts inside your codepen settings. Then make your targets id instead of class.
Chase
@Belax8
Jun 10 2016 16:34
@mtkilic your links need to look the this <a href="#home">Home</a> and you need to add a div with the ID of home and that link will send you there
Toni Shortsleeve
@KoniKodes
Jun 10 2016 16:34
@miciah123 I know, it's those pesky little details that get me.
greg
@wearenotgroot
Jun 10 2016 16:36
@KoniKodes @miciah123 dont worry when you are working in real developement you have IDE and other tools to help you avoid most obvious mistake
Toni Shortsleeve
@KoniKodes
Jun 10 2016 16:37
@wearenotgroot :-) Yes, until then thank goodness for the kindness of campers
CamperBot
@camperbot
Jun 10 2016 16:37
konikodes sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1116 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Toni Shortsleeve
@KoniKodes
Jun 10 2016 16:40
@gerarddawson Looks Great!
mtkilic
@mtkilic
Jun 10 2016 16:43
@KoniKodes @Belax8 Thank you I looking in to it now
CamperBot
@camperbot
Jun 10 2016 16:43
mtkilic sends brownie points to @konikodes and @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 289 | @konikodes |http://www.freecodecamp.com/konikodes
:cookie: 404 | @belax8 |http://www.freecodecamp.com/belax8
isaacgg
@isaacgg
Jun 10 2016 16:45
Hey guys, I have a problem with the weather app. My getJSON isn't responding. I have access codepen like https because otherwise I can't access my localitation, but I think that's the reason why getJSON isn't respondind, because the weather app query is http. How can I solve this?
I think we can choose the country of the person by ip information
Coy Sanders
@coymeetsworld
Jun 10 2016 16:57
@isaacgg @KatGeek what APIs are you using for weather?
and how are you getting coordinates? navigator.geolocation?
Toni Shortsleeve
@KoniKodes
Jun 10 2016 16:57
@isaacgg Your console shows the lon/lat. http://forum.freecodecamp.com/t/openweathermap-api-has-some-issues-over-https/5028 addresses this. I use wunderground and it seems to work.
Coy Sanders
@coymeetsworld
Jun 10 2016 16:58
you can't use https with openweathermap if you have free account
they only give you non-secure i.e. http
isaacgg
@isaacgg
Jun 10 2016 16:59
So should I change the api?
Coy Sanders
@coymeetsworld
Jun 10 2016 16:59
and you can't mix a non-secure protocol (openweatherapp) inside a secure connection (https on codepen)
if wunderground gives you free https access you can do it that way, or get your coordinates a different way
some people have used http://ip-api.com/json to get coordinates, for example
Toni Shortsleeve
@KoniKodes
Jun 10 2016 17:00
@isaacgg Yes, I think you should change the api in this case.
Coy Sanders
@coymeetsworld
Jun 10 2016 17:00
this would prevent the need to use https at all and you can still use openweathermap
KatGeek
@KatGeek
Jun 10 2016 17:00
ok, thanks @coymeetsworld !! I'll do that!
CamperBot
@camperbot
Jun 10 2016 17:00
katgeek sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 1120 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
isaacgg
@isaacgg
Jun 10 2016 17:00
Ok thanks @coymeetsworld @KoniKodes I will try wunderground
CamperBot
@camperbot
Jun 10 2016 17:00
isaacgg sends brownie points to @coymeetsworld and @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 290 | @konikodes |http://www.freecodecamp.com/konikodes
:star2: 1121 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Jun 10 2016 17:00
np guys good luck
Nikhil Goyal
@ngoyal100894
Jun 10 2016 17:05
Hi I am buliding my first web app using javascript and fetching data using API from www.openweathermap.org/ I have used the API key as mentioned in the documentation still it is giving an error of unauthorization. Can there be any other reason for this error while calling a function or so . Thank you in advance.
 var APPID = "21d131e2d9af8ec17907e9ef18a79fd2";
    var temp;
    var loc;
    var icon;
    var wind;
    var humidity;
    var direction;
    function updateByZip(zip){
      var url = "http://api.openweathermap.org/data/2.5/weather?" + 
                "zip = " + zip +
                "&APPID =" + APPID ;
    sendRequest(url);
     }
Coy Sanders
@coymeetsworld
Jun 10 2016 17:08
@ngoyal100894 you should look at using the getJSON function instead of sendRequest
Nikhil Goyal
@ngoyal100894
Jun 10 2016 17:09
Yeah but I was following a youtube a tutorial where he did the same
https://www.youtube.com/watch?v=TGFozfL0D9o&list=PL7C8fMD-89DLXOLuwjofJJ9smB_LmVGeu&index=2
Then what could be the possible reason that i am getting it wrong
Coy Sanders
@coymeetsworld
Jun 10 2016 17:09
sendRequest makes a more generic GET request but getJSON will do alot of things for you to simplify the process
dont know why that person did it that way
so you would have to review that video again to see what they did, but getJSON will be much simpler to do
Nikhil Goyal
@ngoyal100894
Jun 10 2016 17:14
Yeah I will explore this one ..So we can get error while sending request right?
error:401
how's it looking to you guys?
any design tweaks you would make?
whoops forgot my unselectable class in my codepen version
Nikhil Goyal
@ngoyal100894
Jun 10 2016 17:16
function sendRequest(url){
    var xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = function(){
        if(xmlhttp.readystatechange == 4 && xmlhttp.status == 200){
            var data = JSON.parse(xmlhttp.responseText) ;
            weather = {}; 
            weather.wind = data.wind.speed; 
            weather.direction = data.wind.deg;
            weather.loc = data.name;
            weather.temp = data.main.temp;
            weather.icon = data.weather[0].id;
            weather.humidity=data.main.humidity;
            update(weather);
        }
    };
 xmlhttp.open("GET", url, true);
 xmlhttp.send();
}
This is the function that I am using and the console says error 401:unautorized followed by the URL and then file name with line number : which is xmlhttp.send();
@coymeetsworld
Coy Sanders
@coymeetsworld
Jun 10 2016 17:18
I am not familiar with using XMLHttpRequest, so I can't really help out any further
@ngoyal100894
i will suggest again, use getJSON
much simpler code that way, and you already have exposure to it in previous challenges
Trevor Hunka
@Grizvok
Jun 10 2016 17:19
not to mention professional companies are migrating away from xml pretty quickly
well
i guess the data format is still json right
but xml requests work different across browsers which is why jquerys getJSON is so good
because it is consistent
Samuel Cupidon
@Zerazera
Jun 10 2016 17:20
I remember like 10 years ago XML was all the rage and everyone was saying that XML would take over the world, everything was going to be an XML document, etc.
Trevor Hunka
@Grizvok
Jun 10 2016 17:21
needs to be renamed AJAJ
lol
Coy Sanders
@coymeetsworld
Jun 10 2016 17:22
not so much the point though, that API returns data with JSON
so why not use a function that will expect and process it for you? Much less code needs to be written and the code you have to write will be much cleaner
Trevor Hunka
@Grizvok
Jun 10 2016 17:23
agreed
Samuel Cupidon
@Zerazera
Jun 10 2016 17:23
If I remember correctly there are like 3 versions of XMLHttpRequest you have to call to account for browser differences... or you could use jQuery, which abstracts all that away
Nikhil Goyal
@ngoyal100894
Jun 10 2016 17:23
Okay will try that one now .. will have to explore
thanx everyone ..
Bruce Young
@mutantspore
Jun 10 2016 17:23
This message was deleted
Trevor Hunka
@Grizvok
Jun 10 2016 17:24
go through the json and api section again
Coy Sanders
@coymeetsworld
Jun 10 2016 17:24
np good luck
Trevor Hunka
@Grizvok
Jun 10 2016 17:24
though i will warn you not to use the .filter method of arrays show you to use (a pretty bad oversight) since your api isnt likely to return an array
Coy Sanders
@coymeetsworld
Jun 10 2016 17:25
yes getJSON is a jQuery function, also much cleaner to write than an .ajax call
Trevor Hunka
@Grizvok
Jun 10 2016 17:25
just use bracket or dot notation to access what you need
Nikhil Goyal
@ngoyal100894
Jun 10 2016 17:33
Anyone can suggest me a reference study link or something for getting data with getJSON
greg
@wearenotgroot
Jun 10 2016 17:40
@ngoyal100894 docs----------->http://api.jquery.com/jquery.getjson/ as for getting data that will depend on the api
Nikhil Goyal
@ngoyal100894
Jun 10 2016 17:56
thanx @wearenotgroot
CamperBot
@camperbot
Jun 10 2016 17:56
ngoyal100894 sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1119 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Victor Vega
@SyntaxErrorless
Jun 10 2016 18:02

Hello there!

I’m currently working on my portfolio page and I’m trying to add a dropdown nav button to it. I’ve messed around with the code for a little while, but I can’t seem to get why the dropdown menu won’t actually pop up. I can get the list of buttons to appear on their own, and the dropdown button itself, but it does nothing when I click it. I was wondering if anyone knew how I could get it to work?

<nav>
      <div class="container-fluid" id="myNav">
        <ul class="nav nav-pills pull-right">

          <!-- Dropdown Button -->
          <li role="presentation" class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
              <i class="fa fa-list fa-2x" aria-hidden="true"></i>
            </a>

            <!-- Buttons Inside -->
            <ul class="dropdown-menu">
              <li><a href="#aboutTitle">Who Am I?</a></li>
              <li><a href="#">What Do I Know?</a></li>
              <li><a href="#">What Have I Done?</a></li>
              <li><a href="#">How To Reach Me</a></li>
            </ul>

          </li>
        </ul>

      </div>
</nav>
Bruce Young
@mutantspore
Jun 10 2016 18:04
@SyntaxErrorless I’m sure you have bootstrap.css loaded but it needs 2 other files added. jQuery.js and bootstrap.js (in that order) in the JS settings in codePen. so you need 3 files
Dylan
@dhcodes
Jun 10 2016 18:04
@SyntaxErrorless what @mutantspore said. It's probably that you don't have all the files and yes, jquery then bootstrap in the JS menu
Victor Vega
@SyntaxErrorless
Jun 10 2016 18:06
I had all of those added except Bootstrap.min.js on the JS menu. Derr. Thanks, @mutantspore and @dhcodes !
CamperBot
@camperbot
Jun 10 2016 18:06
syntaxerrorless sends brownie points to @mutantspore and @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1728 | @mutantspore |http://www.freecodecamp.com/mutantspore
:cookie: 987 | @dhcodes |http://www.freecodecamp.com/dhcodes
Dylan
@dhcodes
Jun 10 2016 18:06
@SyntaxErrorless so it works?
hooray
Victor Vega
@SyntaxErrorless
Jun 10 2016 18:07
Yup! Now the button is too far to the right, so the buttons inside move away from the screen, but I know how to fix that. Again, thanks!
Dylan
@dhcodes
Jun 10 2016 18:08
np
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:11
how do we style custom links?
like if I don't want my links to be by default blue but something like orange ?
Tulio Natale
@tuliodnw
Jun 10 2016 18:16
people im starting the simon challenge, first time using audio, do i put the sound when color is clicked or div is active?
tips welcome
UtkarshShukla7
@UtkarshShukla7
Jun 10 2016 18:17
@meetmangukiya
a{
color:orange;
}
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:17
and what if i dont want it underlined when i mouseover it?
Jack Reinke
@jreinke10
Jun 10 2016 18:19
Can someone help me with a margin issue. I didn't set any right or left margins on my header or following images. What is causing this http://codepen.io/jreinke10/pen/ZOQMwd
greg
@wearenotgroot
Jun 10 2016 18:19
@meetmangukiya
a:hover
{
  text-decoration:none;
}
UtkarshShukla7
@UtkarshShukla7
Jun 10 2016 18:19
@meetmangukiya yes that ^^
@jreinke10 Add bootstrap
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:22
ohh
thats cool man!
thanks @wearenotgroot
CamperBot
@camperbot
Jun 10 2016 18:22
meetmangukiya sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1121 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:28
How do we make width of a row in bootstrap grid equal?
for example:
<div class="row">
<h1 class="col-md-4"></h1>
<nav class="col-md-8">
    <a href=# class="col-md-4">{Placeholder}</a>
    <a href=# class="col-md-4">{Placeholder}</a>
    <a href=# class="col-md-4">{Placeholder}</a>
</nav>
</div>
Vinay Jaju
@vinay-jaju
Jun 10 2016 18:31
@jreinke10 Try making your image width:100% and height: auto
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:31
now what happens is that the height of h1 and the height of nav are different, how do we fix it?
Vinay Jaju
@vinay-jaju
Jun 10 2016 18:32
This message was deleted
@meetmangukiya Can you give your pens link?
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:33
@vinay-jaju actually I think I made a mistake in the example that actually solved my problem
I didn't use a div to wrap heading and nav together
Vinay Jaju
@vinay-jaju
Jun 10 2016 18:34
okay. cool
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:34
I just used class="row" inside the header tag which I wrapped around the h1 and nav
Jaren Escueta
@jarenescueta731
Jun 10 2016 18:35
@jdpunk1 @khaduch thanks! i can't believe i haven't spotted the console tab this whole time
CamperBot
@camperbot
Jun 10 2016 18:35
jarenescueta731 sends brownie points to @jdpunk1 and @khaduch :sparkles: :thumbsup: :sparkles:
:cookie: 323 | @jdpunk1 |http://www.freecodecamp.com/jdpunk1
:star2: 1294 | @khaduch |http://www.freecodecamp.com/khaduch
Here the link text of the nav bar isn't in center vertically, so I decided to use padding
I used
a{
     padding: 10% 0 10% 0;
}
But it turns out that it take 10 % of the page and not 10 % of the nav's height
How do I make it 10 % of nav's height?
George Phalen
@gphalen
Jun 10 2016 18:45
Can anyone answer a quick question about the Twitchtv project?
Dylan
@dhcodes
Jun 10 2016 18:46
@gphalen just ask it friend
someone will pick it up
@meetmangukiya maybe 10vh as your unit?
instead of 10%
Darryl Parks
@punchymango
Jun 10 2016 18:47
I'm having trouble with that one too
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:48
I need some help again. Really hating codepen right now!!!
George Phalen
@gphalen
Jun 10 2016 18:48
OK, let me know if this is phrased poorly, it's a tad confusing. Most of the channels that aren't streaming will have 'null' listed as their game, but some that aren't streaming have 'Creative' or 'Programming' listed as their game. Does 'Creative' or 'Programming' being listed as the game indicate that the channel isn't streaming?
Darryl Parks
@punchymango
Jun 10 2016 18:48
@RoniqueRicketts codepen is a bit frustrating to use sometimes
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:48
@dhcodes ok lets see
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:48
I have gotten my location based on the previous code that FCC gave us, I have added a few Jquery and now I am totally stuck nothing is happening
```
Darryl Parks
@punchymango
Jun 10 2016 18:49
you on the weather app? post it, we can take a look
greg
@wearenotgroot
Jun 10 2016 18:49
@gphalen if stream equals null means they are not streaming
Dylan
@dhcodes
Jun 10 2016 18:49
@gphalen i remember having to do two json calls to two different api locations to get all the info i needed
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:49
$(document).ready(function() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(function(position) {
      lat = position.coords.latitude;
      lon = position.coords.longitude;

      var api = 'http://api.openweathermap.org/data/2.5/weather?lat='+lat+'&lon='+lon+'&appid=2e79b0a46ce5ad9212eed4ea9f4cd8d6';
      $.getJSON(api, function(json) {
     $('#data').html('Lat:' + lat +'<br>Lon:'+ lon);
        alert(json.coord.long);
      });
    });
  }
});
Darryl Parks
@punchymango
Jun 10 2016 18:49
@dhcodes that's helpful, actually.
greg
@wearenotgroot
Jun 10 2016 18:49
@gphalen to determine if a channel is streaming you need to use /stream
Dylan
@dhcodes
Jun 10 2016 18:49
@RoniqueRicketts using chrome?
Darryl Parks
@punchymango
Jun 10 2016 18:49
@dhcodes thanks
CamperBot
@camperbot
Jun 10 2016 18:49
punchymango sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 990 | @dhcodes |http://www.freecodecamp.com/dhcodes
George Phalen
@gphalen
Jun 10 2016 18:49
@dhcodes yeah, I have to do one to the streams and one the the channel one.
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:50
This is my code. given that #data is a a div <h3> tag
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:50
@dhcodes not really. because the output of 10vh is nowhere close to 10% of nav's height
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:50
@dhcodes Yes I am using Chrome
Dylan
@dhcodes
Jun 10 2016 18:50
@meetmangukiya then use 2vh
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:50
I just want to center it vertically
Dylan
@dhcodes
Jun 10 2016 18:50
vh is view-port height
greg
@wearenotgroot
Jun 10 2016 18:50
@gphalen if you want info on the channel then use /channel (will not tell you if the stream is online or offline) otherwise all the info on that channel will be there
Dylan
@dhcodes
Jun 10 2016 18:50
oh...
@meetmangukiya have you tried
vertical-align: middle;
George Phalen
@gphalen
Jun 10 2016 18:50
Let me try to explain better. The following gives me correct information at present:
$.getJSON('https://api.twitch.tv/kraken/channels/'+members[i], function(data2) {





     if (data2.game==null || data2.game=='Creative' || data2.game=='Programming'){ body2.append(data2.display_name.link(data2.url)+ "is not currently streaming"  + "<br>");
                          }

      else
        body2.append(data2.display_name.link(data2.url)+ "is  currently streaming"  + data2.game + "<br>");
  }
    )}
Dylan
@dhcodes
Jun 10 2016 18:51
@RoniqueRicketts you won't be able to get html5 location via chrome
well, you can get the location but not pass it to the api
because the api is unsecured
George Phalen
@gphalen
Jun 10 2016 18:51
I'm just wondering if there are instances where channels with "creative" or "programming" as their game are sometimes streaming, because then I have to find something else.
Dylan
@dhcodes
Jun 10 2016 18:51
and chrome now only allows html5 location to be passed over https channels @RoniqueRicketts
@gphalen what's an example of a user with that?
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:52
ok so how will I pass my location to my api so that I can get my current weather?
George Phalen
@gphalen
Jun 10 2016 18:52
@dhcodes FreeCodeCamp
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:52
@dhcodes it dint work
greg
@wearenotgroot
Jun 10 2016 18:52
@gphalen what listed in the game doesnt tell you if they are online
Dylan
@dhcodes
Jun 10 2016 18:52
@RoniqueRicketts on chrome, you would need to use an ip location like www.ip-api.com
@meetmangukiya well boo
George Phalen
@gphalen
Jun 10 2016 18:52
@dhcodes the "streams" channel says they're not streaming, the channel says they have a game("Creative")
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:53
oh damn thanks @dhcodes
CamperBot
@camperbot
Jun 10 2016 18:53
roniquericketts sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 991 | @dhcodes |http://www.freecodecamp.com/dhcodes
Dylan
@dhcodes
Jun 10 2016 18:53
np
@gphalen so why not use the streams channel to determine if they are online or not?
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:53
@dhcodes boo ?? :confused:
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:53
@dhcodes ok so I have to use that ip-api and based on the location the api gives i'd pass that to myweather api?
Dylan
@dhcodes
Jun 10 2016 18:53
lol as in boooooooooo like what a crowd does @meetmangukiya
i'll go look at your codepen
one sec
greg
@wearenotgroot
Jun 10 2016 18:54
@gphalen those are just category of type stream
Dylan
@dhcodes
Jun 10 2016 18:54
@RoniqueRicketts correct
George Phalen
@gphalen
Jun 10 2016 18:54
@dhocdes the streams channel will print the ones that are streaming, but won't print the ones that aren't streaming for some reason.
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:54
thanks much man I have been stuck on this challenge for 3 week. omg. I even went to learn about xml and apis and even took another Jquery curse OH MY FREAKING GOSH!!!
greg
@wearenotgroot
Jun 10 2016 18:54
@gphalen only /streams will tell you if they are streaming
then you need to test the stream
$.getJSON('https://api.twitch.tv/kraken/streams/'+members[i], function(data) {
             if(data.stream !== null)
              {

              }
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:56
Got so frustrated I thought I wasn't actually learning anything. But now it all makes sense. AUUUGH!!!!. I could so punch google chrome right now if I could. :D
Meet Mangukiya
@meetmangukiya
Jun 10 2016 18:56
ok @dhcodes
Dylan
@dhcodes
Jun 10 2016 18:57
@RoniqueRicketts lol i hear you
@RoniqueRicketts they should really put a note on the project page
maybe i'll submit an issue for you
and then it can be my first commit :shipit:
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:58
Gee thanks dhcodes.
George Phalen
@gphalen
Jun 10 2016 18:59
@wearenotgroot the following code will print the ones that are streaming, but not the ones that aren't streaming.
Ronique Ricketts
@RoniqueRicketts
Jun 10 2016 18:59
@dhcodes can I get tagged to that Issue? I wanna follow it. I am the only one that reach this far in FCC in my city so I would like to give this info to those that are behind so that don't have to go through the problem I went through.
George Phalen
@gphalen
Jun 10 2016 18:59
if (data.stream!==null) {
         body.append("<br>" + data.stream.channel.display_name.link("https://www.twitch.tv/"+ data.stream.channel.display_name)+"is currently streaming" + data.stream.game + "on Twitchtv." +"<br>");
      }
       else
         body.append("<br>" + data.stream.channel.display_name.link("https://www.twitch.tv/"+ data.stream.channel.display_name)+"is not currently streaming");

      }
Dylan
@dhcodes
Jun 10 2016 19:01
@RoniqueRicketts sure. you can submit it if you want
Narendro
@Narendro
Jun 10 2016 19:01
hi guys
i'm in the middle of portfolio task
Dylan
@dhcodes
Jun 10 2016 19:01
@RoniqueRicketts i know they know about it, but maybe your issue could say that for the time being they should at least update the instructions
Narendro
@Narendro
Jun 10 2016 19:02
if I click about Us, how can it scroll down to that specific div?
Dylan
@dhcodes
Jun 10 2016 19:02
@Narendro check out anchor links
greg
@wearenotgroot
Jun 10 2016 19:02
@gphalen if the stream is null then you cant access
data.stream.channel
Dylan
@dhcodes
Jun 10 2016 19:03
@Narendro you pretty much give your section About Us and id="about"
and then your href on your button would be #about
Narendro
@Narendro
Jun 10 2016 19:03
i see
Dylan
@dhcodes
Jun 10 2016 19:03
well <a href="#about">
and it should jump it there
George Phalen
@gphalen
Jun 10 2016 19:03
@wearenotgroot I know...so I need something other than the https://api.twitch.tv/kraken/streams/
Narendro
@Narendro
Jun 10 2016 19:03
thanks @dhcodes
CamperBot
@camperbot
Jun 10 2016 19:03
:cookie: 992 | @dhcodes |http://www.freecodecamp.com/dhcodes
narendro sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
Dylan
@dhcodes
Jun 10 2016 19:03
@meetmangukiya quite the interesting problem you have here
greg
@wearenotgroot
Jun 10 2016 19:04
@gphalen what you can do is do a /channel first then store the data some how then do a /stream to determine if they are online
@gphalen update the status
George Phalen
@gphalen
Jun 10 2016 19:04
@wearenotgroot OK, I've been doing /stream first, maybe that will work, thanks
CamperBot
@camperbot
Jun 10 2016 19:04
gphalen sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1124 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
greg
@wearenotgroot
Jun 10 2016 19:06
@gphalen another thing you might want to create a more generalized functions. look for things that do the same things multiple times
Dylan
@dhcodes
Jun 10 2016 19:06
@meetmangukiya you still here?
Tulio Natale
@tuliodnw
Jun 10 2016 19:07
people im really stuck in the simon project, i dont know where to start the jquery, if someone can lend me a hand i will appreciate http://codepen.io/tuliodnw/pen/ZOQjRr?editors=0010
Meet Mangukiya
@meetmangukiya
Jun 10 2016 19:07
@dhcodes yup
Dylan
@dhcodes
Jun 10 2016 19:08
@meetmangukiya so i looked at how bootstrap does it. They set a height for the navbar and then add px padding to top and bottom. I did it and it works
so for ex.

nav {

dang
one sec
Darryl Parks
@punchymango
Jun 10 2016 19:08
Thanks for articulating that @wearenotgroot , finally got this one figured out
CamperBot
@camperbot
Jun 10 2016 19:08
punchymango sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1125 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Darryl Parks
@punchymango
Jun 10 2016 19:08
after bashing my head against it
Dylan
@dhcodes
Jun 10 2016 19:09
#nav {
    height: 50px;
}

#nav nav a {
  padding-top: 15px;
  padding-bottom: 15px;
}
@meetmangukiya
Narendro
@Narendro
Jun 10 2016 19:09
please review guys
greg
@wearenotgroot
Jun 10 2016 19:09
@punchymango O.o
Dylan
@dhcodes
Jun 10 2016 19:09
@tuliodnw do you mean you need help thinking about how to generate the functionality?
Alex Myers
@qckpckt
Jun 10 2016 19:09
Hi all, I’m looking to add a delay and a fade in animation to the function that populates the results in my wikipedia viewer project. Can I add something to .foreach to achieve this?
Dylan
@dhcodes
Jun 10 2016 19:09
of the game?
Ethan Rose
@ethanrose
Jun 10 2016 19:10
what's the best way to .fadeIn() my main content box? I put fadeIn at the end of my function, but right now the box still fades in before the text loads from the api
Dylan
@dhcodes
Jun 10 2016 19:10
@qckpckt you mean you want them all to fade in at once or individually at diff. rates?
Ethan Rose
@ethanrose
Jun 10 2016 19:11
is there a way to make sure that text loads before it fades in?
Dylan
@dhcodes
Jun 10 2016 19:11
@aidansven check out callbacks
@Narendro you might get better feedback in the codereview room, but I like it. It's hard to read the text on some divs though because of the bright backgrounds in the pictures
Meet Mangukiya
@meetmangukiya
Jun 10 2016 19:13
@dhcodes that worked