These are chat archives for FreeCodeCamp/HelpFrontEnd

20th
Aug 2016
Armaan Roshani
@armaanhammer
Aug 20 2016 00:09
Is there any reason why clicking the button generated from this: <a href="https://www.linkedin.com/in/armaan" class="btn btn-info" role="button"><i class="fa fa-linkedin-square"></i> LinkedIn</a> shouldn't take me to my linkedin page?
If I hover over it, the correct link appears, but actually clicking the button doesn't seem to do anyting.
Owlie
@Owlie
Aug 20 2016 00:11
Try opening it in a new tab. Add the target="_blank" to it.
It may be that codepen just won't open the page in the pen.
@armaanhammer Know what I mean?
Armaan Roshani
@armaanhammer
Aug 20 2016 00:15
@Owlie Thanks! That solved it. One of the user stories mentioned that too, but I didn't connect the dots.
CamperBot
@camperbot
Aug 20 2016 00:15
armaanhammer sends brownie points to @owlie :sparkles: :thumbsup: :sparkles:
:cookie: 319 | @owlie |http://www.freecodecamp.com/owlie
Owlie
@Owlie
Aug 20 2016 00:15
@armaanhammer Awesome. Thanks.
CamperBot
@camperbot
Aug 20 2016 00:15
owlie sends brownie points to @armaanhammer :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @armaanhammer |http://www.freecodecamp.com/armaanhammer
Armaan Roshani
@armaanhammer
Aug 20 2016 00:43
@ndburrus Thank you for those links! I feel a bit like I'm drinking out of a firehose right now. I've been working on this: http://www.w3schools.com/bootstrap/bootstrap_scrollspy.asp for a while now. I might branch off to one of the other ways instead.
CamperBot
@camperbot
Aug 20 2016 00:43
armaanhammer sends brownie points to @ndburrus :sparkles: :thumbsup: :sparkles:
:star2: 1685 | @ndburrus |http://www.freecodecamp.com/ndburrus
Norvin Burrus
@ndburrus
Aug 20 2016 01:07
@armaanhammer you're welcome! join the club! me too! enjoy! :palm_tree:
Lauren Conners
@laurenconners
Aug 20 2016 01:54
What do they use to make the single page split into different sections like in the portfolio example. Is that just < div > containers?
I'm not even sure what to search to learn what I need to do for that.
Owlie
@Owlie
Aug 20 2016 01:55
@laurenconners Yes. It's a div container set to the height of the viewport.
Lauren Conners
@laurenconners
Aug 20 2016 02:09
ok, good to know. Thanks!
George Miller
@GMiller64
Aug 20 2016 02:51
Good evening everyone. I just finished my tribute page project. I would welcome any constructive criticism as long as its constructive. https://codepen.io/GMiller64/full/qNwYmX/
coffeebeanzz
@coffeebeanzz
Aug 20 2016 02:54
@GMiller64 :+1: and it looks good on mobile
George Miller
@GMiller64
Aug 20 2016 02:57
@coffeebeanzz thanks. Going to let it sit for critique a bit before I mark it complete and move to the next project.
CamperBot
@camperbot
Aug 20 2016 02:57
gmiller64 sends brownie points to @coffeebeanzz :sparkles: :thumbsup: :sparkles:
:cookie: 983 | @coffeebeanzz |http://www.freecodecamp.com/coffeebeanzz
coffeebeanzz
@coffeebeanzz
Aug 20 2016 02:58
Np @GMiller64 :)
Owlie
@Owlie
Aug 20 2016 02:59
@GMiller64 Looks solid and clean. Very nice. I think the link color clashes with the gray a little but that might just be me.
muhamadamin1992
@muhamadamin1992
Aug 20 2016 02:59
Hello
Owlie
@Owlie
Aug 20 2016 03:02
@muhamadamin1992 Hello!
Chris Cullen
@123xylem
Aug 20 2016 03:11
@123xylem
SO CLOSE to finishing now... Just need help on 2 things http://codepen.io/123xylem/pen/AXwwPj?editors=1010
  1. How do i get my clear button to reset time to 0 ...
  2. Is there an inbuilt method for On button hold to increment the timer up?\
George Miller
@GMiller64
Aug 20 2016 03:19
@Owlie thanks. Changed it to a Light Steel Blue. I think it looks better plus I learned how to do that now.
CamperBot
@camperbot
Aug 20 2016 03:19
gmiller64 sends brownie points to @owlie :sparkles: :thumbsup: :sparkles:
:cookie: 322 | @owlie |http://www.freecodecamp.com/owlie
muhamadamin1992
@muhamadamin1992
Aug 20 2016 03:22
how you look at the portfolio code
George Miller
@GMiller64
Aug 20 2016 03:23
Pale Green looks even better :)
Owlie
@Owlie
Aug 20 2016 03:23
@GMiller64 Excellent. Looks good!
George Miller
@GMiller64
Aug 20 2016 03:24
Appreciate everyone's critique, going to go ahead and mark this one complete and hit the rack for the night. Thanks.
Chris Cullen
@123xylem
Aug 20 2016 03:39
http://codepen.io/123xylem/pen/AXwwPj?editors=1010
Is there a way to make my buttons increment on hold???
phanindra kumar mallempalli
@phani467
Aug 20 2016 04:16
Hi I was about to start first task
which is building tribute page
can any body tell how to get started on this
I got struck
coffeebeanzz
@coffeebeanzz
Aug 20 2016 04:18
Chris Cullen
@123xylem
Aug 20 2016 04:19
$("#plus1").click(function() { //Plus (break)
  time2+=60;
     $("#set2").text(getTime(time2));
}); //Plus Minus for BreakTime

var timeoutId=0;
function increment(){
  time2+=60;
 $("#set2").text(getTime(time2));
};

 $("#plus1").mousedown(function() { 
   timeoutId= setTimeout(increment, 100);
}).bind('mouseup mouseleave', function() {
    clearTimeout(timeoutId);
});
Can you help with my mouse hold increment button?
it kind of works
phanindra kumar mallempalli
@phani467
Aug 20 2016 04:21
@coffeebeanzz Hi I know some basics, but I don't what's the process which platform should I use to write code
coffeebeanzz
@coffeebeanzz
Aug 20 2016 04:24
codepen has separate windows for html, css, and javascript... for this challenge you will prbly just use the first two...so what you would normally type in script tags, you will put in css window without the script tags... all of your divs (if you use bootstrap), headers, p and other structure will go in the html window. you also need to add a css file to the little gear in the css window for it to work. the bootstrap one is a good one.. just google get bootstrap
phanindra kumar mallempalli
@phani467
Aug 20 2016 04:26
ok thank you.
coffeebeanzz
@coffeebeanzz
Aug 20 2016 04:28
np
they should really put more explanation in that challenge with an intro to codepen or at least a link to its documentation
Chris Cullen
@123xylem
Aug 20 2016 04:40
http://codepen.io/123xylem/pen/AXwwPj
Ive finished it!! Please Review my POMODORO!!!!!
Jerzz
@2cool4school
Aug 20 2016 05:19
html += "<div class='stream'>" + streamers[i] + "&emsp;" + status + "</div>";
does anyone know why this wont output my status variables to html???? it works in the console.log?
Elbert Cortez
@trip16661
Aug 20 2016 05:20
@2cool4school with just that nobody can really tell sorry
plus i dont see the point of the addition operator
Jerzz
@2cool4school
Aug 20 2016 05:21
@trip16661 my bad... heres the link to the codepen
it throws an error when i dont use it, i was thinking along the same lines as you on that
Elbert Cortez
@trip16661
Aug 20 2016 05:24
@2cool4school you would never use html
here is best practices
Jerzz
@2cool4school
Aug 20 2016 05:26
@trip16661 What do you mean, that I shouldn't use the .html jquery method?
Elbert Cortez
@trip16661
Aug 20 2016 05:27
$(</div>).addClass('stream')
.text(streamers[i] + " " + status )
.appendTo(".streams");
i mean in that way
Jerzz
@2cool4school
Aug 20 2016 05:28
@trip16661 Wouldn't that select all my closing tags for div elements?
Elbert Cortez
@trip16661
Aug 20 2016 05:29
also it need to be inside the function
sorry typo
<div/>
that create a self closing tag
its the same as <div></div>
again
it need to be inside the function
because when the page loads it says okay he tells me to execute this
$(".streams").html(html);
i do it so
changing the html to ""(an empty string)
then he tell me to do a request to some server looking for some information
and store that into the html variable
do you get what im saying?
Jerzz
@2cool4school
Aug 20 2016 05:33
So, what would I be appending to? What variable/element would I be selecting to use the method text on?
Elbert Cortez
@trip16661
Aug 20 2016 05:34
its called chaining
Jerzz
@2cool4school
Aug 20 2016 05:34
I think I understand, yes.
Elbert Cortez
@trip16661
Aug 20 2016 05:34
its the same
$(</div>).addClass('stream') < create a div adds a class
.text(streamers[i] + " " + status ) < edit the text of the selected div
.appendTo(".streams"); < appends to that div
it could easily be done like this
Jerzz
@2cool4school
Aug 20 2016 05:35
@trip16661 Okay, I'm going to look up chaining because the term rings a bell, and I feel like I should be experienced in it. Thanks for the help.
CamperBot
@camperbot
Aug 20 2016 05:35
2cool4school sends brownie points to @trip16661 :sparkles: :thumbsup: :sparkles:
:cookie: 459 | @trip16661 |http://www.freecodecamp.com/trip16661
Elbert Cortez
@trip16661
Aug 20 2016 05:35
$(</div>).addClass('stream').text(streamers[i] + "&emsp;" + status ).appendTo(".streams");
but for obvious reasonns it looks bad
we do it in that way to make the code more readable
and to make it more clean
you know what thing is what
and what it does
Jerzz
@2cool4school
Aug 20 2016 05:38
@trip16661 Yeah, I understand, thanks. Can I do $(</div class="className">) ?
CamperBot
@camperbot
Aug 20 2016 05:38
:warning: 2cool4school already gave trip16661 points
2cool4school sends brownie points to @trip16661 :sparkles: :thumbsup: :sparkles:
Jerzz
@2cool4school
Aug 20 2016 05:38
I'm assuming I can
@trip16661 Nevermind, that's redundant. xD We're already adding the class obviously...
@trip16661 Also it doesn't seem to be working for me, regardless of how I change the format. Unexpected token < in the selector.
@2cool4school as u can see you can do such
Elbert Cortez
@trip16661
Aug 20 2016 05:52
@2cool4school also another error i can spot is that you have this
$(document).ready()
for (var i=0;
it should be
$(document).ready(function() {
//ALL OF YOUR CODE
});
Jerzz
@2cool4school
Aug 20 2016 05:55
@trip16661 I was just experimenting with stuff that was a temporary change. I have it working now, but only halfway... If I add the div's inside the function, my streamers[i] value becomes undefined, if I do it outside the jQuery function, but inside the loop, it wont post any text whatsoever for the status variable. Do you mind taking another look at it since I've updated?
Elbert Cortez
@trip16661
Aug 20 2016 05:58
@2cool4school its because its outside of the scope of your function
you did put it
but in your loop not inside of the function that has the info
Jerzz
@2cool4school
Aug 20 2016 06:00
@trip16661 Well when it's inside the function my streamers value becomes undefined...
I expected the jQuery to be a challenge because it's new to me, but I keep getting these odd scope, or logical errors that I can't seem to understand why
Jerzz
@2cool4school
Aug 20 2016 06:07
There's something very distinct about jquery scopes, or something redundant. I can't even declare a variable outside the loop, set it to the streamers[i] (before entering the jquery function) and use it, its like it loops 12 times through the same data, my var 'name' stays the last element in my array
Sorin Ruse
@sorinr
Aug 20 2016 06:07
@2cool4school here is how i changed the js in twitchapp: twitchapp
Jerzz
@2cool4school
Aug 20 2016 06:07
and is outputted 10 times
@sorinr Wow, I don't understand the logical order jQuery follows... I should've just used .each I suppose... Idk why using the function x amount of times in a loop wouldn't execute in the same logical order as any other functions would? However, I really appreciate the tip, thanks.
CamperBot
@camperbot
Aug 20 2016 06:09
2cool4school sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 671 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Aug 20 2016 06:13
@2cool4school what do you mean by function x?
Elbert Cortez
@trip16661
Aug 20 2016 06:15
Sorin Ruse
@sorinr
Aug 20 2016 06:20
This message was deleted
Olga C
@Octopinky
Aug 20 2016 07:17
need help
function monkeyCount(n) {
var arr=[];
for(i=0;i<n;i++){
    console.log(i);
arr.push(i);
}
return arr;
}
Owlie
@Owlie
Aug 20 2016 07:20
@Octopinky What seems to be the problem?
Olga C
@Octopinky
Aug 20 2016 07:23
nothing. Just me, lol ;0
:)
looking to pair up though
jaiswalpragati
@jaiswalpragati
Aug 20 2016 08:23
please someone tell me how would i see my older project,when i open my profile of codepen i don't get it there.
Albert Brennan
@bluegreybolt
Aug 20 2016 08:37
@jaiswalpragati Click 'Pens' right at the top then select 'My public pens'.
@Owlie That finallyrobot.io logo looks really good.
Have you done design work before?
jonaz889
@jonaz889
Aug 20 2016 10:10
help format
CamperBot
@camperbot
Aug 20 2016 10:10
no wiki entry for: format
jonaz889
@jonaz889
Aug 20 2016 10:12

I need some help with the "Show Local Weather" challenge. I can't make it show my location this is my code.

 JAVASCRIPT:
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(function(position) {
      $(".data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
    });
  };

HTML:
<p class="data"></p>

it doesn't do anything

Chris Cullen
@123xylem
Aug 20 2016 10:15
Kenan
@kenanbalija
Aug 20 2016 10:17
jonaz880 try append instead of html?
CasiqueJhon
@CasiqueJhon
Aug 20 2016 10:19
https://codepen.io/zeusksiq/full/qNwKdy/ hope you guys like it! =)
Albert Brennan
@bluegreybolt
Aug 20 2016 10:19
@CasiqueJhon Looks good
You're missing the second quotation mark on your quote though
CasiqueJhon
@CasiqueJhon
Aug 20 2016 10:20
I can´t do it
Darth Skywalker
@adityaparab
Aug 20 2016 10:29
Always remember boys. Saying "I can do it" is the best way to get girls!
Chris Cullen
@123xylem
Aug 20 2016 10:36
i can do it i can do it i can do it
O do we have to do it irl?
Rostyslav
@BeerDRinker
Aug 20 2016 10:37
HELLO!!!
Please, look at my "Random Quote Machine"
Hope you like it!
Stay METALL!!!
:)
Sorin Ruse
@sorinr
Aug 20 2016 11:17
@BeerDRinker really nice. i would make shadows like: text-shadow: 0px 5px 5px rgba(0, 0, 0, 1);
Ajay Tanwar
@ajayt365
Aug 20 2016 11:20
https://codepen.io/ajayt365/pen/RRYOdk why font-family and font-weight:300 is not affecting the button "click it" ?
Sorin Ruse
@sorinr
Aug 20 2016 11:22
@BeerDRinker and for the .quote h3 i would add: text-shadow: 1px 1px 0px rgba(255, 255, 255, .3);to make it more readable
Rostyslav
@BeerDRinker
Aug 20 2016 11:23
ок
@sorinr thank you!
CamperBot
@camperbot
Aug 20 2016 11:23
beerdrinker sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 672 | @sorinr |http://www.freecodecamp.com/sorinr
Ajay Tanwar
@ajayt365
Aug 20 2016 11:30
can anyone help?
Bhushan Patil
@mrpatil007
Aug 20 2016 11:33
@ajayt365 which tyoe of help you need
Ajay Tanwar
@ajayt365
Aug 20 2016 11:35
button is not responding to styles whereas the other two boxes doing fine . i added .box class to all 3 of them and set font-weight:300 . the first two showed change but button didn't. why ? @mrpatil007
Tomáš Kalný
@Sleepy-guy
Aug 20 2016 11:40
Hi I have a quick question can I select for example button with JQuery and run its onclick function ? (it already has onclick function but I also need computer to choose random button and run it's onclick function
Ajay Tanwar
@ajayt365
Aug 20 2016 11:48
i got it :)
Spyrantis Theodoros
@thodorisanta
Aug 20 2016 12:43
ok...how am i suppose to make a random quote generator by myself? lol the only thing i know is that i need an array of quotes and a random function. Any tips?
Stephen James
@sjames1958gm
Aug 20 2016 12:43
@Sleepy-guy I believe there is a way to click a button with jquery.
http://api.jquery.com/trigger/
@thodorisanta Start simple with a div or p tag with an id or class then figure out how to take a quote from an array and put the text/string into that HTML tag.
After that add a button that trigger JS to change the text. Style it up last
Ken Haduch
@khaduch
Aug 20 2016 12:49
@thodorisanta - definitely start "small" - make an array of quotes, use the random number generating function to select one of the entries in the array. Put a button on the page with a click function to call that function and just output the quote to console.log. Once you have that working, then decide on a style for the page - use a jumbotron, etc. It seems that most people eventually go the route of using a quote api - definitely makes it more interesting, but just get the basic mechanics working and take it from there if you want to.
Esterling Accime
@accimeesterlin
Aug 20 2016 12:55
Here is my Weather App. Let me know what you guys think. http://codepen.io/accimeesterlin/full/BzbLoE/
coffeebeanzz
@coffeebeanzz
Aug 20 2016 12:58
@accimeesterlin nice! Looks good on mobile and accurate :+1: i might would make the slider a little longer but i havent checked it in desktop
Tomáš Kalný
@Sleepy-guy
Aug 20 2016 12:59
@sjames1958gm thank you i will look at it , I tried to google but I ended up with results of jquery .on ('click' function
CamperBot
@camperbot
Aug 20 2016 12:59
sleepy-guy sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2735 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 20 2016 13:00
@accimeesterlin Like the loading... information - the spacing is a bit tight top to bottom. Also humidity and wind off to the left seem out of place.
For some reason it is showing the correct city but the wrong weather.
Esterling Accime
@accimeesterlin
Aug 20 2016 13:01
@coffeebeanzz , @sjames1958gm
It might an issue with the API @sjames1958gm
Stephen James
@sjames1958gm
Aug 20 2016 13:04
@accimeesterlin You need something between city and country (comma or space).
Esterling Accime
@accimeesterlin
Aug 20 2016 13:05
@sjames1958gm I think there is comma and space between cities and countries
Stephen James
@sjames1958gm
Aug 20 2016 13:09
@accimeesterlin http://api.openweathermap.org/data/2.5/weather?q=McKinneyUnited%20States&APPID=c852d718fa5a0379cf99144a177b7e74&units=imperial
Esterling Accime
@accimeesterlin
Aug 20 2016 13:11
@sjames1958gm you're talking about the API??
Ken Haduch
@khaduch
Aug 20 2016 13:18
@accimeesterlin - looks pretty nice. On a wide screen, the humidity and wind information is shifted off to the left below the other information. Not sure if you wanted to have it there, or if it is a leftover from development?
Stephen James
@sjames1958gm
Aug 20 2016 13:22
@accimeesterlin There is no space between McKinney and United - so I got the weather for washington DC
Esterling Accime
@accimeesterlin
Aug 20 2016 13:30
Ok got it @sjames1958gm , so that's why it gives you the wrong weather.
I'll go ahead and update that.
Thank you @sjames1958gm
CamperBot
@camperbot
Aug 20 2016 13:30
accimeesterlin sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2736 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 20 2016 13:30
@accimeesterlin Yes.
:checkered_flag:
Esterling Accime
@accimeesterlin
Aug 20 2016 13:32
@khaduch I wanted to have it like that, but it seems people think it's being shifted off. I'll go ahead and style it the same way as the others. Thank you @khaduch
CamperBot
@camperbot
Aug 20 2016 13:32
accimeesterlin sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1559 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Aug 20 2016 13:35
@accimeesterlin - okay - it seems that consistent styling would be a little better - at least centering it, if not making it the same size? I liked the look of your page. Nice and clean!
Esterling Accime
@accimeesterlin
Aug 20 2016 13:38
Thank you @khaduch .
CamperBot
@camperbot
Aug 20 2016 13:38
accimeesterlin sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: accimeesterlin already gave khaduch points
Sumit Kumar
@spark25
Aug 20 2016 13:45
my navbar is not collapsing and Home menu is not ative
https://codepen.io/spark25/pen/ZOkzOv
Sorin Ruse
@sorinr
Aug 20 2016 13:52
@spark25 first. load jquery and after bootstrap.js. after we will see
Sumit Kumar
@spark25
Aug 20 2016 13:55
@sorinr i want to make this without javascript
@sorinr but anyways i have added now
Al
@gobees
Aug 20 2016 15:25
how do i add an array as a new property for an object?
Stephen James
@sjames1958gm
Aug 20 2016 15:26
@gobees Just assign it, myObj[prop] = [] or myObj[prop] = [value]
Al
@gobees
Aug 20 2016 15:28
ok. thanks. better question to ask would have been how do I do this dynamically using JS?
Stephen James
@sjames1958gm
Aug 20 2016 15:29
That is js, not sure what dynamically means in this case.
Al
@gobees
Aug 20 2016 15:29
my task is to find an object that is missing an array property. then add that property (array).
Stephen James
@sjames1958gm
Aug 20 2016 15:30
@gobees Where is the value to add? in a variable?
Al
@gobees
Aug 20 2016 15:31
it comes as user input in the form of an argument to a function.
Stephen James
@sjames1958gm
Aug 20 2016 15:31
@gobees named value?
Al
@gobees
Aug 20 2016 15:31
working on the record collection waypoint. apologies if in the wrong forum.
Stephen James
@sjames1958gm
Aug 20 2016 15:31
contacts[i].tracks = [value]
Al
@gobees
Aug 20 2016 15:32
when I try what you typed above I get an error that the 'tracks' is not defined.
Stephen James
@sjames1958gm
Aug 20 2016 15:32
That will add value in a new array as the tracks property of the object contacts[i]
@gobees maybe more context is needed
Here or javascript
^^ shows the relevant code and the error
Stephen James
@sjames1958gm
Aug 20 2016 15:41
That tells me that collection[id] is the problem that it is undefined.
Al
@gobees
Aug 20 2016 15:45
hmmm
Mostafa Syam
@pro-mos
Aug 20 2016 16:06
hello guys, i was just trying to restructure my weather app js code then it suddenly broke :worried: :broken_heart:
Mostafa Syam
@pro-mos
Aug 20 2016 16:16
i found the problem is that i have var location = {} and then later i re-assign location with json data location = data;
why this causes a problem?
William Cabell
@wbac88
Aug 20 2016 16:18
Hi guys, I'm working on the Twitch.tv app and I've gotten all the user stories but the account closed notification. When I try to compare the JSON results of a closed account with an account that's just not streaming, it looks the same! What differentiates them?!?
http://codepen.io/William-cabell/pen/gryLrO
vtarun
@vtarun
Aug 20 2016 16:22
Hello everyone,
i need your help.
javascript problem "Everything Be True" .. i think there is a bug. In first case return value should be "false", not "true"
Stephen James
@sjames1958gm
Aug 20 2016 16:25
@vtarun Why do you think it should return false. Every object has "sex" and not falsy
Mostafa Syam
@pro-mos
Aug 20 2016 16:28
@wbac88 perhabs, use this link https://api.twitch.tv/kraken/users/brunofind404 and if you get 404 or 402, can't remember, then it's closed.
Stephen James
@sjames1958gm
Aug 20 2016 16:28
@pro-mos 422
Mostafa Syam
@pro-mos
Aug 20 2016 16:29
^^
William Cabell
@wbac88
Aug 20 2016 16:30
@pro-mos Got it, thanks!
Nicholas Vorraso
@nickeyvee
Aug 20 2016 16:30
can someone tell me why my #quoteBox element disappears for a fraction of a second after pressing my generate quote button a few times? http://codepen.io/nickey_vee/pen/YWBvpX
CamperBot
@camperbot
Aug 20 2016 16:30
wbac88 sends brownie points to @pro-mos :sparkles: :thumbsup: :sparkles:
:cookie: 319 | @pro-mos |http://www.freecodecamp.com/pro-mos
Sorin Ruse
@sorinr
Aug 20 2016 16:30
@wbac88 if result.status === 422 then "account is closed"
Nicholas Vorraso
@nickeyvee
Aug 20 2016 16:30
Get Quote button
vtarun
@vtarun
Aug 20 2016 16:30
@sjames1958gm ok... i got it. Thanks. i was doing some mistakes
CamperBot
@camperbot
Aug 20 2016 16:30
vtarun sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2739 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 20 2016 16:30
@vtarun :+1:
William Cabell
@wbac88
Aug 20 2016 16:31
@sorinr Tried that, but they're still showing up as offline, not closed for some reason
@sorinr @pro-mos So, to get that, I have to use https://api.twitch.tv/kraken/users/... to get the error message and https://api.twitch.tv/kraken/streams?channel= to get the rest of the data?
Mostafa Syam
@pro-mos
Aug 20 2016 16:35
exactly
William Cabell
@wbac88
Aug 20 2016 16:35
@sorinr @pro-mos OK, took me a second, thanks!
CamperBot
@camperbot
Aug 20 2016 16:35
wbac88 sends brownie points to @sorinr and @pro-mos :sparkles: :thumbsup: :sparkles:
:warning: wbac88 already gave pro-mos points
:cookie: 673 | @sorinr |http://www.freecodecamp.com/sorinr
Mostafa Syam
@pro-mos
Aug 20 2016 16:38
@wbac88 did you try to rely only on https://api.twitch.tv/kraken/streams/ seems it retruns an error if the account is closed or doesn't exist
William Cabell
@wbac88
Aug 20 2016 16:39
@pro-mos I used var api = "https://api.twitch.tv/kraken/streams?channel="; to begin my call, plus the channel name. As far as I could see, there wasn't a difference in the result from a closed account vs an offline account
William Cabell
@wbac88
Aug 20 2016 16:41
@pro-mos Hmm, maybe it's because I have the "channel" in there?
I didn't get a 422 on any of my results
Mostafa Syam
@pro-mos
Aug 20 2016 16:42
oh it seems the cause.
William Cabell
@wbac88
Aug 20 2016 16:45
Yes, ok, I changed that up and it seems to be working.
Thank you again, very helpful!
Gaurav Tolani
@Gauravtolani
Aug 20 2016 16:59
my javascript function is not working... can anyone help??
Alexander Domikov
@AlexanderDom
Aug 20 2016 17:03
@Gauravtolani you don't need to add <head>on codepen its like you're inside a <body>already
for attrfunction you must add string elements
what i mean is $(this).attr(data-name);doesn't work
$(this).attr('data-name');
same for price
for font awesome css you can add it in css settings part, explained in details here https://blog.codepen.io/documentation/editor/adding-external-resources/
William Cabell
@wbac88
Aug 20 2016 17:09
OK, I'm so close, but I'm getting an error on the ones that are closed "cannot read property "channel" of undefined" and so they are not showing up even though I have if(result.status === 422) in there:
http://codepen.io/William-cabell/pen/gryLrO
Any ideas?
Alexander Domikov
@AlexanderDom
Aug 20 2016 17:13
@wbac88 perhaps you must test other than `null``
hudsontaylor
@hudsontaylor
Aug 20 2016 17:14
Can someone please tell me why this pen is not working? I'm trying to display my coordinates in the div with an id of "coords". Here is the link: http://codepen.io/Hudson_Taylor11/pen/RROJrw
William Cabell
@wbac88
Aug 20 2016 17:14
@AlexanderDom What do you mean?
Stephen James
@sjames1958gm
Aug 20 2016 17:14
@hudsontaylor Are you using chrome?
William Cabell
@wbac88
Aug 20 2016 17:15
@hudsontaylor I'm getting the coordinates in there.
Alexander Domikov
@AlexanderDom
Aug 20 2016 17:15
@wbac88 you can test if your data have chanel in his answer or error
hudsontaylor
@hudsontaylor
Aug 20 2016 17:15
Yes, I just got them too! But, only in the pen I just embedded. Not in the actual pen...
Stephen James
@sjames1958gm
Aug 20 2016 17:15
@hudsontaylor If you are using chrome - chrome does not allow getLocation from http:// site.
hudsontaylor
@hudsontaylor
Aug 20 2016 17:16
Oh... How can I fix this?
Stephen James
@sjames1958gm
Aug 20 2016 17:16
@hudsontaylor Either use https:// or use a ip-api.com/json for ip based location.
William Cabell
@wbac88
Aug 20 2016 17:16
@AlexanderDom how would I test to an error vs answer?
Alexander Domikov
@AlexanderDom
Aug 20 2016 17:17
@wbac88 data.hasOwnProperty("error") something like this
you ask for channel info but if there are error there are no channel
hudsontaylor
@hudsontaylor
Aug 20 2016 17:18
Perfect! Thanks @sjames1958gm !
CamperBot
@camperbot
Aug 20 2016 17:18
:star2: 2744 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
hudsontaylor sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
William Cabell
@wbac88
Aug 20 2016 17:18
@AlexanderDom That makes sense, but I don't think I
m asking for channel.
Stephen James
@sjames1958gm
Aug 20 2016 17:19
@wbac88 Check result.status first before stream.
William Cabell
@wbac88
Aug 20 2016 17:19
@sjames1958gm So have that as my "if" and the others as the "else ifs"?
Stephen James
@sjames1958gm
Aug 20 2016 17:20
@wbac88 yes. because you have result.stream === null else if stream !== null it has to be one of those so it never gets to the last else if
Alexander Domikov
@AlexanderDom
Aug 20 2016 17:20
@wbac88 else if (result.stream !== null) followed by `<p>" + result.stream.channel.status + "</p>``
Stephen James
@sjames1958gm
Aug 20 2016 17:20
@wbac88 In the error case result.stream === undefined which is !== null
Alexander Domikov
@AlexanderDom
Aug 20 2016 17:20
result.stream !== null can be true if there no stream at all => error
Stephen James
@sjames1958gm
Aug 20 2016 17:21
@AlexanderDom :+1:
Alexander Domikov
@AlexanderDom
Aug 20 2016 17:21
:) thx @sjames1958gm
CamperBot
@camperbot
Aug 20 2016 17:21
alexanderdom sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2746 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
William Cabell
@wbac88
Aug 20 2016 17:21
@AlexanderDom @sjames1958gm Ahh, ok, let me try.
@sjames1958gm @AlexanderDom You guys are awesome, thank you! That would never have occurred to me. Still getting my head around the logic of that kind of thing.
CamperBot
@camperbot
Aug 20 2016 17:22
wbac88 sends brownie points to @sjames1958gm and @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 340 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
:star2: 2747 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Alexander Domikov
@AlexanderDom
Aug 20 2016 17:23
@wbac88 you're welcome :)
Stephen James
@sjames1958gm
Aug 20 2016 17:23
@wbac88 :+1: :checkered_flag:
hudsontaylor
@hudsontaylor
Aug 20 2016 17:30
I am having trouble with my JSON call for the weather app. So, when I attempt to get my location, I can only use 'https', but when I try to get my weather, I can only use 'http.' Here is my pen: http://codepen.io/Hudson_Taylor11/pen/RROJrw
greg
@wearenotgroot
Aug 20 2016 17:31
@hudsontaylor openweather api only works on https if you paid a premium for the key(free version of the key work on http)
hudsontaylor
@hudsontaylor
Aug 20 2016 17:32
So, is that the only way to solve this problem?
greg
@wearenotgroot
Aug 20 2016 17:32
@hudsontaylor well you can use other api othen than openweather if you want to use https all the way
hudsontaylor
@hudsontaylor
Aug 20 2016 17:33
Do you think that's what the instructors did?
I'm just trying to figure out how they expect us to do this...
Stephen James
@sjames1958gm
Aug 20 2016 17:33
@hudsontaylor You can try something like this site for getting sround this.
https://crossorigin.me/
@hudsontaylor When I initially did the project, get location worked over http:// it is a fairly recent chrome limitation.
greg
@wearenotgroot
Aug 20 2016 17:34
@hudsontaylor also, remember you are free to use whatever resources you need on these projects as long as you show your code and fullfill the use cases
hudsontaylor
@hudsontaylor
Aug 20 2016 17:35
That is a major bummer :( Thanks so much for your help guys!
hudsontaylor
@hudsontaylor
Aug 20 2016 19:22
I have another quick question. I am trying to get my celsius to fahrenheit (and vice versa) conversion working but my code only converts to celsius, but not back (i.e. it does not toggle). Any thoughts here is my pen: https://codepen.io/Hudson_Taylor11/pen/RROJrw?editors=0010
Josh Werner
@jshwrnr
Aug 20 2016 21:27
It toggles for me
Harindu Dilshan
@harindu95
Aug 20 2016 22:26
Twitch.tv api app - http://codepen.io/harindu95/pen/BzEAkm
can you guys review it?
_
Maria
@MariSimmons
Aug 20 2016 22:30
Hello, guys! Can you help? I'm only beginner. How to put the img in the center of the div (vertical positioning)?
Tiffany White
@twhite96
Aug 20 2016 22:51
Need some help with my tweet button for the Random Quote Generator
You can find my jsFiddle here: https://jsfiddle.net/trwhite6878/n6t23mtt/3/
I can't get the window to open to Twitter.
Owlie
@Owlie
Aug 20 2016 23:13
@jacobus-brogly Very nice jacobus. They both look and work great.
move your mouse over the screen