These are chat archives for FreeCodeCamp/HelpFrontEnd

20th
Oct 2016
Ian
@IMLaing
Oct 20 2016 00:03
@EastML Oh damn it I figured it out
Lamont Taylor
@mlamont8
Oct 20 2016 00:03
May have to use http for openweather...at least I did
Ian
@IMLaing
Oct 20 2016 00:03
Yes
lol
Micah Lewis
@EastML
Oct 20 2016 00:03
wth
Ian
@IMLaing
Oct 20 2016 00:04
change your link to http
Micah Lewis
@EastML
Oct 20 2016 00:04
woooooow
Ian
@IMLaing
Oct 20 2016 00:04
lol
Sorry man - I should have caught that -
Micah Lewis
@EastML
Oct 20 2016 00:04
I'll do that. Thanks @IMLaing and @mlamont8
CamperBot
@camperbot
Oct 20 2016 00:04
eastml sends brownie points to @imlaing and @mlamont8 :sparkles: :thumbsup: :sparkles:
:cookie: 372 | @imlaing |http://www.freecodecamp.com/imlaing
:cookie: 343 | @mlamont8 |http://www.freecodecamp.com/mlamont8
Ian
@IMLaing
Oct 20 2016 00:05
@thanks @mlamont8
thanks @mlamont8
CamperBot
@camperbot
Oct 20 2016 00:05
imlaing sends brownie points to @mlamont8 :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @mlamont8 |http://www.freecodecamp.com/mlamont8
Ian
@IMLaing
Oct 20 2016 00:05
;)
Lamont Taylor
@mlamont8
Oct 20 2016 00:07
np
Ian
@IMLaing
Oct 20 2016 00:10
@mlamont8 I like your portfolio site
Lamont Taylor
@mlamont8
Oct 20 2016 00:12
@IMLaing Thanks!
CamperBot
@camperbot
Oct 20 2016 00:12
mlamont8 sends brownie points to @imlaing :sparkles: :thumbsup: :sparkles:
:cookie: 373 | @imlaing |http://www.freecodecamp.com/imlaing
Ian
@IMLaing
Oct 20 2016 00:19
Very welcome @mlamont8 I like that you added in linux
Joy
@poemul7
Oct 20 2016 00:41
hello guys, I have yet to figure how to figure out how to place a text under an image in the tribute challenge; I mean I understand that they both need to be under a container fluid, I must be missing something in my code, anyways here it is:http://codepen.io/poemul7/pen/zKJXQE/
Michael Davis
@mhdavis
Oct 20 2016 00:44
So @poemul7 the way I would do it is I would include the <h1> in your div class container fluid
you can use "text-center" to center text within a container or div
and for your caption, you can give your caption <p> a specific id like <p id='caption'> and play with the margins in css
webjman
@webjman
Oct 20 2016 01:07
https://codepen.io/Zolutal/pen/bwmzjp I made a tribute page but after messing around a bit I realized it is extremely unresponsive, how would I go about fixing it?
my first go at this! Didn't use as much jQuery as I prolly should have. Just not real comfortable with it yet.
Ivan Pryymak
@primchuk
Oct 20 2016 02:17

Hi guys! I made this Tribute Page:
https://codepen.io/primchuk/pen/YGRAWj
and i have several questions. Could anybody help me?

I wonder how can I make 'thumbnail' and 'image' fit better, i mean, if you resize window to smaller, it fits perfectly. How can I do this to full-size window?
And another one: for keeping 'quote' in the middle I just used padding, which is bad(I think). How can I do this without padding?

I will be so grateful if somebody help me.

webjman
@webjman
Oct 20 2016 02:23
try adding these tags to the image: "img-responsive img-fluid center-block float-center"
Islam Ibakaev
@dagman
Oct 20 2016 02:23
i have recently started project and i choosed material-ui for ui library. the library seems to be the most popular. but i encountered the one big problem. the library uses inline styles for their compnent which makes customization very hard cos you need override these default styles to add your custom. Actually this situation enforces you to stick with inline styles styling strategy and use something like Radium and you now can't use css modules and sass. So i have switched to reac-toolbox that uses CSS Modules instead of inline styles. Why i wrote this? Just wanna say if you want to stick with css modules + sass styling strategy material-ui don't allow you to do it so pick react-toolbox
webjman
@webjman
Oct 20 2016 02:26
@primchuk and try adding width: 100%; in the css for the image
^I edited your code and actually just adding that will make it scale properly
img{
width:100%;
}
Ivan Pryymak
@primchuk
Oct 20 2016 02:29
@webjman wow, thanks a lot! I actually added width: 70% to the quote and set margin: auto, and it solved my problems.
Thank you again!
CamperBot
@camperbot
Oct 20 2016 02:29
primchuk sends brownie points to @webjman :sparkles: :thumbsup: :sparkles:
:cookie: 122 | @webjman |http://www.freecodecamp.com/webjman
no BS ;)
Sebastián Ventura
@sevgit
Oct 20 2016 02:56

I'm at a loss here. Doing "Missing Letters" on the algorithms course. I need to discover the missing letter on a string. So "abce" returns "d", "xz" terurns "y" and so on

Here's one of my last attempts, though I believe I've come closer to the answer on other iterations. My plan is to run through the string and check the charcode value of i, then I'll compare that to the charcode of (i+1) -1 and if they're different then that's where the problem is


function fearNotLetter(str) {

  var missing;

  for (i=0; i<str.length; i++) {
    if ((str.charCodeAt(i) + 1) !== str.charCodeAt(i + 1))
      missing = (str.charCodeAt(i + 1) -1);
  }
  return missing;
}

fearNotLetter("abcdefghjklmno");
JD Tadlock
@jdtdesigns
Oct 20 2016 03:12
@sevgit getting close, but you need to be checking if the letter next to str[i] is the next in the alpha sequence. You'll need str[i + 1], String.fromCharCode() and charCodeAt(). ;)
Sebastián Ventura
@sevgit
Oct 20 2016 03:19
I'm sorry @jdtdesigns but I didn't quite catch it. Isn't that what I'm doing in the if block? I mean, the if should check wether the next letter in the string is equal to the charcode of the previous one +1 right?
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 03:43
Ok, odd question here. If I for example make a <div id=" Title> does that need to have a closing </div>? or is it only classes that need em?
JD Tadlock
@jdtdesigns
Oct 20 2016 03:45
@EatSleepCodeSheit hmm, i'd go to codecademy and do the html/css course
@sevgit Your missing variable is null because you're not setting it to a letter
think over how you can use those methods i gave you to get it done ;)
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 03:51
@jdtdesigns you're one of those teachers who, when you ask a question, tell you to read your notes. Like nigga - if I had it in my notes I'd know. (I jest I jest - figured it out though, regardless of id/class etc etc all div (sections divisions) need a closing)
JD Tadlock
@jdtdesigns
Oct 20 2016 03:55
@EatSleepCodeSheit No, i'm one of those teachers who realize the student skipped the 2+2 in their homework before jumping to a0=1 (if a≠0)
you have to start from the bottom to get to top ;)
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 03:57
:thumbsup:
would read again.
You basically told me to do all of algebra to figure out if 2+2 = 4. but ye - do you lol
Palakurthi Durga Kiran Kumar
@durgakiran
Oct 20 2016 04:25
var array = [];
function steamRollArray(arr){
for(i=0;i<arr.length;i++){
     if(Array.isArray(arr[i]){
            steamRollerArray(arr[i]);
    }else{
       array.push(arr[i]);
}
}
return array;
}
how above code is infinite loop?
Ian Lee
@asparism
Oct 20 2016 04:28

why does

$("#person").html(simple[funRan][0]);
    $("#said").html(simple[funRan][1]);

run on document.ready as well as when i run the function they're in, but

    $(".twitter-share-button").attr("data-text", twPost);

will only run when the doc is ready? they're both inside the same function
and also

    $("#twitter").attr("data-text", twPost);

won't run, even though the same element with class="twitter-share-button" also has id="twitter"
any ideas?

c0d0er
@c0d0er
Oct 20 2016 05:22
could anybody help on the following code? it doesnt work now
function per(x){
    var source = [];     // source=dest[j];
var temp=[];
var dest = [];
    for(var k=0;k<x.length;k++){
        recursive(k)
    }
    function recursive(ch){
for (var i = 0; i <= source.length; ++i) {
  temp = source.slice(0);         
  temp.splice(i, 0, ch);          
  dest.push(temp); 
}

for(var j=0;j<dest.length; j++){
    source=dest[j];
}
return dest;
}
}
per('ab')//should return [['a','b'],['b','a']];
Ian Lee
@asparism
Oct 20 2016 05:33

@c0d0er not sure, maybe because in your recursive function, you're using the variable source, which was defined inside the function per, so unless you passed

recursive(k, source)

and then

function recursive (ch, source)

i think the scope of the source variable remains inside the first function, and can't be accessed by the second

or define
why is that line pink
c0d0er
@c0d0er
Oct 20 2016 05:36
@asparism thanks
CamperBot
@camperbot
Oct 20 2016 05:36
c0d0er sends brownie points to @asparism :sparkles: :thumbsup: :sparkles:
:cookie: 271 | @asparism |http://www.freecodecamp.com/asparism
Ian Lee
@asparism
Oct 20 2016 05:37
@c0d0er you're welcome
Annu Nirmal
@annunirmal
Oct 20 2016 06:01
topic: js calculator
can anyone help me find my mistake in my js code. buttons are not working
http://codepen.io/nirmalannu/pen/ALJOAP?editors=1010
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 06:55
@annunirmal Where are you assigning values to the element with "answer" ID? The buttons are working, check the console window. Your console.log statements are displaying the button values
AliceNan
@AliceNan
Oct 20 2016 07:32
Hello World! Hello cool coders! I am Alice from Beijing. I heard FreeCodeCamp from a friend @zhihu. I am new on programming. Hope to learn and practice much with you guys. Thank you.
CamperBot
@camperbot
Oct 20 2016 07:32

welcome to FreeCodeCamp @AliceNan!

Nitin Chandran Nair
@NitinNair89
Oct 20 2016 07:34
Welcome @AliceNan Good to have you here. All the best! :)
Artur Arsalanov
@kurumkan
Oct 20 2016 07:37
@AliceNan ni hao. huanying=)
@AliceNan zhe bian hai you yi ge chat room. Shi zhongwende.
Annu Nirmal
@annunirmal
Oct 20 2016 07:49
@NitinNair89 yeah i just saw. sorted . thanks alot :)
CamperBot
@camperbot
Oct 20 2016 07:49
annunirmal sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 275 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 07:49
You're welcome! @annunirmal :)
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:10
Guys, did you sign up to get the TwitchTV API key or hard-coded their response as suggested in http://forum.freecodecamp.com/t/use-the-twitchtv-json-api/19541 ?
kirbyedy
@kirbyedy
Oct 20 2016 08:12
@NitinNair89 you have to
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:13
@kirbyedy I have to what? hard-code or sign up?
kirbyedy
@kirbyedy
Oct 20 2016 08:13
sign up to get the client-id
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:14
then is it secure if the key is visible to the public on codepen and github?
and what are they going to do with it ?
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:14
I don't exactly know to "hide" api keys.. :(
kirbyedy
@kirbyedy
Oct 20 2016 08:14
did you do the weather project ?
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:14
Um, they can use that key without signing up, isn't it?
yes i did
kirbyedy
@kirbyedy
Oct 20 2016 08:15
and what did you do there ?
the api key is visible
I dont think you should worry
its not like you are giving your atm pin code
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:16
yes, that's what my point is :P
kirbyedy
@kirbyedy
Oct 20 2016 08:16
imagine its a school project
everybody has the similar result because everyone is doing the same bloody project
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:17
Then why did they mention it in the challenge? - "UPDATE: Due to a change in conditions on API usage explained here Twitch.tv now requires an API key, but we've built a workaround. Use https://wind-bow.hyperdev.space/twitch-api instead of twitch's API base URL (i.e. https://api.twitch.tv/kraken ) and you'll still be able to get account information, without needing to sign up for an API key."
twitch tv did not require a key before?
kirbyedy
@kirbyedy
Oct 20 2016 08:19
no the key was not needed until recently
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:20
ahh okay. Let me try then. Thanks @kirbyedy
CamperBot
@camperbot
Oct 20 2016 08:20
nitinnair89 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1472 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
kirbyedy
@kirbyedy
Oct 20 2016 08:20
I made mine before that, and it was working, but then it stopped so I had to get the client-id
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:20
hmm ok
kirbyedy
@kirbyedy
Oct 20 2016 08:21
https://wind-bow.hyperdev.space/twitch-api this link does not work for me
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:21
i think their server is down. It worked yesterday
kirbyedy
@kirbyedy
Oct 20 2016 08:22
hyperdev is working normally I just tried my projects
so its something with that specific one
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:23
ok
What do i provide in here - Redirect URI?
when registering a connection?
@kirbyedy
kirbyedy
@kirbyedy
Oct 20 2016 08:28
:point_up: October 20, 2016 11:14 AM check the link I gave you
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:29
it had localhost as the redirect URI
but i am not sure so asked
kirbyedy
@kirbyedy
Oct 20 2016 08:30
use the link to your codepen
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:30
and can i use that same connection while putting up code to gitHub?
kirbyedy
@kirbyedy
Oct 20 2016 08:31
try
Annu Nirmal
@annunirmal
Oct 20 2016 08:32
@NitinNair89 stuck at another problem ,at line 104 my round function is not working. because of which my operations are not working in my calcylator
http://codepen.io/nirmalannu/pen/ALJOAP?editors=1010
Smefinka
@Smefinka
Oct 20 2016 08:32
Hello ) please help me
how disable scrolling in bootstrap ?
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:36
@annunirmal shouldn't it be Math.round? I tried and got the 'ans' value as 'NaN'. Check it
Annu Nirmal
@annunirmal
Oct 20 2016 08:37
@NitinNair89 oaky let me try
@NitinNair89 not really
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:41
?
did u fix the issue?
Annu Nirmal
@annunirmal
Oct 20 2016 08:42
@NitinNair89 i tried removing round() , without roun dit is wprking well
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:43
good
fix the bug in 'ce' click event
:)
Annu Nirmal
@annunirmal
Oct 20 2016 08:47
@NitinNair89 what is it ?
@NitinNair89 i am still struggling with =
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 08:48
ahh ok
Artur Arsalanov
@kurumkan
Oct 20 2016 08:56
@Smefinka horizontal or vertical?
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 09:24
Can someone try out my game? I know there is little glitch, but I don't know how to figure that one out..a timing where it alerts you when someone wins or draws game but that happens before the final move is shown on the screen.http://codepen.io/pkshreeman/pen/KgQzzL?editors=0010
Shawn Kemp
@official-shawnkemp
Oct 20 2016 09:27
can i ask u something? should i pursue the python course or i go first with html5, css, angular ?
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 09:29
@00debug depends on what your goals is.
@00debug If you want to work on developing websites, then go with html/css
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 09:32
@pkshreeman call your colorme function before the alerts. This will ensure that the selected box is colored before deciding the winner
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 09:35
@NitinNair89 Thank you for looking. How do I do that? The alerts is nested inside color function, along with checker function as well which is also nested inside. Shall I make another variable, say..var gameoverQ, then if gameoverQ = true or something like that, I then call another function outside of colorme function?
CamperBot
@camperbot
Oct 20 2016 09:35
pkshreeman sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 276 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 09:36
Yeah, something like that should do, i guess. Try it. @pkshreeman
Shawn Kemp
@official-shawnkemp
Oct 20 2016 09:39
thank you! @pkshreeman
CamperBot
@camperbot
Oct 20 2016 09:39
:cookie: 342 | @pkshreeman |http://www.freecodecamp.com/pkshreeman
00debug sends brownie points to @pkshreeman :sparkles: :thumbsup: :sparkles:
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 09:39
@00debug No problem.
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 10:22
http://codepen.io/pkshreeman/pen/NREEAd?editors=0010 I still have same problem..you still there @NitinNair89 ?
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 10:23
Checking @pkshreeman :)
Stephen James
@sjames1958gm
Oct 20 2016 10:26
@pkshreeman Not sure this has any affect on the program in general but else if (this.id !== "blue" || "red") this is always true because the second part of the || is "red"
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 10:26
hmm
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 10:28
@sjames1958gm this.id depends on the buttons you press...first part of game asks you for color selection ..then second phase kicks in..that part only numbers will be part of this.id so it will not be red or blue.
Stephen James
@sjames1958gm
Oct 20 2016 10:29
@pkshreeman Ok, so this should always be true anyway because you already checked for "blue" or "red"
Frank
@skfwnelf
Oct 20 2016 10:30
I think I can't learn that much knowledge of html,css,json,etc. And I can't learn php here. Any learning resources recommendations?
thanks
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 10:30
@sjames1958gm right...that's always true after you selected color...otherwise, if you reset the game, it then reiterates.
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 10:30
@skfwnelf Did you check bento.io?
Frank
@skfwnelf
Oct 20 2016 10:30
what is that @NitinNair89
Amy Walters
@codecampamy
Oct 20 2016 10:31
@vinaypuppal Yes - I am entirely new to code pen so thank you so much for the link to this article :)
CamperBot
@camperbot
Oct 20 2016 10:31
codecampamy sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 626 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 10:31
@skfwnelf You asked for learning resources..
it's a website
Stephen James
@sjames1958gm
Oct 20 2016 10:31
@pkshreeman What issues are you having with the game?
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 10:32
it doesn't color the final color when you win or draw the game.
Frank
@skfwnelf
Oct 20 2016 10:32
Let me check it! Tx! @NitinNair89
CamperBot
@camperbot
Oct 20 2016 10:32
skfwnelf sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 277 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Amy Walters
@codecampamy
Oct 20 2016 10:33
@NitinNair89 I'd never heard of bento.io - thanks for the info!
CamperBot
@camperbot
Oct 20 2016 10:33
codecampamy sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 278 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Stephen James
@sjames1958gm
Oct 20 2016 10:33
@pkshreeman ah. Also, shouldn't you check the results of the user move before making the computer move?
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 10:33
i got it 3 days back :D i enjoyed their courses
Amy Walters
@codecampamy
Oct 20 2016 10:34
@vinaypuppal And I didn't know you could analyse the html in codepen either - another great tip to help me out - thanks again
CamperBot
@camperbot
Oct 20 2016 10:34
codecampamy sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:warning: codecampamy already gave vinaypuppal points
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 10:35
@sjames1958gm Good catch...I missed that one..let's see..
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 10:35
@pkshreeman before resetting the game, call the color function
Stephen James
@sjames1958gm
Oct 20 2016 10:35
@pkshreeman The problem is that you put up the alert in the same event loop as the setting of the last square so it doesn't get a chance to draw the square.
Try this where you call alerter()
setTimeout(alerter, 0);
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 10:36
@sjames1958gm didn't work...:(
@NitinNair89 looking into it...
Stephen James
@sjames1958gm
Oct 20 2016 10:37
@pkshreeman hmm, did for me. odd
@pkshreeman Without the () - you don't want to call alerter right there setTimeout(alerter, 0) not alerter()
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 10:39
just the function name without parenthesis
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 10:39
@sjames1958gm interesting...that works.
can you explain?
Stephen James
@sjames1958gm
Oct 20 2016 10:41
@pkshreeman Before that change you set the color and call alert, alert is synchronous so it blocks the rendering of the page (putting your color change on the screen)
If you reset the board after the alert then the color change is overwritten.
By using the timeout (even with 0) it gives the browser a chance to render your change before putting up the alert box.
Dr. Paul Kenneth Shreeman
@pkshreeman
Oct 20 2016 10:42
ok. awesome! I"m finally done with that one! Thank you very much @sjames1958gm Thank you too @NitinNair89 !
CamperBot
@camperbot
Oct 20 2016 10:42
pkshreeman sends brownie points to @sjames1958gm and @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 279 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
:star2: 3915 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 10:42
awesome!
good job :)
Stephen James
@sjames1958gm
Oct 20 2016 10:45
@pkshreeman :+1:
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 10:47
Can anyone explain why my collapsed nav bar doesn't work properly. Didn't touch it since yesterday and it doesn't work now lol
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 10:48
@EatSleepCodeSheit just reverse the order of your jquery imports
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 10:49
ok done - still doesn't work hm.
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 10:50
it works for me
refresh the page and try
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 10:50
Honestly, can you just be my personal little pocket programmer? becauase it doesn't work and then when you try and I try again it does.
@NitinNair89 ty
CamperBot
@camperbot
Oct 20 2016 10:50
eatsleepcodesheit sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 280 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 10:50
hahahaha :+1: @EatSleepCodeSheit
Surely, will help u whenever I can. No worries, that's why we are all here for :D
be sure to "save" the code
Annu Nirmal
@annunirmal
Oct 20 2016 11:05
topic: js calculator
help me fixing his bug. 8.2/5.1 gives 8/5.1. basically it removes 1st decimal from the equation
http://codepen.io/nirmalannu/pen/ALJOAP?editors=1010
cannelflow
@cannelflow
Oct 20 2016 11:09
how to change navbar color after certain height ? https://blackrockdigital.github.io/startbootstrap-agency/
Artur Arsalanov
@kurumkan
Oct 20 2016 11:12
@cannelflow I have made 1:1 copy of this template for my portfolio project. Initailly
but then I changed my mind and remade all from scratch
now I want to make a new portfolio=)
cannelflow
@cannelflow
Oct 20 2016 11:15
thanks @kurumkan let me try
CamperBot
@camperbot
Oct 20 2016 11:15
cannelflow sends brownie points to @kurumkan :sparkles: :thumbsup: :sparkles:
:cookie: 350 | @kurumkan |http://www.freecodecamp.com/kurumkan
Artur Arsalanov
@kurumkan
Oct 20 2016 11:15
welcome
cannelflow
@cannelflow
Oct 20 2016 11:15
@kurumkan :+1:
Simon Cordova
@gbsimon87
Oct 20 2016 11:39
http://codepen.io/gbsimon87/pen/BLGjbr
Hey guys, was wondering if someone could take a quick look at this Codepen of mine...
I'd like for the user to select a year from the dropdown menu...
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 11:40
i am able to select the year
MangoKing-IV
@MangoKing-IV
Oct 20 2016 11:43
Hi
How do you add images from your desktop to codepen
Simon Cordova
@gbsimon87
Oct 20 2016 11:46
@MangoKing-IV The way I know is to save them online and get the url...for example, save them onto imgur...then <imr src = ' url here ' />
<img**
MangoKing-IV
@MangoKing-IV
Oct 20 2016 11:46
I tried using imgur a while back but it still didnt show up for me
ill give it one more shot
MangoKing-IV
@MangoKing-IV
Oct 20 2016 11:57
Help
I tried to use the EXACT code from this website to see how a slideshow works on codepen
knowing codepen, it didnt work.
vínαч puppαl
@vinaypuppal
Oct 20 2016 12:00
@MangoKing-IV can you provide your codepen link
vínαч puppαl
@vinaypuppal
Oct 20 2016 12:01
@MangoKing-IV the problem is with images , those images are not loading up
MangoKing-IV
@MangoKing-IV
Oct 20 2016 12:03
Thanks vinay that was it
im going to try to upload them via imgur and try again
Can someone help me with one more thing
vínαч puppαl
@vinaypuppal
Oct 20 2016 12:03
@MangoKing-IV for just now try some placeholder images from
MangoKing-IV
@MangoKing-IV
Oct 20 2016 12:04
After the first 13 hours of freecodecamp im told to make a portfolio, but im stuck on one of the first steps, making a navbar
which was never covered in any of the subjects so far, this is forcing me to go learn from different websites and starting theyre course from scratch
What is the best way to learn about these things that are essential for a webpage but arent covered
Ive tried researching on w3, bootstraps website and stack overload, but being a beginner its hard to understand most of the code
Thanks @vinaypuppal
CamperBot
@camperbot
Oct 20 2016 12:06
:cookie: 627 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
mangoking-iv sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
vínαч puppαl
@vinaypuppal
Oct 20 2016 12:07
@MangoKing-IV The goal of FCC is to teach basic stuff and want you to "Read Search and Ask" while doing projects. So for portifolio this tutorial might help you to build one and learn some boostrap.css while building it http://www.w3schools.com/bootstrap/bootstrap_theme_me.asp
Good luck :smile:
MangoKing-IV
@MangoKing-IV
Oct 20 2016 12:07
Those placeholders are awesome !
Great help @vinaypuppal Thanks
CamperBot
@camperbot
Oct 20 2016 12:08
mangoking-iv sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:warning: mangoking-iv already gave vinaypuppal points
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 12:14
as @vinaypuppal said - Before you start your secaond project be sure to read up on your Bootstrap again. Responsive images, grids, how it all works. It will save you a headache as you go along. I just finished mine (yes it looks dull and stuff but it's functional :P) http://codepen.io/EatSleepCodeComplete/full/VKVkWV/ If I can do it anyone should be able to learn.
If you have a question about navbar and other things Stackoverflow + your question can honestly save you a lot of time. If they dont answer your question they usually link to a website that does
vínαч puppαl
@vinaypuppal
Oct 20 2016 12:18
@EatSleepCodeSheit Some images are broken in your page i think, don't use imgur. For place holders images try these sites :point_right: October 20, 2016 5:33 PM
And for your own images either use Dropbox or cloud image hosting services like http://cloudinary.com
@EatSleepCodeSheit And for free stock background images use http://unsplash.com
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 12:22
will do! :D ty @vinaypuppal
albertmillert
@albertmillert
Oct 20 2016 12:23
Hello! Can anyone please help me with my weather app project. I've done it. But seems like $.grtJSON is not working. I've deleted the rest of code from project to make it more visible.
https://codepen.io/albertmillert/pen/BLxVgO?editors=0011
vínαч puppαl
@vinaypuppal
Oct 20 2016 12:26
@albertmillert openweathermap API wont work on https thats the problem and navigator.geolocation works only on https on chrome. So the easiest solution is to use Weather Underground's autoip weather url which works over HTTP/HTTPS and gives you ip-based location + weather_data+icon_img_url all in one URL. https://api.wunderground.com/api/<API KEY>/conditions/q/autoip.json
Signup for API key here https://www.wunderground.com/weather/api/
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 12:27
I get my APIs in mashape.com . :)
albertmillert
@albertmillert
Oct 20 2016 12:28
All right thank you @vinaypuppal. I have wasted like few weeks looking for solution.... hahaha
CamperBot
@camperbot
Oct 20 2016 12:28
albertmillert sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 628 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
vínαч puppαl
@vinaypuppal
Oct 20 2016 12:29
@albertmillert Oh okay I also found it recently from one of Campers in this chat room only :smile: . Before i used https://forecast.io to support https but Weather Underground's autoip weather url is best to get all in one request. :smile:
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 12:49
ok so I changed a few things and now it looks funky as fuck @vinaypuppal how do I center those images so that they don't look so weird?
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 12:52
@EatSleepCodeSheit What changes did you make?
it looked fine before..
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 12:52
yarrr but i wanted to challenge my self to add abackground image lol
and i fucked it up
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 12:52
background image to what? jumbotron?
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 12:54
container
made it container-fluid full
instead of container
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 12:55
there's no 'full' class in bootstrap unless u define it yourself :)
EatSleepCodeSheit
@EatSleepCodeSheit
Oct 20 2016 12:56
yeah haha i was making full so I can add a background image without needed to change anything else. it was the fluid portion that fucked it all up
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 12:56
um..
ok
Kshitiz
@kshtzsharma48
Oct 20 2016 13:12
is there any free wirefraing tool out there on internet
vínαч puppαl
@vinaypuppal
Oct 20 2016 13:14
@kshtzsharma48 yes i use http://quirktools.com/wires/ but its very basic and free for only 3 projects i think
Kshitiz
@kshtzsharma48
Oct 20 2016 13:15
do you know advanced one @vinaypuppal
vínαч puppαl
@vinaypuppal
Oct 20 2016 13:17
@kshtzsharma48 I don't know any advanced one's but most of them offer atleast free for 1 project like https://www.invisionapp.com/plans
Kshitiz
@kshtzsharma48
Oct 20 2016 13:18
@vinaypuppal thanks dear
CamperBot
@camperbot
Oct 20 2016 13:18
kshtzsharma48 sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 629 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 13:19
Hello, I am working on the twitch TV challenge. I am able to get the response. Um, i just need some hints on how can i filter the output based on 'online' and 'offline'?
vínαч puppαl
@vinaypuppal
Oct 20 2016 13:19
@NitinNair89 if stream is null then offline else online
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 13:19
The code is not live, i am doing it on my localhost
Stephen James
@sjames1958gm
Oct 20 2016 13:20
@NitinNair89 Are you using the streams url? If so then the stream is null for offline
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 13:20
no, i am hitting the channel URL and if 'status==null', then it is offline
Miczysko
@Miczysko
Oct 20 2016 13:20

Hey guys i got problem with changing css background image using jquery
//Background image
$("#imageWeather").css('background-image', 'url("https://upload.wikimedia.org/wikipedia/commons/8/84/Morning_Sky_7.jpg")');

I already changed ' to " in url etc. saw a couple threads on stackoverflow and damn; nothin working. Setting background-image in css is working

Nitin Chandran Nair
@NitinNair89
Oct 20 2016 13:21
i am getting the output @sjames1958gm i want that when i choose the offline radio button, it should display only offline channels
Adhetya Narayan
@Adhetya
Oct 20 2016 13:21
This message was deleted
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 13:22
i am formatting the reponse in jQuery itself.. @sjames1958gm .. any idea?
Stephen James
@sjames1958gm
Oct 20 2016 13:23
@NitinNair89 Give offline entries a different class than online then use .hide() for the desired class
I am not sure if that is what your are asking.
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 13:23
get a good image url @Adhetya
@sjames1958gm so you mean, while formatting the response itself?
Adhetya Narayan
@Adhetya
Oct 20 2016 13:24
This message was deleted
Stephen James
@sjames1958gm
Oct 20 2016 13:25
@NitinNair89 When you are formatting the HTML for the page, give offline/online entries a different class then you can use $(".offline").hide();
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 13:26
i am doing something like this in javascript:
```
var resp='';
resp = resp + '<div>'+data+<'/div>;
return resp;
so how can i identify which channel is offline.. since there's only one data i get. anyways, i will try :)
Miczysko
@Miczysko
Oct 20 2016 13:27
@Miczysko nvm solved
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 13:27
Thanks @sjames1958gm
CamperBot
@camperbot
Oct 20 2016 13:27
nitinnair89 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3922 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Kshitiz
@kshtzsharma48
Oct 20 2016 13:31
MORE FREE WIREFRAMING TOOOLS
?
RaynnerB
@RaynnerB
Oct 20 2016 13:38
supp guys
Kshitiz
@kshtzsharma48
Oct 20 2016 13:44
WIREFRAMING TOOLS PLEASE ??
Stephen James
@sjames1958gm
Oct 20 2016 13:44
@RaynnerB Hey
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 13:44
@kshtzsharma48 Sorry mate, not aware of one.
RaynnerB
@RaynnerB
Oct 20 2016 13:46
im just getting started the personal portfolio
vínαч puppαl
@vinaypuppal
Oct 20 2016 13:46
@kshtzsharma48 You can google it :smile: you may find many like this link https://dcrazed.com/best-free-wireframe-tools/
kirbyedy
@kirbyedy
Oct 20 2016 13:46
@kshtzsharma48 :point_up: October 20, 2016 4:19 PM
RaynnerB
@RaynnerB
Oct 20 2016 13:47
@sjames1958gm hey stephen! :D
Stephen James
@sjames1958gm
Oct 20 2016 13:47
@RaynnerB :+1:
does this work in codepen?
EL QOMRI
@elqomri
Oct 20 2016 14:16
Hello,
has any one already make the Random quote machine ?
i have problem with the X-Mashape-Key
thanks
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:17
@elqomri Hello, Yes..I have used mashape key
how can i help you?
EL QOMRI
@elqomri
Oct 20 2016 14:18
@NitinNair89 i don't knew how to generate the key
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:18
have you signed up?
EL QOMRI
@elqomri
Oct 20 2016 14:18
yes
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:18
did you get the quotes API?
there's a search bar..search for the quotes api
EL QOMRI
@elqomri
Oct 20 2016 14:19
yes i found the api
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:19
you would see authorize option there
EL QOMRI
@elqomri
Oct 20 2016 14:20
where please
?
i have a button get the key
it give me a key but i can't access to the key
EgeKaya
@EgeKaya
Oct 20 2016 14:28
<div class="row"> <div class="col-md-3"><button class="btn btn-block"> Like</button></div> <div class="col-md-3"><button class="btn btn-block"> Share</button></div> <div class="col-md-3"><button class="btn btn-block"> Info</button></div> </div>
Hi, can someone please help me?
I want to have the three buttons in a row, but also centered relative to the page. They appear mostly on the right side.
Thanks in advance
<div class="row"> <div class="col-md-4"><button class="btn btn-block"> Like</button></div> <div class="col-md-4"><button class="btn btn-block"> Share</button></div> <div class="col-md-4"><button class="btn btn-block"> Info</button></div> </div>
```
<div class="row">
  <div class="col-md-4"><button class="btn btn-block"> Like</button></div>
  <div class="col-md-4"><button class="btn btn-block"> Share</button></div>
  <div class="col-md-4"><button class="btn btn-block"> Info</button></div>
</div>
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:31
PM me @EgeKaya
EgeKaya
@EgeKaya
Oct 20 2016 14:31
Sorry about that
Been trying to do from there for the last 5 hours
different methods
none worked
EgeKaya
@EgeKaya
Oct 20 2016 14:31
@NitinNair89 Sure. I'm Kinda new here, how do I PM you?
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:32
@cuble27 what's the error you get?
@elqomri You got the key yet?
Bogdan Cublesan
@cuble27
Oct 20 2016 14:34
Well, i got all of them I think.. As I said I tryied different methods with JSON and JSONP, both with $.getJSON and with $.ajax, Got the Access-Control-Allow-Origin has value null most often @NitinNair89
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:35
with your link, i can see the quote without any error @cuble27
Bogdan Cublesan
@cuble27
Oct 20 2016 14:35
I can too, but try puttin it in a script and run the html
and look in the console
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:36
you have a codepen?
Bogdan Cublesan
@cuble27
Oct 20 2016 14:36
no, I work in Atom
but I'll past it in codepen
wait 2 min
this was the simplest method I tried using
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:40
@cuble27 try using quote[0].content in your code
Bogdan Cublesan
@cuble27
Oct 20 2016 14:41
I do have a method with AJAX that doesn't give me any error, but just doesn't run. It gets to .fail
I tried, doesn't work with quote[0]
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:42
it works, i tried
quote[0] and then use DOT notation to access the key
Bogdan Cublesan
@cuble27
Oct 20 2016 14:43
did you try on codepen?
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:43
yes
i did
Bogdan Cublesan
@cuble27
Oct 20 2016 14:44
$.getJSON('http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1', function(quote) {
document.write(quote[0].content);
});
If I try this in codepen it doesn't give me anything
Stephen James
@sjames1958gm
Oct 20 2016 14:46
@cuble27 I tried your codepen link above and it worked for me as well ??
Bogdan Cublesan
@cuble27
Oct 20 2016 14:47
ok, works for me now..I don't know what happened
but ONLY in codepen
if I try this in a actual html file
XMLHttpRequest cannot load http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1. The 'Access-Control-Allow-Origin' header has a value 'http://null' that is not equal to the supplied origin. Origin 'null' is therefore not allowed access.
this pops up in console
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:48
hmm
did you search for it online?
Bogdan Cublesan
@cuble27
Oct 20 2016 14:49
Yes, been doing that for 5h, I feel like I'm the only one having this problem
Every method i found to solve it
I don't understand it
or is not explained well
Bogdan Cublesan
@cuble27
Oct 20 2016 14:50
I found some methods with php, but I don't use php for this
Didn't understand the answer
some things are strange to me from there
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:54
me too
Bogdan Cublesan
@cuble27
Oct 20 2016 14:54
help
!help
how can you write code in here?
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 14:55
check the markdown.. or just paste it here
albertmillert
@albertmillert
Oct 20 2016 14:57
Hello. I had a ton of problems with my weather app lately. Firstly i used wrong API, secondly I struggled with $.getJSON function and finally now something seems not to be working with switching temps after clicking onto a button. Can someone please take a look?
https://codepen.io/albertmillert/pen/BLxVgO?editors=0011
Bogdan Cublesan
@cuble27
Oct 20 2016 14:57
this is the only way that worked for me, but doesn;t launch (check the console)
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:04
something wrong with you navigation?
*your
the code never goes inside - navigator.geolocation.getCurrentPosition(function(position)
Alexie Nepeh
@Nepeh
Oct 20 2016 15:07
Help is needed please!!!!! I'm currently working on the intermediate project(Building a random quote machine) and I'm nearly done with everything except sharing the quotes on twitter.......please see my code.... http://codepen.io/Nepeh/pen/rrQqrZ
CamperBot
@camperbot
Oct 20 2016 15:07
no wiki entry for: is needed please im currently working on the intermediate projectbuilding a random quote machine and im nearly done with everything except sharing the quotes on twitterplease see my code httpcodepenionepehpenrrqqrz
Shawn Grooms
@SEGrooms
Oct 20 2016 15:11
Can someone explain why Twitch.tv will load in Safari, but no Chrome?
It was working fine yesterday, but not today.
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:11
@Nepeh Give your #post <a> tag a target='_blank' and use the below code:
$('#post').attr('href','https://twitter.com/intent/tweet?text="'+data.quoteText +'-'+ data.quoteAuthor);
instead of window.open, make use of the href attribute of your anchor tag. it will work
@SEGrooms what error? I am working on TwitchTV on chrome browser.
albertmillert
@albertmillert
Oct 20 2016 15:12
This message was deleted
Shawn Grooms
@SEGrooms
Oct 20 2016 15:12
@NitinNair89 which is why I’m confused, because I was about 10 minutes ago, but now it won’t load.
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:13
@albertmillert What's working?
still loads for me buddy @SEGrooms
albertmillert
@albertmillert
Oct 20 2016 15:13
This message was deleted
Shawn Grooms
@SEGrooms
Oct 20 2016 15:13
Hmm…it’s working fine on Safari for me, but not Chrome.
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:13
Oh ok..
Shawn Grooms
@SEGrooms
Oct 20 2016 15:14
@NitinNair89 I guess I’ll just restart Chrome and see what happens.
Bogdan Cublesan
@cuble27
Oct 20 2016 15:14
@NitinNair89 I used http://crossorigin.me/ for it and now it works, thank you
CamperBot
@camperbot
Oct 20 2016 15:14
cuble27 sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 281 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:14
Good work @cuble27 Don't thank me.. You did it yourself :)
CamperBot
@camperbot
Oct 20 2016 15:14
nitinnair89 sends brownie points to @cuble27 :sparkles: :thumbsup: :sparkles:
:cookie: 150 | @cuble27 |http://www.freecodecamp.com/cuble27
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:15
Thanks @camperbot :D
CamperBot
@camperbot
Oct 20 2016 15:15
nitinnair89 sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star2: 2509 | @camperbot |http://www.freecodecamp.com/camperbot
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:15
:P
Bogdan Cublesan
@cuble27
Oct 20 2016 15:15
Well, someone from HelpJavaScript sent me that link, so thank them, lol!
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:15
so thank them in that chatroom :D
Shawn Grooms
@SEGrooms
Oct 20 2016 15:15
@NitinNair89 I restarted chrome, and it’s working like a charm.
Bogdan Cublesan
@cuble27
Oct 20 2016 15:15
did it, but thank you for trying to help
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:16
haha.. good! :P
Bogdan Cublesan
@cuble27
Oct 20 2016 15:16
I appreciate it!
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:16
@cuble27 Mention not! :)
Bogdan Cublesan
@cuble27
Oct 20 2016 15:16
Have a nice evening!
albertmillert
@albertmillert
Oct 20 2016 15:20
@NitinNair89
Dude can you please take a look why temperature changes only from C to F? Not other way? Please
https://codepen.io/albertmillert/pen/BLxVgO?editors=0011
Jason Luboff
@JLuboff
Oct 20 2016 15:24
@albertmillert Your if/else statement always goes directly to the else portion of the statement
JD Tadlock
@jdtdesigns
Oct 20 2016 15:25
@albertmillert Just don't pass celcius to your event and you're fine
Jason Luboff
@JLuboff
Oct 20 2016 15:25
@albertmillert Yup, as @jdtdesigns mentioned, remove celcius from within the function (thus have function() instead of function(celsius)) and it looks to work
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:26
Agreed.. sorry i got away :(
JD Tadlock
@jdtdesigns
Oct 20 2016 15:27
chilly in poland lol
it's 83F here
Jason Luboff
@JLuboff
Oct 20 2016 15:28
Yup..currently 82F here at 8:30 am ugh
Sorin Ruse
@sorinr
Oct 20 2016 15:28
@cuble27 try to make your localhost call like: $.getJSON('http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=?', function(quote) { document.write(quote[0].content); }); maybe it needs that &callback=? addition
Alexie Nepeh
@Nepeh
Oct 20 2016 15:32
@NitinNair89 bro, its opening the twitter page but not displaying the quotes and author......I'm I missing something?
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:36
@Nepeh Yeah, you put the code in the wrong place. Put it just after this line $(".author").html("-"+data.quoteAuthor);
vivek poddar
@vivekimsit
Oct 20 2016 15:39
Hey guys I am interested in front end architecture i.e. building flexible front end codes
the could base would be large
how could I get some feedback?
Alexie Nepeh
@Nepeh
Oct 20 2016 15:40
@NitinNair89 You the man bro!!!! thanks so much.
CamperBot
@camperbot
Oct 20 2016 15:40
nepeh sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 282 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
albertmillert
@albertmillert
Oct 20 2016 15:40
@JLuboff @jdtdesigns thanks
CamperBot
@camperbot
Oct 20 2016 15:40
albertmillert sends brownie points to @jluboff and @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 407 | @jluboff |http://www.freecodecamp.com/jluboff
:cookie: 709 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:40
Welcome @Nepeh
finally done with twitch tv app :D
Sorin Ruse
@sorinr
Oct 20 2016 15:42
@albertmillert the version of @JLuboff its working but not on first click. at least for me. to change the temp from C to F i have to click twice. not double click. just click twice. after that its working every click
Jason Luboff
@JLuboff
Oct 20 2016 15:45
@sorinr Good looking at. @albertmillert would probably want to change the var celcius = false instead of true, it looks like that fixes the initial double click
Sorin Ruse
@sorinr
Oct 20 2016 15:45
@JLuboff yep. thats the problem
Jason Luboff
@JLuboff
Oct 20 2016 15:46
:+1:
Adetayo Timilehin
@Sprimage
Oct 20 2016 15:52
hi everyone
I created a login page with a bootstrap submit button
And for some reason, the hyperlink in the button refuses to work
Please check my codepen here http://codepen.io/sprimage/pen/rrQXOo
JD Tadlock
@jdtdesigns
Oct 20 2016 15:57
@Sprimage That's because you're using a form which will submit to the current page by default when no action attribute is set. This will just make the page refresh. Just change the form element to a div. Also all the <html><head><body> doesn't go in the html panel. Just the stuff between <body></body>. This will cause errors with all of that code in there. Go to Settings->CSS to add fonts and Setting->JS to add libraries. ;)
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 15:58

@Sprimage Hello, your setup for <a> and <button> is a little incorrect. Replace your code with this:

     <a href="https://www.google.com" target="_blank" class="btn btn-primary btn-lg btn-block" id="submit">Submit</a>

You should have an action attribute to your form instead of the <a> hyperlink :)

so i don't recommend the above code..use it only for testing
Adetayo Timilehin
@Sprimage
Oct 20 2016 15:59
ok thanks. I'll try it
Uros Tadic
@urketadic
Oct 20 2016 16:03
can someone help me with http://codepen.io/urketadic/pen/PGxVar The ajax is sending data even when the input is empty. I added contional statement but its not working
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 16:07
Where's the submitform function coded?
Uros Tadic
@urketadic
Oct 20 2016 16:09
its not
it was just one of my tries
to fix it
I will remove it from html
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 16:10
If the inputs are empty i get the validation alerts you have put. what's the issue?
JD Tadlock
@jdtdesigns
Oct 20 2016 16:11
@urketadic Just change the top of your submit click event to this
$('#add-order').on('click', function (e) {
    e.preventDefault();
Uros Tadic
@urketadic
Oct 20 2016 16:16
Yeah you get the validation alerts its just a makeup, but that doesnt prevent ajax from submiting data
Tadlock i tried that already and it still submited data
let me try one more time
last time i didnt have else in my code
Yeah it wont work
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 16:18
call the $.ajax only after the input fields have data
JD Tadlock
@jdtdesigns
Oct 20 2016 16:18
@urketadic I didn't realize what you wanted. Add this:
var order = {
      name: $name.val(),
      drink: $drink.val()
};
if ( !order.name || !order.drink ) return;
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 16:18
put your own JS validations
on click of submit call that JS function
if true, then proceed with calling $.ajax
Uros Tadic
@urketadic
Oct 20 2016 16:20
Thank you both, the code tadlock wrote worked
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 16:20
Great! :+1:
Artur Arsalanov
@kurumkan
Oct 20 2016 16:41
@urketadic you better tell @name thank you. They will get brownies=)
CamperBot
@camperbot
Oct 20 2016 16:41
kurumkan sends brownie points to @urketadic and @name :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for name
:cookie: 276 | @urketadic |http://www.freecodecamp.com/urketadic
Sorin Ruse
@sorinr
Oct 20 2016 16:42
@urketadic control also for some other validation. if you press a space in each field, for example, it will pass validation. not sure if you want that
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 17:07
cya guys
m off
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 17:15
Please provide your feedback - https://nitinnair89.github.io/TwitchTvApp/
Sorin Ruse
@sorinr
Oct 20 2016 17:33
@NitinNair89 it seems you online-offline switch does not work
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 17:33
Which browser?
works for me
Sorin Ruse
@sorinr
Oct 20 2016 17:33
chrome
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 17:34
is the "All" checked?
Sorin Ruse
@sorinr
Oct 20 2016 17:34
yes
vínαч puppαl
@vinaypuppal
Oct 20 2016 17:34
@NitinNair89 same for me toggle does not work I am on Google Chrome 54.0.2840.59 (Official Build) (64-bit)
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 17:34
I had put a validation that if user is viewing "all" channels then why allow the switch? So uncheck it and try
Please let me know :)
Sorin Ruse
@sorinr
Oct 20 2016 17:36
@NitinNair89 unusual ux concept. if I want to see all (default) i see default. online-offline its just a filter. i don't have to uncheck one filter to apply another
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 17:37
are you sure?
if that's how you feel, i will change it.. maybe tomorrow
vínαч puppαl
@vinaypuppal
Oct 20 2016 17:40
@NitinNair89 yeah works now but how are you identifying whether the channel is online/offline because i see only you are making one API request to https://api.twitch.tv/kraken/channels/' +name and in my project Freecodecamp is not streming and in your project its online ??
Nitin Chandran Nair
@NitinNair89
Oct 20 2016 17:43
Oh ok
i am just checking the status :P
i kept it simple
:(
Thanks @vinaypuppal I will add another api call to streams. I had thought of the exact same UI what you have, then changed my design.. lol
CamperBot
@camperbot
Oct 20 2016 17:44
nitinnair89 sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 630 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
vínαч puppαl
@vinaypuppal
Oct 20 2016 17:46
@NitinNair89 okay this API call https://api.twitch.tv/kraken/streams/freecodecamp?client_id=<your-client-id> shows streams info and in this response if stream has null value then channel is offline.
Ashish Acharya
@anarchyrucks
Oct 20 2016 17:55

Has anyone knowledge on VueJS ?

Amarillia
@Amarillia
Oct 20 2016 17:56

Hi!

Just a quick question from experienced developers. Can somebody tell me why did it became .Net and C# is a necessary knowledge for (Junior) Front-End Developers? I just don't get it but I continuously see it in job advertisements.

JD Tadlock
@jdtdesigns
Oct 20 2016 18:01
@Amarillia It depends on the stack the company uses. A lot of front end jobs require some knowledge of node. The main reason they do this is so you can easily integrate your front end code with the back end they're using. If you don't know anything about the back end, it can be a tedious challenge to work with you.
Sorin Ruse
@sorinr
Oct 20 2016 18:11
@Amarillia another reason and signal is that the company looks for windows developers
lacey irvin
@laceyIrvin
Oct 20 2016 18:24
Hello, I am one the tribute challenge and im having a hard time centering my image. here is the codepen link: http://codepen.io/lirvin88/pen/QKkkkd
ath026
@ath026
Oct 20 2016 18:30
This message was deleted
@laceyIrvin I got mine centered using margin-left:auto;
margin-right:auto; for thr
Amarillia
@Amarillia
Oct 20 2016 18:32
Thanks @jdtdesigns @sorinr
CamperBot
@camperbot
Oct 20 2016 18:32
amarillia sends brownie points to @jdtdesigns and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 710 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
:cookie: 778 | @sorinr |http://www.freecodecamp.com/sorinr
Tyler Moeller
@TylerMoeller
Oct 20 2016 18:33

@laceyIrvin You can put it in a grid offset:

    <div class="col-sm-6 col-sm-offset-3">
      <img class="img-responsive img-thumbnail" src="https://static01.nyt.com/images/2012/09/13/arts/NINA/NINA-superJumbo.jpg">
    </div>

More info: http://getbootstrap.com/css/#grid-offsetting

Coy Sanders
@coymeetsworld
Oct 20 2016 18:37
@laceyIrvin you also don't want to mix sm, xs, md tags
for bootstrap columns should add up to 12 per row also
lacey irvin
@laceyIrvin
Oct 20 2016 18:42
@TylerMoeller thanks, I am having a hard time understanding the differences for the sizes.
CamperBot
@camperbot
Oct 20 2016 18:42
laceyirvin sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 894 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Sorin Ruse
@sorinr
Oct 20 2016 18:43
hi there. who can explain this pen? shit pen
Coy Sanders
@coymeetsworld
Oct 20 2016 18:44
sm,xs,md are just tailored for different devices @laceyIrvin
Tyler Moeller
@TylerMoeller
Oct 20 2016 18:50

@sorinr

User agents must treat elements and attributes that they do not understand as semantically neutral; leaving them in the DOM (for DOM processors), and styling them according to CSS (for CSS processors), but not inferring any meaning from them.
https://www.w3.org/TR/html5/infrastructure.html#extensibility-0

Got me curious, so had to look it up
Sorin Ruse
@sorinr
Oct 20 2016 18:51
@TylerMoeller lol. i'm just more curious then you are
dhuddleston
@dhuddleston
Oct 20 2016 18:53
Why is the "else" token unexpected here? http://codepen.io/dhuddleston/pen/dpwPkN?editors=0010
In this version of the program it was valid: http://codepen.io/dhuddleston/pen/dXoZrX
Artur Arsalanov
@kurumkan
Oct 20 2016 18:57
@dhuddleston else can be only after if or else if
dhuddleston
@dhuddleston
Oct 20 2016 18:58
@kurumkan Ah. Didn't realize that it was no longer after my other if statement now that I modified the code. Have to find a way to work it back in there. Thanks
CamperBot
@camperbot
Oct 20 2016 18:58
dhuddleston sends brownie points to @kurumkan :sparkles: :thumbsup: :sparkles:
:cookie: 353 | @kurumkan |http://www.freecodecamp.com/kurumkan
Japneet Singh
@japsuchiha
Oct 20 2016 18:58
@dhuddleston you dont have an 'if statement' before the else
JD Tadlock
@jdtdesigns
Oct 20 2016 18:58
CodeClash development stream starting shortly! https://www.livecoding.tv/livestreams/
Japneet Singh
@japsuchiha
Oct 20 2016 18:58
lol
Artur Arsalanov
@kurumkan
Oct 20 2016 18:59
@designercoder123 welcome. That happens=)
Larry Simiyu
@LarrySimiyu
Oct 20 2016 18:59
hello guys, don't know if this is the right place to ask. but I'm stuck. I'm being asked to put a p element inside of a div but its not allowing me to move on. my answer looks like this
<div> <p> </p> </div>
Sorin Ruse
@sorinr
Oct 20 2016 19:00
@jdtdesigns just pm something
Japneet Singh
@japsuchiha
Oct 20 2016 19:01
@LarrySimiyu maybe it also wants you to add some info between the p tags
dhuddleston
@dhuddleston
Oct 20 2016 19:02
@kurumkan @designercoder123 Now if I remove the else statement it says there is an unexpected end of input? I'm sure I'm missing something simple here...
Japneet Singh
@japsuchiha
Oct 20 2016 19:13
@dhuddleston i think u r missing on some curly brackets
Michael Davis
@mhdavis
Oct 20 2016 19:14
@jdtdesigns im not sure why my JS is still not working lol
Stephen Suratos
@stephenfs
Oct 20 2016 19:21
QUESTION: Is there a CSS pseudo selector for touchscreen events? let say.. a tap or hold?
Peter Svedman
@petersvedman
Oct 20 2016 19:38
Umm....the URL you put into getQuote is overridden ?
function getQuote(url) {
var randomNum = Math.floor(Math.random() * 1e6);
url = 'http://source.unsplash.com/category/nature/1600x900?sig=' + randomNum;
EL QOMRI
@elqomri
Oct 20 2016 19:41
@NitinNair89 , no, not yet, i use a key that i found in an other project
Peter Svedman
@petersvedman
Oct 20 2016 19:46
Hmm, in the showQuote function, how do you put the HTML in a tag =
@mhdavis
EL QOMRI
@elqomri
Oct 20 2016 19:48
@petersvedman $("#quote-text").text("the quote");
Michael Davis
@mhdavis
Oct 20 2016 19:48
hmm let me see if i can fix that @petersvedman
Peter Svedman
@petersvedman
Oct 20 2016 19:48
exactly
what @elqomri said
so I was under the impression that at the top, I have output = $('#quote')
Peter Svedman
@petersvedman
Oct 20 2016 19:51
$("#quote").text(quote + ", " + author);
would work methinks, like @elqomri showed
select the tag, change the text
ah
yeah
its commented out
Michael Davis
@mhdavis
Oct 20 2016 19:53
just fixed that
I made it this
function showQuote(quote, author) {
  $('#quote').html(
    '<p>' + quote + '</p>' +
    '<span>-' + author + '</span>'
  );
which then causes another problem
Peter Svedman
@petersvedman
Oct 20 2016 19:55
ok
Michael Davis
@mhdavis
Oct 20 2016 19:55
maybe if I move the $.getJSON line to the top so that i pull author and quote first
Peter Svedman
@petersvedman
Oct 20 2016 19:55
your button isnt firing either
umm
Peter Svedman
@petersvedman
Oct 20 2016 19:58
have you checked the console ?
Michael Davis
@mhdavis
Oct 20 2016 19:58
The problem i seem to be having has to be with the way my variables are set up
Peter Svedman
@petersvedman
Oct 20 2016 19:58
"url is not defined!
check your dev console in chrome/firefox
youre getting a script error because the url isnt there
Uncaught ReferenceError: url is not defined
Tyler Moeller
@TylerMoeller
Oct 20 2016 20:00
@mhdavis setBackground(url); and function setBackground(url) {
Michael Davis
@mhdavis
Oct 20 2016 20:01
@TylerMoeller are you saying that I need to have the argument url for the setBackground function?
Tyler Moeller
@TylerMoeller
Oct 20 2016 20:01

Also, instead of this:

  $('</img>').attr('src', url).on('load', function() {
    $('body').css('background-image: url(' + url + ');');
    $('.fa').hide();
    $('#quote').addClass('show');
  });

It should be:

  var img = new Image();
  img.src = url;
  $(img).on("load", function() {
    $('body').css('background-image', 'url(' + img.src + ')');
    $('.fa').hide();
    $('#quote').addClass('show');
  });
Yes, pass the variable to the function to get past that error
Michael Davis
@mhdavis
Oct 20 2016 20:02
okay did that
also I see what you are doing with your image in a cleaner way
Peter Svedman
@petersvedman
Oct 20 2016 20:03
Uncaught TypeError: getQuote is not a function
Michael Davis
@mhdavis
Oct 20 2016 20:03
so can you walk me through the logic on the img code? are you saying "when the image has loaded, do the stuff specified in the function?"
Tyler Moeller
@TylerMoeller
Oct 20 2016 20:03
@mhdavis </img> isn't a valid tag. No closing tags for images.
@mhdavis Yeah, I create an image object. Jquery loads that image object and then runs the next three lines of code
Adam
@adamakers
Oct 20 2016 20:04
I have a quick question. I'm using bootstrap currently. Do columns need to be divs or can I have h1 with class of col-xs-4?
Michael Davis
@mhdavis
Oct 20 2016 20:04
@adamakers they should be divs
divs are meant for organization of blocks of html
Adam
@adamakers
Oct 20 2016 20:05
@mhdavis dang... I just feel like that makes me add soo many divs
get divitis
Peter Svedman
@petersvedman
Oct 20 2016 20:05
can use <section> and other tags ;)
<article>
get a bit semantic
Adam
@adamakers
Oct 20 2016 20:06
very true
Ivanthadev
@ivanthemeh
Oct 20 2016 20:06
Hey guys with the portfolio app - I am getting some wierd behavior when on mobile I think has to do with the way codepen is displaying the content. Is it cool if I just build the portfolio site on my own server?
Michael Davis
@mhdavis
Oct 20 2016 20:06
@TylerMoeller the code I had previous was something JD showed me, and it made sense but im not sure I get the syntax for it all too well
Peter Svedman
@petersvedman
Oct 20 2016 20:06
Good luck @mhdavis , see you around
Michael Davis
@mhdavis
Oct 20 2016 20:07
@petersvedman thanks
CamperBot
@camperbot
Oct 20 2016 20:07
mhdavis sends brownie points to @petersvedman :sparkles: :thumbsup: :sparkles:
:cookie: 286 | @petersvedman |http://www.freecodecamp.com/petersvedman
Michael Davis
@mhdavis
Oct 20 2016 20:07
@TylerMoeller so with the load function you sent me, I'm trying to get the spinner to appear withing the well while the quote is loading
JD Tadlock
@jdtdesigns
Oct 20 2016 20:07
@mhdavis You need to check your browser console for errors. It will show you conflicts.
Tyler Moeller
@TylerMoeller
Oct 20 2016 20:07
@mhdavis I haven't seen it before - just assumed it was yours. If it's from him, there might be a reason he's using a closing img tag. Maybe a jQuery trick I'm not aware of. The way I did it is fairly standard.
Speak of the devil :)
Michael Davis
@mhdavis
Oct 20 2016 20:08
@jdtdesigns ayyy the man of the hour
so I no longer have a url error
but now its saying im missing a link
Tyler Moeller
@TylerMoeller
Oct 20 2016 20:10
@mhdavis Line 18, you need to pass the url variable to the function: setBackground(url);
Michael Davis
@mhdavis
Oct 20 2016 20:10
let me put up the updated pen
but i'll take a gander
okay fixed
Tyler Moeller
@TylerMoeller
Oct 20 2016 20:13
Okay, gotta run. Good luck :+1:
Michael Davis
@mhdavis
Oct 20 2016 20:14
thanks
@TylerMoeller thanks lol
CamperBot
@camperbot
Oct 20 2016 20:14
mhdavis sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 895 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
JD Tadlock
@jdtdesigns
Oct 20 2016 20:19
@mhdavis I'm streaming so can't really help much on here
Adam
@adamakers
Oct 20 2016 20:19
@jdtdesigns what are you streaming?
Michael Davis
@mhdavis
Oct 20 2016 20:19
@jdtdesigns its okay np, I'm trying to find errors in my logic at the moment
JD Tadlock
@jdtdesigns
Oct 20 2016 20:20
Ivanthadev
@ivanthemeh
Oct 20 2016 20:21
Hey guys with the portfolio app - I am getting some wierd behavior when on mobile I think has to do with the way codepen is displaying the content. Is it cool if I just build the portfolio site on my own server?
Ryan Williams
@Ryanwfile
Oct 20 2016 20:36

Can someone please help me with some css. I have a div that's background and content occupy 2 entirely different locations on the screen. The codepen link is http://codepen.io/Ryanwfile/pen/QKJOAa . The div with class score is the one giving me problems in this html

<div class="circle">
  <button class="sector" id = "red"></button>
  <button class="sector" id = "green"></button>
  <div class = "center">
    <div class="score"><h3 id = "title">Simon</h3>
      <button class="button ui btn-primary" id="start">Start</button>
      <button class="button ui btn-info" id ="reset">Reset</button>
      <button class="button ui btn-warning" id="strict">Strict Off</button>
      <div  id="count">Count<br>
        <span id="count_display"></span>
      </div>
    </div>
  </div>
  <button class="sector" id = "blue"></button>
  <button class="sector" id = "yellow"></button>
</div>

The accompanying css is

.circle
{
  position:relative;
  border-radius:50%;
  width:500px;
  height:500px;
  background:#000000;
  margin:5px auto;
  overflow:hidden;
  border:15px solid #000; 
}

.center
{
  border-radius:50%;
  width:250px;
  height:250px;
  background:white;
  position:relative; 
  top:115px;
  left:115px;
  border:25px solid black;
} 

.score
{
  border-radius:50%;
  width:190px;
  height:200px;
  background:blue;/*none or transparent work but then there's a space in the buttons that's unclickable*/
  position:relative;
  top:-220px;  
}
dhuddleston
@dhuddleston
Oct 20 2016 20:40
Trying to use $.ajaxSetup to add a Client-ID header to my $.getJSON calls in my Twitch API fix. Any idea as to why this isn't working? Is it a scoping issue? http://codepen.io/dhuddleston/pen/amPzxm?editors=0010
A_A
@Otto-AA
Oct 20 2016 20:42
@Ryanwfile So I guess you want it in the middle?
Ryan Williams
@Ryanwfile
Oct 20 2016 20:43
@Otto-AA Yes, I'm wondering why the background for the div is so far away from the content of the div, I could just make it transparent but I'm curious how this even happens
vínαч puppαl
@vinaypuppal
Oct 20 2016 20:44
@dhuddleston no need of $.ajaxSetup i think you can directly send client_id as query string for eg: https://api.twitch.tv/kraken/streams/freecodecamp?client_id=<your-client_id>
@dhuddleston like below as in your code
$.getJSON('https://api.twitch.tv/kraken/streams/'+channels[i]+'?client_id=<your-client_id>', function(data){
 console.log(data);
})
A_A
@Otto-AA
Oct 20 2016 20:48
@RyanwfileThe background is at the right place there, but somehow your title is even bigger than the div. I think that's why the other content is so low
dhuddleston
@dhuddleston
Oct 20 2016 20:49
@vinaypuppal Thanks! I also found out that I can keep $.ajaxSetup after getting rid of the ? at the end of
api = 'https://api.twitch.tv/kraken/streams/' + channels[i] + '/?callback=';
CamperBot
@camperbot
Oct 20 2016 20:49
dhuddleston sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 631 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Ryan Williams
@Ryanwfile
Oct 20 2016 20:49
@Otto-AA Yes, that seems to be the problem thank you, not sure how to go about fixing that
CamperBot
@camperbot
Oct 20 2016 20:49
ryanwfile sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 313 | @otto-aa |http://www.freecodecamp.com/otto-aa
vínαч puppαl
@vinaypuppal
Oct 20 2016 20:49
@dhuddleston oh okay :+1:
Tatenda Zhou
@Tatendaz
Oct 20 2016 20:51
is any one doing or done with the quote machine
im literally about to break in tears nothing works on mine
A_A
@Otto-AA
Oct 20 2016 20:52
@Ryanwfile I don't know if that will solve it, but I wouldn't use position relative that often if it's not neccessary (e.g. use margin instead)
Ryan Williams
@Ryanwfile
Oct 20 2016 20:54
@Otto-AA I just don't know why the contents of the div isn't in the same location as the div, shouldn't anything that affects the div like positioning and margin also affect the div's contents?
albertmillert
@albertmillert
Oct 20 2016 20:55
This message was deleted
A_A
@Otto-AA
Oct 20 2016 20:56
@Ryanwfile As much as I saw, the title is pretty big and everything goes after it (which is normal).
albertmillert
@albertmillert
Oct 20 2016 20:57
Hey guys. Can someone help me?
How can i add a picture to a div using jquery?
Image comes from some weather api's JSON file
Ryan Williams
@Ryanwfile
Oct 20 2016 20:58
@Otto-AA the title is inside the div though and doesn't have any positioning attributes outside of position:relative and the font-size. That is my biggest problem is that anything that affects the positioning of the div should also affect the positioning of the title but that's not the case here
A_A
@Otto-AA
Oct 20 2016 20:58
@albertmillert $('selector').css('background-image', 'url('+link+')');
Tatenda Zhou
@Tatendaz
Oct 20 2016 20:58
hi guys can someone take a look at my random quote machine why is it not working
http://codepen.io/tatendaz/pen/yaGBNN
albertmillert
@albertmillert
Oct 20 2016 20:59
Thank you @Otto-AA ill give it a try
CamperBot
@camperbot
Oct 20 2016 20:59
albertmillert sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 314 | @otto-aa |http://www.freecodecamp.com/otto-aa
A_A
@Otto-AA
Oct 20 2016 20:59
@Tatendaz 1) put your script into the JS section of codepen (should work anyways, but is much easier to look at ;)
albertmillert
@albertmillert
Oct 20 2016 20:59
This message was deleted
Tatenda Zhou
@Tatendaz
Oct 20 2016 21:00
@Otto-AA yeah i tried that as well but it didnt work
A_A
@Otto-AA
Oct 20 2016 21:01
@Tatendaz Your code is actually good, you only forgot to add jQuery =D
Tatenda Zhou
@Tatendaz
Oct 20 2016 21:02
@Otto-AA where
vínαч puppαl
@vinaypuppal
Oct 20 2016 21:02
@Tatendaz add JQuery from Settings -> Javascript -> quick Add
Tatenda Zhou
@Tatendaz
Oct 20 2016 21:02
ohhhhhhh
I am an idiot
i spent 2 hours going crazy over this
@vinaypuppal @Otto-AA thanks will try that
CamperBot
@camperbot
Oct 20 2016 21:03
tatendaz sends brownie points to @vinaypuppal and @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 315 | @otto-aa |http://www.freecodecamp.com/otto-aa
:cookie: 632 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
A_A
@Otto-AA
Oct 20 2016 21:05
Anybody has suggestions for what I could add to this? I just want to mess around with animations and stuff but ran out of ideas :/
http://codepen.io/A_A/full/XjyqaJ
Ian Lee
@asparism
Oct 20 2016 21:18

why does

$("#person").html(simple[funRan][0]);
    $("#said").html(simple[funRan][1]);

run on document.ready as well as when i run the function they're in, but

    $(".twitter-share-button").attr("data-text", twPost);

will only run when the doc is ready? they're both inside the same function
and also

    $("#twitter").attr("data-text", twPost);

won't run, even though the same element with class="twitter-share-button" also has id="twitter"
any ideas?

albertmillert
@albertmillert
Oct 20 2016 21:21
OMG I'm almost done with weather API. But something seems not to be working again...
App is not getting into $.getJSON function I think IDK why. And can someone please take a look also at the part when i'm trying to change an icon? It's probably not working either. Everything used to work just fine, untill i started messing around with the icon...
https://codepen.io/albertmillert/pen/BLxVgO?editors=1011
albertmillert
@albertmillert
Oct 20 2016 21:35
This message was deleted
A_A
@Otto-AA
Oct 20 2016 21:35
This message was deleted
albertmillert
@albertmillert
Oct 20 2016 21:36
Dude! Please.. May you know sth about my project that is not working?
A_A
@Otto-AA
Oct 20 2016 21:37
@albertmillert I know that the getJSON call fails
albertmillert
@albertmillert
Oct 20 2016 21:38
This message was deleted
A_A
@Otto-AA
Oct 20 2016 21:38
@albertmillert $.getJSON(url).done(function() {...}).fail(function() {...}); is a pretty nice way to check that but I dunno why
@albertmillert else I would have told you 10min ago
albertmillert
@albertmillert
Oct 20 2016 21:38
Oki thanks
hmmm
It used to work some time ago and then suddenly stopped :D I guess these kind of thinkgs don't happen without a reason but yea...
A_A
@Otto-AA
Oct 20 2016 21:39
@albertmillert They never do
did you change the api-link?
albertmillert
@albertmillert
Oct 20 2016 21:40
Look. I deleted two lines now with var ikonka
And it's back. But i need that icon to be working
A_A
@Otto-AA
Oct 20 2016 21:41
@albertmillert still not working for me :/
albertmillert
@albertmillert
Oct 20 2016 21:43
neither for me.... sth's wrong with that codepen lol It was working again for some time....
A_A
@Otto-AA
Oct 20 2016 21:51
@albertmillert does it work for you when you change the api-link to http://...
Only image is not displayed
A_A
@Otto-AA
Oct 20 2016 21:56
@albertmillert It works for me when I open codepen with http and the api with http
@albertmillert and guess whats wrong with that image-link: http://s.codepen.io/boomerang/5946556115533751f971aeb5e21f3b9d1477000529744/+ikona+
albertmillert
@albertmillert
Oct 20 2016 21:59
for me it's not working...
and anyways it's not working again
I really don't get it lol
A_A
@Otto-AA
Oct 20 2016 22:00
@albertmillert Is your api restricted to a limited amount of views?
albertmillert
@albertmillert
Oct 20 2016 22:01
oooo probably
Yea. That might be a case
Ok dude @Otto-AA thanks for your time wasted on my project :) I have to go CYA
CamperBot
@camperbot
Oct 20 2016 22:03
albertmillert sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 316 | @otto-aa |http://www.freecodecamp.com/otto-aa
Adam Pinsky
@adampinsky
Oct 20 2016 22:12
Hello everyone. Is there anyone on that could help me find a bug? I just built my first chart using canvas and chart.js, and I'm having an issue where the chart is rendering in a color an opacity I don't want.
dhuddleston
@dhuddleston
Oct 20 2016 23:15
http://codepen.io/dhuddleston/pen/amPzxm
Why is it this statement never evaluates to true?
if(streamResp.error)
vínαч puppαl
@vinaypuppal
Oct 20 2016 23:20
@dhuddleston if you console.log(streamResp.error) you will see undefined so undefined is no/missing value in javascript . So it is coerced to false inside if condition
dhuddleston
@dhuddleston
Oct 20 2016 23:21
@vinaypuppal That's very strange. It's frustrating because a few months ago it worked perfectly. :/
vínαч puppαl
@vinaypuppal
Oct 20 2016 23:23
@dhuddleston why you want to check for streamResp.error , And did you use same $.getJSON in before code that you wrote few months ago
@dhuddleston And if you want to catch errors with $.getJSON you have to do like this
$.getJSON( "example.json")
  .done(function(data) {
    console.log( "success", data );
  })
  .fail(function(error) {
    console.log( "error", error );
  });
Micah Lewis
@EastML
Oct 20 2016 23:39
anyone here used DarkSky API for their weather app?
I keep getting an error
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://s.codepen.io' is therefore not allowed access.