These are chat archives for FreeCodeCamp/HelpFrontEnd

28th
May 2016
Bobby McDonald
@BobbyMcWho
May 28 2016 00:00
I’m convinced that without bad design,....
that's a separate issue than you were sking
Kenzo Mendoza
@KenzoM
May 28 2016 00:00

hello all, I just have a quick question:
I'm on the tribute project and I want to embellish the page a bit by adding jQuery's fadeIn() effect.

I'd thought that by typing the following code below it would work, but I am not seeing the effects:

$(document).load(function() {
$("body").fadein();
});
am I missing something? If I add a method like $("body").effect( "shake", {times:4}, 1000 ), I could see the effect but nothing in the fadeIn()

redixhumayun
@redixhumayun
May 28 2016 00:00
@BobbyMcWho Okay, what issue were you trying to help me solve?
Bobby McDonald
@BobbyMcWho
May 28 2016 00:01
your quotes are giving character codes instead of the character
redixhumayun
@redixhumayun
May 28 2016 00:01
@BobbyMcWho Whoa, thanks a lot. That helped a lot. Any help on the twitter button thing?
CamperBot
@camperbot
May 28 2016 00:01
redixhumayun sends brownie points to @bobbymcwho :sparkles: :thumbsup: :sparkles:
:cookie: 312 | @bobbymcwho |http://www.freecodecamp.com/bobbymcwho
Bobby McDonald
@BobbyMcWho
May 28 2016 00:01
Let me look
@redixhumayun if you're using jquery why are you using document.getElementById ?
Juwdohr
@Juwdohr
May 28 2016 00:03
Trying to figure out why when I press the Ans button that the previous answer, when used in an equation equals "NaN", any help would be appreciated, also looking for feedback:
http://codepen.io/juwdohr/pen/eZoNKB
redixhumayun
@redixhumayun
May 28 2016 00:03
@BobbyMcWho When I was looking up the syntax on how to change the color, that was one of the results that popped up. I just went with it, but I see your point. i'll change that
Bobby McDonald
@BobbyMcWho
May 28 2016 00:04
@redixhumayun your twitter button hrefg is jacked up
you can't use a JS variable directly in the html
redixhumayun
@redixhumayun
May 28 2016 00:05
@BobbyMcWho I don't follow.
Bobby McDonald
@BobbyMcWho
May 28 2016 00:06
delete the link in your twitter button html and it will work
but you need to push the tiwtter link to the button as an attr
redixhumayun
@redixhumayun
May 28 2016 00:06
@BobbyMcWho Oh, I see what you're saying. That worked for me
Bobby McDonald
@BobbyMcWho
May 28 2016 00:07
$('#tweetButton').attr('href',tweetUrl);
redixhumayun
@redixhumayun
May 28 2016 00:07
@BobbyMcWho Alright, thank you so much man. That was a huge help
CamperBot
@camperbot
May 28 2016 00:07
redixhumayun sends brownie points to @bobbymcwho :sparkles: :thumbsup: :sparkles:
:warning: redixhumayun already gave bobbymcwho points
Bobby McDonald
@BobbyMcWho
May 28 2016 00:08
give your icon an ID then use jquery to dynamically get the quote info and pass it to the href
redixhumayun
@redixhumayun
May 28 2016 00:08
@BobbyMcWho Okay, will do
@BobbyMcWho Hey, sorry one last question. Any idea how to get rid of that annoying new line that keeps popping up at the end of my quote? I thought reg expressions would take care of it
@BobbyMcWho But it doesn't seem to. It's not there initially, but it keeps popping up when I remove the <p> tags
Bobby McDonald
@BobbyMcWho
May 28 2016 00:12
lemme look
@redixhumayun I think it has to do with you stringifying things
I didn't do that in mine and it worked fine
redixhumayun
@redixhumayun
May 28 2016 00:14
@BobbyMcWho But if i don't stringify things, how do I get a string from the JSON object?
Bobby McDonald
@BobbyMcWho
May 28 2016 00:14
redixhumayun
@redixhumayun
May 28 2016 00:17
@BobbyMcWho Okay, will do. Thanks
CamperBot
@camperbot
May 28 2016 00:17
:warning: redixhumayun already gave bobbymcwho points
redixhumayun sends brownie points to @bobbymcwho :sparkles: :thumbsup: :sparkles:
Bobby McDonald
@BobbyMcWho
May 28 2016 00:19
@redixhumayun you just have to data.shift() and then use subsets to get the data
redixhumayun
@redixhumayun
May 28 2016 00:19
@BobbyMcWho Yeah, it looks like you used $.ajax and GET method whereas I used $.getJSON
@BobbyMcWho Honestly, I'm not very comfortable with the whole syntax of the ajax method yet
Bobby McDonald
@BobbyMcWho
May 28 2016 00:19
@redixhumayun they're pretty much the same
redixhumayun
@redixhumayun
May 28 2016 00:20
@BobbyMcWho The syntax for them is different though right?
Bobby McDonald
@BobbyMcWho
May 28 2016 00:20
getJSON is just shortform ajax
redixhumayun
@redixhumayun
May 28 2016 00:20
Okay
Bobby McDonald
@BobbyMcWho
May 28 2016 00:20
your JSON response should be the same as mine would be
we're using the same API
redixhumayun
@redixhumayun
May 28 2016 00:21
That's weird, I have no idea why mine is adding the \n tag then
Juwdohr
@Juwdohr
May 28 2016 00:24
Trying to figure out why when I press the Ans button that the previous answer, when used in an equation equals "NaN", any help would be appreciated, also looking for feedback:
http://codepen.io/juwdohr/pen/eZoNKB
CSStiles
@CSStiles
May 28 2016 00:36
Hi everyone, I'm starting my first project and I realize I don't understand the different ways to style a page. It seems the modules taught us to style elements in HTML, CSS, or responsive bootstrap. I don't get when to use what. Can someone help, or link to something that explains this?
NewtonXu
@NewtonXu
May 28 2016 00:36

  $("#toggle").on("click", function(){
    var tempdis = $("u").html();
    console.log(tempdis);
    if(tempdis == "C")
      {
        var temp = $("b").html();
        console.log(temp);
        //convert temp C->F
        temp= (temp-32)*5/9;
        $("b").html(temp);
        $("u").html("F");

      }
    else{
      var temp = $("b").html();
      //convert temp F->C
      temp = (temp*9/5)+32;
      $("b").html(temp);
      $("u").html("C");
    }
  });
this button doesnt work, im not sure what i did wrong?
Ken Haduch
@khaduch
May 28 2016 00:40
@NewtonXu - this looks a little strange: var tempdis = $("u").html(); - what is "u"? Are you getting a value from that? Is it really an ID or a class? If so, it should be "#u" or ".u" for ID or class, respectively. Otherwise - can you post a link? Oh, I see another one lower - var temp = $("b").html(); - same question, what is "b"?
@NewtonXu - but I don't really know if those are the problems...
NewtonXu
@NewtonXu
May 28 2016 00:41
@khaduch those are the tags, i only used one set of bold and underline in my code so i just used them directly, i think thats the right way to call them?
Toni Shortsleeve
@KoniKodes
May 28 2016 00:41
I've finished the Random Quote Machine. Feedback please? At http://codepen.io/KoniKodes/pen/LZYpgy .
Ken Haduch
@khaduch
May 28 2016 00:41
@NewtonXu - ah, okay, I don't use those, so they looked strange to me. Can you post a link if it is a codepen project?
NewtonXu
@NewtonXu
May 28 2016 00:42
@khaduch i will try, i got locked out after trying my password lol
Toni Shortsleeve
@KoniKodes
May 28 2016 00:42
Ok, It looks like I need to truncate at 140 characters for twitter. Back to search and research...
Michael
@M33x0
May 28 2016 00:45
@CSStiles Hi,if you don't understand you can go back to the challenge to try to understand.(HTML : Women + CSS : MakeUp = Beatiful Lady)
NewtonXu
@NewtonXu
May 28 2016 00:46
@khaduch btw it doesnt run on chrome
CSStiles
@CSStiles
May 28 2016 00:47
@M33x0 Yes, I'm going back to the challenges but they don't really explain when to use which. I don't know what you're referring to with "(HTML : Women + CSS : MakeUp = Beatiful Lady)"
Ken Haduch
@khaduch
May 28 2016 00:47
@NewtonXu - I was just going to post that... I'll switch to firefox.
NewtonXu
@NewtonXu
May 28 2016 00:48
@khaduch yeah should have mentioned that, the API codecamp recommended doesnt work in chrome haha
Bruce Young
@mutantspore
May 28 2016 00:50
@NewtonXu the weather api works fine in chrome.. it’s the geolocation that doesn’t work in chrome unless you use https
NewtonXu
@NewtonXu
May 28 2016 00:51
@mutantspore but the api doesnt respond if i use https because it delivers in http
Ken Haduch
@khaduch
May 28 2016 00:52
@NewtonXu - I'm going to guess that because you are rre-generating the <button> element that you are blowing away the click handler.
Bruce Young
@mutantspore
May 28 2016 00:52
@NewtonXu yes .. but the weather api is fine. you can use something like http://ip-api.com to get your location and still use chrome and the OWM api
NewtonXu
@NewtonXu
May 28 2016 00:52
@khaduch so if i have it in the original html it should work?
Ken Haduch
@khaduch
May 28 2016 00:53
@NewtonXu - I think that it does - I did a jsfiddle project that it worked in. You can make your handler a separate function and then set it again after you update the display? Or just directly set the text in the element that exists, maybe that would work...
Tyler Collins
@tjscollins
May 28 2016 00:54
Hoping I can get some help with font awesome icons for the Portfolio page challenge. I'm trying to put icons on the left of my header, but I can't get them to show up for the life of me. Any ideas?
relevant code is lines 6-8
http://codepen.io/tjscollins/pen/MegRjj
Ken Haduch
@khaduch
May 28 2016 00:54
@tjscollins - did you add the CSS external resource for it?
NewtonXu
@NewtonXu
May 28 2016 00:54
@mutantspore thanks ill try it out
@khaduch i need to head out now but ill try that solution later, thanks!
CamperBot
@camperbot
May 28 2016 00:54
newtonxu sends brownie points to @mutantspore and @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1204 | @khaduch |http://www.freecodecamp.com/khaduch
:star2: 1643 | @mutantspore |http://www.freecodecamp.com/mutantspore
Tyler Collins
@tjscollins
May 28 2016 00:55
@khaduch Yes, it's in the HTML "Stuff for Head" box
@khaduch At least, I think I added it correctly
Ken Haduch
@khaduch
May 28 2016 00:58
@tjscollins - you mustn't be getting them. Go to the CSS config, external resources, type "font-awesome" and add the appropriate one that pops up. The icons should then appear.
@tjscollins - you have "FortAwesome" in your URL.. . :)
Elbert Cortez
@trip16661
May 28 2016 00:59
is there any website were they provide audio sources for use? (for html)
Ken Haduch
@khaduch
May 28 2016 01:00
@tjscollins - it still doesn't work - add it in the CSS external resources, then you've got it.
@tjscollins - this is the URL that you get: https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.2/css/font-awesome.min.css
Tyler Collins
@tjscollins
May 28 2016 01:01
@khaduch Alright, I tried adding it to CSS config. That got one of the 3 icons to show up, which seems weird.
Ken Haduch
@khaduch
May 28 2016 01:03
blob
@tjscollins - I see all three?
@tjscollins - I did take the line out of the "stuff for head", if that makes any difference.
redixhumayun
@redixhumayun
May 28 2016 01:04

Just finished random quote generation
http://codepen.io/redixhumayun/pen/zqeXyB?editors=0011

It's far from perfect, so any feedback would be really welcome

Not sure why the twitter and tumblr buttons are not showing up when you run the pen within this webpage, but if you open it in a new tab, it shows up
Michael
@M33x0
May 28 2016 01:06
@CSStiles Okayx2,tell exactly what you don't understand
Ken Haduch
@khaduch
May 28 2016 01:06
@tjscollins - I just reloaded your page, I see all three, and they are a lot bigger than they were before!
Elbert Cortez
@trip16661
May 28 2016 01:07
@redixhumayun thay all end with /n
@redixhumayun btw was it helpful what i sent to you hours ago?
Ken Haduch
@khaduch
May 28 2016 01:07
:hammer: case closed, @tjscollins ?
redixhumayun
@redixhumayun
May 28 2016 01:07
@trip16661 Yeah, I know. I've been trying to figure that out for a while. Apparently it has something to do with how I'm using JSON.stringify to convert my JSON objects to strings I can utilize in JavaScript. Have no idea how to fix i t
I've tried using reg ex
doesn't seem to work
@trip16661 Yeah, that helped quite a bit, thanks man
CamperBot
@camperbot
May 28 2016 01:08
:cookie: 376 | @trip16661 |http://www.freecodecamp.com/trip16661
redixhumayun sends brownie points to @trip16661 :sparkles: :thumbsup: :sparkles:
Tyler Collins
@tjscollins
May 28 2016 01:08
@khaduch Looks like. I'm just trying to figure out why they're not showing up for me. Trying to clear browser cache, etc. Thanks for the help.
CamperBot
@camperbot
May 28 2016 01:08
tjscollins sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1205 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
May 28 2016 01:08
@redixhumayun - did you try using the .trim() function on the string? I think that's the one I want...
redixhumayun
@redixhumayun
May 28 2016 01:08
Yep, tried that as well
@khaduch That doesn't work either
Tyler Collins
@tjscollins
May 28 2016 01:08
@khaduch Yeah, they're showing up when I switched browsers. Thanks for the hlep
CamperBot
@camperbot
May 28 2016 01:08
tjscollins sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: tjscollins already gave khaduch points
redixhumayun
@redixhumayun
May 28 2016 01:09
@khaduch It's so confusing because it doesn't show up until I remove the <p> tags using reg ex
Ken Haduch
@khaduch
May 28 2016 01:09
@redixhumayun - see this: The trim() method removes whitespace from both ends of a string. Whitespace in this context is all the whitespace characters (space, tab, no-break space, etc.) and all the line terminator characters (LF, CR, etc.). From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim
buiphuking
@buiphuking
May 28 2016 01:10
when you code a project like pomodoro clock, ie there any easy way to know why your code doesn't working??????? help me guys, i'm stuck .
Elbert Cortez
@trip16661
May 28 2016 01:10
@buiphuking console.log everywhere
@redixhumayun why do you need to make it a string?
redixhumayun
@redixhumayun
May 28 2016 01:11
@khaduch Yeah, i tried it again just now. Still won't work
Bruce Young
@mutantspore
May 28 2016 01:11
@buiphuking do you have the actual browser dev tools console open?
Ken Haduch
@khaduch
May 28 2016 01:11
@redixhumayun - I think that it is a literal backslash + n, no longer a character code \n?
buiphuking
@buiphuking
May 28 2016 01:11
@trip16661 is debugger work with codepen ?
redixhumayun
@redixhumayun
May 28 2016 01:11
@trip16661 I just made it a string because i was more used to working with them
@trip16661 It was user for me to think about how to keep the tweet quote below 140 characters this way
Elbert Cortez
@trip16661
May 28 2016 01:12
@buiphuking yes it does and you can use its own cosole from codepen
Ken Haduch
@khaduch
May 28 2016 01:12
@redixhumayun where you are trying to strip out that "\n" - change it to this: result = result.replace(/['"]+/g, '').replace(/\\n/, ''); - add an extra backslash in front of the \n
buiphuking
@buiphuking
May 28 2016 01:12
@mutantspore
i don'r reach that lesson yet
redixhumayun
@redixhumayun
May 28 2016 01:13
@khaduch Goddamn, that worked! Thanks so much man. I was killing myself over that stupid letter for like an hour before I gave up
CamperBot
@camperbot
May 28 2016 01:13
redixhumayun sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1206 | @khaduch |http://www.freecodecamp.com/khaduch
Elbert Cortez
@trip16661
May 28 2016 01:13
@redixhumayun i think the way you are doing it's quite not what you should but im not an expert it just look a bit messy
Bruce Young
@mutantspore
May 28 2016 01:13
@buiphuking right click on the web page and “inspect element"
redixhumayun
@redixhumayun
May 28 2016 01:13
@trip16661 What do you mean? How am I supposed to do it? I just used the .getJSON method like the freecodecamp tutorials showed. Yeah, i know the codes messy
Elbert Cortez
@trip16661
May 28 2016 01:17

@redixhumayun

var string = JSON.stringify(json[num].content);

that is unecesary since the object value you are acessing through content key come as a string

buiphuking
@buiphuking
May 28 2016 01:18
@mutantspore @trip16661
thanks guys!
CamperBot
@camperbot
May 28 2016 01:18
buiphuking sends brownie points to @mutantspore and @trip16661 :sparkles: :thumbsup: :sparkles:
:cookie: 377 | @trip16661 |http://www.freecodecamp.com/trip16661
:star2: 1644 | @mutantspore |http://www.freecodecamp.com/mutantspore
Ken Haduch
@khaduch
May 28 2016 01:21
@redixhumayun - I like the look of your page, though. Probably could use some modifications, as @trip16661 was saying. What you doing does seem like quite a bit of contortion. But it's working! Improvements can always be made in just about everything, so as time goes on... good luck!
Elbert Cortez
@trip16661
May 28 2016 01:23
@khaduch sir, do you know any page that can holds mp3 files to be used in audio tags?
I need one sound for the error on my simon/pomodoro :(
Ken Haduch
@khaduch
May 28 2016 01:23
@trip16661 - search for free audio clips - I think that I found some pages out there. Let me check my notes...
Elbert Cortez
@trip16661
May 28 2016 01:24
i did but all of them just let you download them not to use it
Erick Damian Navarro Oropeza
@edno82mx
May 28 2016 01:26
Ken Haduch
@khaduch
May 28 2016 01:28
@trip16661 - I probably ran into the same thing. I got one ticking clock sound for my Pomodoro, and I uploaded it to my ISP site, where I can reference it from. You can probably do that with a dropbox account or something like that?
redixhumayun
@redixhumayun
May 28 2016 01:30
@khaduch What do you mean by contortion?
Ken Haduch
@khaduch
May 28 2016 01:32
@redixhumayun - something like jumping through a lot of hoops to get the output that you want, might be another way to say it. Just doing things a little more convoluted way, using the JSON return data should be fairly simple, just have to figure out the object structure of it (which they should document in the API description.)
redixhumayun
@redixhumayun
May 28 2016 01:35
@khaduch Okay, can you give me some pointers on how to improve the code I submitted to prevent that in the future?
Toni Shortsleeve
@KoniKodes
May 28 2016 01:35
I think my Quote Machine looks better. Feedback please? http://codepen.io/KoniKodes/pen/LZYpgy
Juwdohr
@Juwdohr
May 28 2016 01:39
Trying to figure out why when I press the Ans button that the previous answer, when used in an equation equals "NaN", any help would be appreciated, also looking for feedback:
http://codepen.io/juwdohr/pen/eZoNKB
Toni Shortsleeve
@KoniKodes
May 28 2016 01:39
@redixhumayun I did open in new window. I like the quotes and it tweeted well. I like the background changes on the new quotes. I did have to click twice and it changed color first without changing the quote, and then it changed color and quote.
Ken Haduch
@khaduch
May 28 2016 01:39
@redixhumayun - I'm looking at the output now - it could be that in the format you are getting the data, some of the manipulations have to be done. I haven't seen the multiple quote return before. The fact that it has HTML markup in there does add a little complexity to it.
@redixhumayun - maybe it's just the format of the site that you have to work with, even for a single quote? I haven't looked at that site in detail (or perhaps not at all)... :) But I don't think that you need the JSON.stringify?
Bobby McDonald
@BobbyMcWho
May 28 2016 01:43
That's what I was saying @redixhumayun
I told you, just data.shift();
Toni Shortsleeve
@KoniKodes
May 28 2016 01:44
@CSStiles think of html as the letter you want to write - with all the paragraphs, words and content. CSS is your ink color, the format of the paragraphs, the margins on the body of the letter. Bootstrap helps make your css easier to code because it has already set precedents for certain css styles.
buiphuking
@buiphuking
May 28 2016 01:49
plz check my code,
http://codepen.io/buiphuking/pen/NrKypv?editors=1010
why 4 buttons + - don't work, plz.........
Ken Haduch
@khaduch
May 28 2016 01:51

@redixhumayun - It doesn't look all that different if you forget about the <p> tags, and the newline should just disappear on the browser, treated as a whitespace. I modified the code (without doing any cleanup to unnecessary variables) to look like this:

      var string = json[num].content;  // no JSON.stringify() here
      $(".quote").html(string);
      $(".quote").css("font-size", "24px").css("font-family", "Lucida Grande");

The same thing can be done for the author:

      var result_author = json[num].title;
      $(".author").html(result_author);
      $(".author").css("font-size", "15px").css("font-family", "Lucida Grande");

Small simplifications.

@buiphuking - it looks like they are working? Increment and decrement the displayed values?
Maritimesailor
@Maritimesailor
May 28 2016 01:56
Anybody use ionic for their projects?
buiphuking
@buiphuking
May 28 2016 01:56
@khaduch
yes, i click the + or - , nothing happen
Ken Haduch
@khaduch
May 28 2016 01:57
@buiphuking - I'm using the Chrome browser, if that makes any difference? Chrome on windows
buiphuking
@buiphuking
May 28 2016 01:58
@khaduch
i'm chrome win 10, i thing something wrong with my code,
Ken Haduch
@khaduch
May 28 2016 01:59
@buiphuking - on firefox, it is strange. If I click multiple times, they will change? Actually, I looked in the firebug console, and it looks like the timer is running then? At least I was getting errors "ReferenceError: timerFunc is not defined" - let me look at the code again?
Maritimesailor
@Maritimesailor
May 28 2016 02:01
Does anybody know if you an a api key for twitch api?
Bobby McDonald
@BobbyMcWho
May 28 2016 02:01
you don't
Maritimesailor
@Maritimesailor
May 28 2016 02:02
Ok thanks
@BobbyMcWho
Ken Haduch
@khaduch
May 28 2016 02:02

@buiphuking - yes, it must be doing this code:

  if(paused){
    clearInterval(timer);
    timer = setInterval(function(){timerFunc()}, 10);
  }

and perhaps on Chrome it behaves differently if the timerFunc is not defined, since you have a function timeFunc? But I don't know exactly what behavior you are trying to implement there. It see that if it is paused you don't want to start it again?

buiphuking
@buiphuking
May 28 2016 02:05
@khaduch
at the top, this is in break status , so i want to keep counting , i thing this is useful for user, i could be wrong
Ken Haduch
@khaduch
May 28 2016 02:06
@buiphuking - well, with the mis-named timerFunc or timeFunc function, it is just kicking the timer into gear and getting errors - if you put the Chrome developer tools up and look in the console, you can see it. On my Chrome, it is incrementing the error message count at a fairly high rate of speed.
buiphuking
@buiphuking
May 28 2016 02:08
@khaduch
send me a link about chrome developer tools plz, and thanks!
CamperBot
@camperbot
May 28 2016 02:08
buiphuking sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1207 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
May 28 2016 02:08
@buiphuking - I changed this: function timeFunc(){ to this: function timerFunc(){, and it is not generating errors and now changing the values, but it still looks like it's kicking off the timer and there doesn't seem to be an effect from that, other than dumping messages out to the console.log with the current time value, and rapidly incrementing the counter.
@buiphuking - basically, in Chrome, look on the "hamburger" menu, under "More Tools ... Developer Tools" or enter Shift + Ctrl + I (that's the letter "i") and it will pop up the tools window. Look at the "Console" tab, and you'll see the console.log output there. That's a start - it's useful to be able to get to the developer's console output panel.
@buiphuking - here is a screen shot of the developer tools panel - I circled the "Console" tab in red.
blob
Ken Haduch
@khaduch
May 28 2016 02:15
@buiphuking - with that change of name to "timerFunc", it is actually counting now in the display - so it might have just been that the error of the function name problem was causing the erratic behavior? So at least you have made some additional progress. Good luck!
buiphuking
@buiphuking
May 28 2016 02:17
@khaduch
timer = setInterval(function(){timerFunc()}, 10);
and
timer = setInterval(function(){timerFunc();}, 10);
what is the difference ?
Ken Haduch
@khaduch
May 28 2016 02:22

@buiphuking - on the Free Code Camp "Map", there are a few lessons on the Chrome developer tools - farther down on the list.

There is almost no difference there - the curly brace at the point after timerFunc()} closes the block. If you run JSLint on it, it might flag a missing semicolon warning (or they might call it an error?) But you don't always need the semicolon, it is a good idea to put it in there when it is needed. It terminates the line of code or the current function that is being processed. If you look on the JS config tab on CodePen, at the bottom there is an "Analyze JS" button that runs a variation of JS Lint, and it will show you places where you have errors (or what they think are errors) in your JS code. You scroll down and it has some "Missing semicolon" warnings and "Unnecessary semicolon." warnings. It is also a useful tool.

okayaj
@okayaj
May 28 2016 02:23
I'm having a major issue implementing a content-slider into my "Portfolio" section of my project. The container designed to contain the content seems to have contained ALL of my content instead of just my portfolio, so I'm not sure if I should continue trying to code the slider.
https://codepen.io/okayaj/pen/EyYzvr
Ken Haduch
@khaduch
May 28 2016 02:30
@okayaj - Hello there. Your "#content" div is the parent for all three different divs: "default", "about", and "portfolio" - so they are all just scrolling into whatever you've set up there. So you want to have three separate divs? Or at least not one parent that is handling the placement of those divs and resulting in the scrolling?
okayaj
@okayaj
May 28 2016 02:32
ah, you found it @khaduch ! I had mistakenly created two classes named "content" that were sharing properties and mucking things up. Thanks!
CamperBot
@camperbot
May 28 2016 02:32
okayaj sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1208 | @khaduch |http://www.freecodecamp.com/khaduch
okayaj
@okayaj
May 28 2016 02:33
changing the first one to .main seems to have fixed the error
Dan Stockham
@DanStockham
May 28 2016 02:33
It's so strange, the navigator doesn't work at all in my code for the Weather app
Ken Haduch
@khaduch
May 28 2016 02:35
@DanStockham - if you're using Chrome, it will only work (navigator, that is) for https:// And if you're using the openweather api, it will only work on http:// (at least for the free version.) So if you switch to HTTPS, you'll probably see the navigator work, then if you're using openweather, it will not allow the transfer over HTTPS.
Dan Stockham
@DanStockham
May 28 2016 02:36
@khaduch So I'm in stuck in a metaphorical pickle.
Ken Haduch
@khaduch
May 28 2016 02:37
@DanStockham - people are switching to using ip-api - http://ip-api.com/json - for the location part of the project. Or switch to something else altogether so that you get a weather site that works in HTTPS...
Dan Stockham
@DanStockham
May 28 2016 02:39
@khaduch Thanks man, I'll give that a try.
CamperBot
@camperbot
May 28 2016 02:39
danstockham sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1209 | @khaduch |http://www.freecodecamp.com/khaduch
khaduch @khaduch - seems like it quieted down a bit - I'm going to take a break for a while and do some other stuff... happy coding everyone!
Maritimesailor
@Maritimesailor
May 28 2016 02:47
Ok so I have done an ajax call using angular ad its successful but the data that I want is not outputting on the screen. I am doing the twitch api project and here is my pen http://codepen.io/whatisthis/pen/OXJXjv
NewtonXu
@NewtonXu
May 28 2016 02:50
@khaduch @mutantspore http://codepen.io/NewtonXu/pen/OXJNJy
thanks for your help its working now :)
CamperBot
@camperbot
May 28 2016 02:50
newtonxu sends brownie points to @khaduch and @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1210 | @khaduch |http://www.freecodecamp.com/khaduch
:star2: 1645 | @mutantspore |http://www.freecodecamp.com/mutantspore
Chris Cullen
@123xylem
May 28 2016 03:00
http://codepen.io/123xylem/pen/xOKZyy?editors=1011 2 questions: 1. Why do my divs have weird borders on them and 2. Why does the LI not get wrapped lie the others??
*last li
CSStiles
@CSStiles
May 28 2016 03:09
@KoniKodes thanks, but I don't understand why the FCC modules teach us how to do certain things in css but not in bootstrap, and then the first project is supposed to be all bootstrap. Googling for answers is not as easy as I thought it would be. Seems like there should be a style sheet with a chart like "how to xyz" in html, css, and bootstrap but I have yet to find it :P
CamperBot
@camperbot
May 28 2016 03:09
csstiles sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 275 | @konikodes |http://www.freecodecamp.com/konikodes
theblitzidk
@theblitzidk
May 28 2016 03:29
uh, how do I start learning java? Like, wheres the tutorial page?
buiphuking
@buiphuking
May 28 2016 03:31
anyone has experience with livescript???
i want to ask something ?
SarthakAdhikari
@SarthakAdhikari
May 28 2016 03:38
Anyone here?
Andrew Charlebois
@andrewchar
May 28 2016 03:39
@123xylem weird borders? not sure what you mean by "weird"
Chris Cullen
@123xylem
May 28 2016 03:39
@andrewchar Yea its been fixed now
I had my divs nested
thanks tho
http://codepen.io/123xylem/pen/xOKZyy?editors=1011 Im wondering How I display Info on Freecodecamp stream given the data call only gives me a small json array with nothing I can make a good display out of
SarthakAdhikari
@SarthakAdhikari
May 28 2016 03:40
https://codepen.io/sarthakadhikari/pen/bebyRW?editors=1010 I am not being able to get the geolocation data.
Chris Cullen
@123xylem
May 28 2016 03:40
(if freecodecamp is offline)
SarthakAdhikari
@SarthakAdhikari
May 28 2016 03:40
Can anyone tell me what I am doing wrong?
Chris Cullen
@123xylem
May 28 2016 03:42
@SarthakAdhikari THIS TOOK me ages when I did it because of cross site scripting or sometnig
Basically u cant use http and https together
so its either that or your ajax call looks different to what im used to
SarthakAdhikari
@SarthakAdhikari
May 28 2016 03:44
@123xylem ok
@123xylem But i am using https:// on both
both on codepen and openweather
Chris Cullen
@123xylem
May 28 2016 03:46
Im not an expert but i cant see anyhtml on your link either
the cross site script thing is a tough one and I still dont fully understand it
Andrew Charlebois
@andrewchar
May 28 2016 03:47
@SarthakAdhikari ^
SarthakAdhikari
@SarthakAdhikari
May 28 2016 03:48
But I was told to use the Openweather API @andrewchar :D
Andrew Charlebois
@andrewchar
May 28 2016 03:49
it doesnt work anymore since chrome changed
cant do geolocation on chrome using http anymore
SarthakAdhikari
@SarthakAdhikari
May 28 2016 03:52
Oh.
but i am using https
and so is my api.
Andrew Charlebois
@andrewchar
May 28 2016 03:54
im not even sure if that works since the entire page in which your app is on needs to be https
i think thats how it works now
SarthakAdhikari
@SarthakAdhikari
May 28 2016 03:54
But i am using codepen through https
Andrew Charlebois
@andrewchar
May 28 2016 03:56
not sure what to say. All i know is that a lot of campers are using the ip-api site as a work around
i have not done that project since before chrome changed the geolocation thing
ewajm
@ewajm
May 28 2016 03:57
the openweather api doesn't let you use https, so even if you are on https for geolocation and it works on codepen, you can't get the weather info
SarthakAdhikari
@SarthakAdhikari
May 28 2016 03:58
Okay.
so now I have to switch from Openweather?
ewajm
@ewajm
May 28 2016 03:58
you can either find a different weather api that works for https
or you can use the ip-api site to get location
SarthakAdhikari
@SarthakAdhikari
May 28 2016 03:59
@ewajm and also chrome didn't ask for "Grant location access?" permission?
so I am assuming there is something more that is broken than just Openweather.
ewajm
@ewajm
May 28 2016 03:59
yeah it sounds like it
i'm afraid I don't know enough about it to be able to say much more than what worked for me
i ended up going with http://ip-api.com and using openweather
SarthakAdhikari
@SarthakAdhikari
May 28 2016 04:00
@ewajm Okay, thanks :)
CamperBot
@camperbot
May 28 2016 04:00
sarthakadhikari sends brownie points to @ewajm :sparkles: :thumbsup: :sparkles:
:cookie: 279 | @ewajm |http://www.freecodecamp.com/ewajm
SarthakAdhikari
@SarthakAdhikari
May 28 2016 04:01
@ewajm Btw, Did you finish the Front End section?
ewajm
@ewajm
May 28 2016 04:01
i'm actually working on the twitch tv project right now
having issues with javascript variable scope :(
SarthakAdhikari
@SarthakAdhikari
May 28 2016 04:02
@ewajm Well :D
Andrew Charlebois
@andrewchar
May 28 2016 04:02
@ewajm whats the issue
ewajm
@ewajm
May 28 2016 04:03
i guess variables get weird when you access them from anonymous classes?
Andrew Charlebois
@andrewchar
May 28 2016 04:04
classes like the ES6 thing?
ewajm
@ewajm
May 28 2016 04:05
sorry, anonymous functions. I am terrible with terminology
basically i keep wanting to access changes made to variables within the callback function of getJSON to be accessible outside of the function
but that does not work
Chris Cullen
@123xylem
May 28 2016 04:06
http://codepen.io/123xylem/pen/xOKZyy How can I get my text to not sit under the images? I want my text to start in the top center but the image is making it start in the middle
Andrew Charlebois
@andrewchar
May 28 2016 04:10
@ewajm hmm no you would get "is not defined"
ewajm
@ewajm
May 28 2016 04:10
this is what i have at the moment, but i feel like i am doing some unnecessary work
@andrewchar that's pretty much the problem, yes!
SarthakAdhikari
@SarthakAdhikari
May 28 2016 04:47
Guys how do i use '//' without commenting the code?
Randy Goldsmith
@Dueldrawer8
May 28 2016 04:54
how do i get my buttons to go in the center?
http://codepen.io/duel_drawer8/pen/QNxyNq
Ken Truong
@kjjtruong
May 28 2016 04:59
@123xylem you need to double check the HTML you appended. you're missing a closing '>' on your opening DIV
Chris Cullen
@123xylem
May 28 2016 05:07
@kjjtruong o really
@kjjtruong good one thanks
CamperBot
@camperbot
May 28 2016 05:09
123xylem sends brownie points to @kjjtruong :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @kjjtruong |http://www.freecodecamp.com/kjjtruong
Chris Cullen
@123xylem
May 28 2016 05:09
it works now
Ken Truong
@kjjtruong
May 28 2016 05:10
great
@123xylem links don't work in the Codepen viewer as well. you need to use target="_blank"
Randy Goldsmith
@Dueldrawer8
May 28 2016 05:12
does anyone know how to select the buttons and move them towards the center via css? I've tried everything and they wont move
Fernand
@Ferdyboy81
May 28 2016 05:14
hi guys! is there a way to change the toggle color on the nav?
instead of the light gray, i want to change it to a different color.
Ken Truong
@kjjtruong
May 28 2016 05:29
@Dueldrawer8 you'll need to add
display: table;
margin: 0 auto;
@Dueldrawer8 to your #button
and add display:line to your button element
display: inline; sorry
@Ferdyboy81 you want to change the hover color the navbar links?
Fernand
@Ferdyboy81
May 28 2016 05:35
@kjjtruong yes plz
Ken Truong
@kjjtruong
May 28 2016 05:36
@Ferdyboy81 you'll need to select the anchors pseudo class.
@Ferdyboy81 so use
a:hover { }
Jack Lyons
@JackEdwardLyons
May 28 2016 05:37
hey guys, im having trouble working on the logic for the "online" and "offline" status of my twitch API app
my code is like this:
/* Display online/offline users on click */
   $("button#online-channels").on("click", function() {
     if ($("div.wrapper").has(channelStatus === "Offline")) {
       $("div.wrapper").has(channelStatus === "Offline").addClass("remove-channels");
     } 
   });
Fernand
@Ferdyboy81
May 28 2016 05:37
@kjjtruong under CSS right?
Jack Lyons
@JackEdwardLyons
May 28 2016 05:37
but that doesn't work
Ken Truong
@kjjtruong
May 28 2016 05:38
This message was deleted
Jack Lyons
@JackEdwardLyons
May 28 2016 05:38
here's my pen if you're interested :)
Ken Truong
@kjjtruong
May 28 2016 05:39
This message was deleted
@Ferdyboy81 yes under CSS
Fernand
@Ferdyboy81
May 28 2016 05:40
@kjjtruong a hover{
background-color: #fffff !important
}
like that?
Ken Truong
@kjjtruong
May 28 2016 05:40
@Ferdyboy81
a:hover{
background-color: blue !important;
}
you're missing the :
Fernand
@Ferdyboy81
May 28 2016 05:41
@kjjtruong oh awesome! thank you it works!
CamperBot
@camperbot
May 28 2016 05:41
ferdyboy81 sends brownie points to @kjjtruong :sparkles: :thumbsup: :sparkles:
:cookie: 292 | @kjjtruong |http://www.freecodecamp.com/kjjtruong
Ken Truong
@kjjtruong
May 28 2016 05:42
no prob
Randy Goldsmith
@Dueldrawer8
May 28 2016 05:44
@kjjtruong display: inline to where? not the id #button but to each of my classes of all three buttons?
Ken Truong
@kjjtruong
May 28 2016 05:45
yea but you should probably use your individual button classes instead
Randy Goldsmith
@Dueldrawer8
May 28 2016 05:45
i got the buttons to move to the center.. and they are stacked ontop of one another
Ken Truong
@kjjtruong
May 28 2016 05:45
@Dueldrawer8 allButton, onButton, and I forgot what the other one was
Randy Goldsmith
@Dueldrawer8
May 28 2016 05:45
now i need to stack them horizontally
i tried adding display: inline to each one individually and nothing happened
Ken Truong
@kjjtruong
May 28 2016 05:46
@Dueldrawer8 .onButton, .allButton, .offButton {
display: inline
}
Randy Goldsmith
@Dueldrawer8
May 28 2016 05:48
@kjjtruong wow, that did work.. thanks! you must be a css whiz!
CamperBot
@camperbot
May 28 2016 05:48
dueldrawer8 sends brownie points to @kjjtruong :sparkles: :thumbsup: :sparkles:
:cookie: 293 | @kjjtruong |http://www.freecodecamp.com/kjjtruong
Ken Truong
@kjjtruong
May 28 2016 05:50
@Dueldrawer8 lol i'm not. I've ran into the same problems before that's all
Randy Goldsmith
@Dueldrawer8
May 28 2016 05:50
@kjjtruong i see :)
now i am on to the hardest part in my opinion.. making it responsive lol using bootstrap
Ken Truong
@kjjtruong
May 28 2016 06:01
@Dueldrawer8 it's much easier in my opinion if you set that up in the beginning before you at your content
*add
setting your containers, row, and then col
Randy Goldsmith
@Dueldrawer8
May 28 2016 06:32
@kjjtruong oh really?
Ken Truong
@kjjtruong
May 28 2016 06:40
@JackEdwardLyons i don't think you're using the .has() method correctly in this case as it is used to traverse the DOM for matching elements.
@JackEdwardLyons instead, you're checking for a variable with a matching value
"string" sorry
Ken Truong
@kjjtruong
May 28 2016 06:51
@JackEdwardLyons in your case try adding the channelStatus as a class to your appended code as a label and using hasClass() or toggleClass()
Fernand
@Ferdyboy81
May 28 2016 07:24
guys I'm working on my portfolio page challenge. any suggestions on how do i properly create a new page? http://codepen.io/Ferdyboy81/pen/aZorag?editors=1100
i already created two page section but theres this gap in between that i don't know how to adjust or get rid of
kirbyedy
@kirbyedy
May 28 2016 07:29
@Ferdyboy81 try margin-bottom: 0px; on jumbotron
@Ferdyboy81 and your jumbotron2 has a 1px margin-top
Fernand
@Ferdyboy81
May 28 2016 07:31
@kirbyedy you are awesome! Thank You!
CamperBot
@camperbot
May 28 2016 07:31
ferdyboy81 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1038 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
kirbyedy
@kirbyedy
May 28 2016 07:32
:thumbsup:
Fernand
@Ferdyboy81
May 28 2016 07:33
@kirbyedy can i ask you for another help? :) how do i make my icon home bigger?
plotterbaboom
@plotterbaboom
May 28 2016 07:40
@Ferdyboy81 give the icon an id ="iconHome" or whatever you want and then apply CSS to that
kirbyedy
@kirbyedy
May 28 2016 07:40
@Ferdyboy81 try to change text size on the .fa-home
Chris Cullen
@123xylem
May 28 2016 07:44
@123xylem
http://codepen.io/123xylem/pen/xOKZyy CAn I get a review Pleaseeeee
Twitch viewer
GowthamReddyAmbati
@GowthamReddyAmbati
May 28 2016 07:48
@GowthamReddyAmbati
hi friends, i'm not able to get the 2nd part of this api.. https://en.wiktionary.org/w/api.php?action=opensearch&search=power&format=json&callback=?
i'm not getting description from this api
its been blank
but able to see the title and links
would you please help me on this
plotterbaboom
@plotterbaboom
May 28 2016 08:01
@123xylem did you complete all the user cases?
Chris Cullen
@123xylem
May 28 2016 08:02
@plotterbaboom Kind of
@plotterbaboom I thought using their array of users wasnt good so I DID A different method which gave a different kind of site
Instead of looking at 5 people only and saying things about them 5 streamers I took a list of featured streamers that allows people to see info on the top current straeamers
plotterbaboom
@plotterbaboom
May 28 2016 08:06
I see. What about implementing a button to show online and offline streams
Elbert Cortez
@trip16661
May 28 2016 08:30
what's wrong with this sintax?
state == "off"? state = "on": state = "off";
should change state to on and off depending on?
Coy Sanders
@coymeetsworld
May 28 2016 08:33
that should flip the state @trip16661
syntax looks fine to me
Elbert Cortez
@trip16661
May 28 2016 08:37
@coymeetsworld it looks fine to me except that it just not triggering D:
Coy Sanders
@coymeetsworld
May 28 2016 08:38
whats the rest of the code? you're defining state right?
should be line 33
and get used on 122
function changeState (state) {
            state == "off"? state = "on": state = "off";
    }
    function simonGame() {
        if (simon.state == "on") {
            changeState(simon.state);
             console.log(simon.state);
            restart();
            return  $displayerSelector.text("Off");
        }
        changeState(simon.state);
        $displayerSelector.text("__");
        console.log(simon.state);
    }
Coy Sanders
@coymeetsworld
May 28 2016 08:46
thats because primitives pass by value in functions @trip16661, not by reference
changeState won't update the state variable the way you want it to
Elbert Cortez
@trip16661
May 28 2016 08:47
can you translate what you said ? xD
Coy Sanders
@coymeetsworld
May 28 2016 08:49
when you pass a primitive value into a function and modify it in there, those modifications will only happen within the function, not outside
its a key concept in programming, you should look into it and read further
Elbert Cortez
@trip16661
May 28 2016 08:49
so it's a batter of scope
matter*
Coy Sanders
@coymeetsworld
May 28 2016 08:50
yeah scope plays a part in it
if you remember the challenges where you ran some of the functions like str.split, or arr.sort
those functions didn't modify those items in place either
Elbert Cortez
@trip16661
May 28 2016 08:52
I see
that makes sense
@coymeetsworld thanks D:
CamperBot
@camperbot
May 28 2016 08:52
trip16661 sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:cookie: 980 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
May 28 2016 08:52
thats a little different too but just giving a similar point
yeah, but look into pass by reference and pass by value
Elbert Cortez
@trip16661
May 28 2016 08:55
@coymeetsworld okay :) i will take a look at it on youtube xD
Coy Sanders
@coymeetsworld
May 28 2016 08:57
doesn't have to be youtube :) can read a book :package:
Randy Goldsmith
@Dueldrawer8
May 28 2016 09:11
anyone good with bootstrap and responsive design?
i thought ive learned how to at least make it look like a stack but everytime i change it in my divs it changes my boxes width
Elbert Cortez
@trip16661
May 28 2016 09:48
I think im done with the functionality of my simon game can anyone see if im missing a bug or anything?
http://codepen.io/Trip1666/full/YqmQpY/
Davide
@K3nzie
May 28 2016 10:04
Why right after javascript piece of course, the front-end challanges are written in jquery if I just learned plain javascript?
even worse, local weather one is done with angular haha
Elbert Cortez
@trip16661
May 28 2016 10:18
@K3nzie you can either do whatever you want with it, you can write plain js or try some jquery etc there is no rule
(you can use whatever api or libraries you need)
the one they use as an example are just for showing the functionality
Davide
@K3nzie
May 28 2016 10:19
Yea but thiss there was no mentions about working with dom, is it something I'm supposed to do by myself? never used for example document.getelementbyid in the course
Elbert Cortez
@trip16661
May 28 2016 10:19
but you used $("thisID").html
in the cat app
Davide
@K3nzie
May 28 2016 10:20
still jquery tho haha, well yeah, I got the point ^^
Elbert Cortez
@trip16661
May 28 2016 10:20
but yeah you should always learn by yourself because they dont really teach much
they are more a practic thing
if you do go out and search you will be lost
Davide
@K3nzie
May 28 2016 10:22
I have to say that algorithm challanges instead are very nice to do, it teachs you well how to solve small problems with a bit of logic
Elbert Cortez
@trip16661
May 28 2016 10:23
@K3nzie well it was hell for me (advanced ones) I felt dumb af
Davide
@K3nzie
May 28 2016 10:25
I felt the same at the beginning, but the feeling when you finally get it working is priceless :P
damn I hate that smile with both blinking eye and tongue haha
Elbert Cortez
@trip16661
May 28 2016 10:29
looks so diva. xD
elminsterrr
@elminsterrr
May 28 2016 10:29
Hello, Do you know what should I do to overcome this bug? I'm getting console.logs like this :
XMLHttpRequest cannot load https://api.forecast.io/forecast/MY_API_KEY/37.8267,-122.423. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access.
what is that?
this is API with weather conditions for some location
Elbert Cortez
@trip16661
May 28 2016 10:34
link me the codepen
elminsterrr
@elminsterrr
May 28 2016 10:35
It works in browser so I can acces it but I can't do it with that code:
$(document).ready(function(){
    $("button").click(function(){

console.log(weather);
var xmlhttp = new XMLHttpRequest(),
    json;

xmlhttp.open("GET", "https://api.forecast.io/forecast/f7337f585d849d4a64f04fc3e28c2145/37.8267,-122.423", true);
xmlhttp.send();

xmlhttp.onreadystatechange = function() {
    if(xmlhttp.readyState === 4 && xmlhttp.status === 200) {
        console.log("working!");
    }
};

    });
});
@trip16661 ok
Nathan
@N-Upchurch
May 28 2016 10:39
Hey everyone, I was having difficulty changing h1 color in codepen with bootstrap added. Any ideas?
Nevermind, thanks!
Gintaras
@g1st
May 28 2016 11:22
Hello, maybe someone did random quote machine challenge and can give me advice on tweeting the quote? I don't know how to change the tweet after changing the quote... I am stuck for way too many hours on that... http://codepen.io/g1st/pen/VjZqzE
Davide
@K3nzie
May 28 2016 11:25

I guess that if im reading this

$(document).ready(function() {
  $.getJSON(url, getQuote, 'jsonp');

the parameters are inverted right? should be url data and callback

Gintaras
@g1st
May 28 2016 11:27
i get the quote, i just can't tweet it
Davide
@K3nzie
May 28 2016 11:28
sorry gintaras my message wasn't for you
Gintaras
@g1st
May 28 2016 11:29
:( do you have any tips for my problem
?
Davide
@K3nzie
May 28 2016 11:33
don't you compose the twitter share button manually?
Gintaras
@g1st
May 28 2016 11:38
Sorry, I don't get the question. Are you suggesting me to make the button manually and not with that twitter-share-button class which twitter provides?
Davide
@K3nzie
May 28 2016 11:54
I mean that every time you get the quote, you should also set a variable with the current quote and edit the inner html so that the button link updates itself automatically, and the tweet then changes
Nishanth Mane
@ngmgit
May 28 2016 11:56
Yes,the twitter button has data-text or something similar attribute, just change it whenever the quote changes.
Gintaras
@g1st
May 28 2016 12:01
but that data-text change is not working, because twitter script evaluates tag attributes only on page load
Nishanth Mane
@ngmgit
May 28 2016 12:02
which api are you using?
intent or share?
Gintaras
@g1st
May 28 2016 12:02
share
Nishanth Mane
@ngmgit
May 28 2016 12:06
Davide
@K3nzie
May 28 2016 12:08

I don't get why the data I retrieve doesn't show in my h2

var setIP = function(data){
    $('#ipadress').html(data.ip);
};

//Page loads
$(document).ready(function() {
  $.getJSON('http://ipinfo.io/json', 'json', setIP());

});

any help? what's wrong?

Nishanth Mane
@ngmgit
May 28 2016 12:08
can you link me to you codepen url\
@K3nzie link to you codepen would be easy to understand whats the issue.
Davide
@K3nzie
May 28 2016 12:11
@nishugit
Nishanth Mane
@ngmgit
May 28 2016 12:12
also can i get link to the api documentation for the url you used
nvm got it
Davide
@K3nzie
May 28 2016 12:15
it's a simple json request, and I only need one element, it should work :\
Miguel Martinez
@cortazar11
May 28 2016 12:16

I am stack in the TwitchTV. after converting the array of names in a array of url links for users online and offline and only names for closed accounts ["https://link_1","https://link_2",name(for closed account),"https//link_3",...] ordered correctly (online on top). I tried to apply the $.each method with a condition within, so if the element starts by "http" I applied .getJSON method to work with the JSON object of the element (link) and add up to my html the display_name, name,so on( e.g. html+=json.name); if the element doesn't start by "http" add up the value of the element only (e.g. html+=value). It doen't work; the html takes index and value within jQuery.each, but not the json object of the nested .getJSON method. Where I lost?

       ```
   channels=["https://link1","https://link2","name(for closed account)",....];
    var html="";
     $.each(channels,function(index,value){

        //html+=index +" : "+ value+"<br>";
        if(value.substring(0,4)=="http"){

            $.getJSON(value,function(json){
              html+=json.name;
          });
        }
        else {
          html+= value;
        }
     });

```

Gintaras
@g1st
May 28 2016 12:17
@nishugit yes I'm using that share button
Davide
@K3nzie
May 28 2016 12:18
going to eat, brb, @nishugit let me know if you come up with something, and tag me so I read for sure
Nishanth Mane
@ngmgit
May 28 2016 12:18
@K3nzie yes curl even gives me response, checking what the fault is maybe
calback
Nishanth Mane
@ngmgit
May 28 2016 12:44
@K3nzie ah! cant understand why the url doesn't work it just doesnt make any request to the server. API call of other web services work.
Davide
@K3nzie
May 28 2016 12:49
So maybe is the servive?
*service @nishugit
Nishanth Mane
@ngmgit
May 28 2016 12:49
for some reason codepen doesnt even make that request, i tried it in console of copen also and the same thing doesnt even make a request
only for ipinfo
dont know why
Davide
@K3nzie
May 28 2016 12:50
strange, do you know any other api provided ip service?
Nishanth Mane
@ngmgit
May 28 2016 12:51
sorry, i dont know
Davide
@K3nzie
May 28 2016 12:52
Alright, thanks anyway, for dedicating some time to it ^^ appreciated
Nishanth Mane
@ngmgit
May 28 2016 12:52
Iam pretty sure this is due to codepen, cause it works in my project scripts and also in other browser console with jquery loaded
@K3nzie no ty it was a fun to try to debug it .
CamperBot
@camperbot
May 28 2016 12:53
nishugit sends brownie points to @k3nzie :sparkles: :thumbsup: :sparkles:
:cookie: 123 | @k3nzie |http://www.freecodecamp.com/k3nzie
Davide
@K3nzie
May 28 2016 12:53
i found this, it seems to work with ipinfo.io
Nishanth Mane
@ngmgit
May 28 2016 12:54
nope its not working
Davide
@K3nzie
May 28 2016 12:54
but it uses angular, not jquery
o.o for me it's working
Nishanth Mane
@ngmgit
May 28 2016 12:55
its stuck at loading for me
he is using jquery not angualar
is the url correct?
Davide
@K3nzie
May 28 2016 12:56
lol my bad I was reading another pen
Nishanth Mane
@ngmgit
May 28 2016 12:58
ah ! found the issue
its because of ab blocker
disable it and the request works
adblocker*
@K3nzie
Davide
@K3nzie
May 28 2016 12:59
o.o are you freaking serious?
Nishanth Mane
@ngmgit
May 28 2016 12:59
now your original code will work just diable the adblocker, its actually blocking the request
Davide
@K3nzie
May 28 2016 12:59
holy shit, let me try
Nishanth Mane
@ngmgit
May 28 2016 13:00
@K3nzie okay do let me know if it works, for me it works with adblock disabled
Davide
@K3nzie
May 28 2016 13:01
I disabled it but still nothing, I think im doing something wrong >.<
Nishanth Mane
@ngmgit
May 28 2016 13:02
okay just remove that json after the url
can you link me to you original code agian
Davide
@K3nzie
May 28 2016 13:03
already removed json from url, btw here http://codepen.io/K3nzie/pen/qNBqgW
Nishanth Mane
@ngmgit
May 28 2016 13:05
Okay just write it as follow i dont how to pass the defined function .
$(document).ready(function() { $.getJSON('http://ipinfo.io/', function(data){ console.log(data); $('#ipadress').html(data.ip); });
@K3nzie although i did work on js i still dont know how to pass it onto the function which you defined
Davide
@K3nzie
May 28 2016 13:09
YES!
A-fucking-men
the trick was console.log(data);
thanks a lot man
I thought you could access the data without using the console listing command,
Nishanth Mane
@ngmgit
May 28 2016 13:13
thats my only weapon to debugging eheh, just started out into jquery
Nishanth Mane
@ngmgit
May 28 2016 13:20
@K3nzie yes we can access the data without console.log also, i just placed there to know what data iam getting. Remove that and it still works
Fred
@Fred-Saru
May 28 2016 13:28
Hey there !
Can you help me, http://codepen.io/Derpsaru/pen/XKrLod?editors=1100 . I just want to have a button that does not change it's style when I hover it or click it.
how can I achieve that ?
SarthakAdhikari
@SarthakAdhikari
May 28 2016 13:31
Ken Nawrocki
@nawrockp
May 28 2016 13:33
@Fred-Saru have you tried setting the css for button:active and button:focus?
Fred
@Fred-Saru
May 28 2016 13:34
I forgot button focus, I'll try.
Ken Nawrocki
@nawrockp
May 28 2016 13:35
@SarthakAdhikari works for me
MinSik
@mscho527
May 28 2016 13:37
This message was deleted
Fred
@Fred-Saru
May 28 2016 13:39
@nawrockp yeah it works, but I had to remove bootstrap btn-default too !
Ken Nawrocki
@nawrockp
May 28 2016 13:40
@Fred-Saru doh sorry, not focus, hover
You can just override those syles
SarthakAdhikari
@SarthakAdhikari
May 28 2016 14:00
test
@nawrockp Do you see the cloud icon?
Or some weather icon?
Richie Vowels
@drv0684
May 28 2016 14:01
could someone look at this and tell me what I am doing wrong? to my mind 6 + 6 equals 12 so the picture should take up half the screen and the text should take up the other half. https://codepen.io/richiecoder/pen/rLNjZV
SarthakAdhikari
@SarthakAdhikari
May 28 2016 14:07
I think you should you should use col-xs-6 on the <img> tag.
@drv0684
instead of the <div> tag.
Richie Vowels
@drv0684
May 28 2016 14:09
@SarthakAdhikari I will try that
SarthakAdhikari
@SarthakAdhikari
May 28 2016 14:10
@drv0684 sure ;)
Richie Vowels
@drv0684
May 28 2016 14:13
I may be trying to do things beyond my skill level
I wanted to have 2 rows. On the left have a picture, and on the right have some text.
I should just stack things on top of each other until my skill level increases! lol
kirbyedy
@kirbyedy
May 28 2016 14:17
@drv0684 it does take up half of the screen, but your image is a bit small :)
Screen Shot 2016-05-28 at 17.17.39.png
Richie Vowels
@drv0684
May 28 2016 14:18
lol
how can I size it? ugh
kirbyedy
@kirbyedy
May 28 2016 14:18
well stretching that image will result in a pretty distorted picture of the person which I dont recommend
and she will hate you :)
maybe it will be better if you make your columns 3 and 9
and add more txt
Davide
@K3nzie
May 28 2016 14:37
Ok I've got another mini issue with the weather app
it says (to every variable I retrieve), undefined, but in the console you can see (with console log) that the object is requested from the API, and it's the right one, but when I try to access, the properties, it says undefined, even if I know the calling data.property is the right one
Richie Vowels
@drv0684
May 28 2016 14:46
thanks @kirbyedy it's my daughter so I have to be careful!
CamperBot
@camperbot
May 28 2016 14:46
drv0684 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1039 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Bruce Young
@mutantspore
May 28 2016 14:46
http://codepen.io/MutantSpore/pen/qNBRej?editors=0010
$.getJSON('http://ipinfo.io/', setIP);
@K3nzie
Anush Reddy
@anushreddy
May 28 2016 14:48
how to add background image for a section ?
Davide
@K3nzie
May 28 2016 14:49

that one works, the problem is with the second one

$.getJSON('http://api.openweathermap.org/data/2.5/forecast/city?q=Catania&APPID=c078a3bc370030e85eb2355a35155ef5', function(data){
        $('#temp').html(data.main.temp + '°C - '); // Kelvin to C/F
        $('#head').html(data.name);
        console.log(JSON.stringify(data));
    })

it says data.main undefined @mutantspore

{"city":{"id":2525068,"name":"Catania","coord":{"lon":15.08719,"lat":37.502129},"country":"IT","population":0,"sys":{"population":0}},"cod":"200","message":0.2621,"cnt":35,"list":[{"dt":1464447600,"main":{"temp":295.96,"temp_min":295.96,"temp_max":301.418,"pressure":956.11,"sea_level":1027.39,"grnd_level":956.11,"humidity":38,"temp_kf":-5.46},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"clouds":{"all":48},"wind":{"speed":0.91,"deg":150.005},"sys":{"pod":"d"},"dt_txt":"2016-05-28 15:00:00"},{"dt":1464458400,"main":{"temp":292.76,"temp_min":292.76,"temp_max":296.854,"pressure":955.47,"sea_level":1026.82,"grnd_level":955.47,"humidity":42,"temp_kf":-4.09},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02d"}],"clouds":{"all":12},"wind":{"speed":0.81,"deg":139.5},"sys":{"pod":"d"},"dt_txt":"2016-05-28 18:00:00"},{"dt":1464469200,"main":{"temp":288.5,"temp_min":288.5,"temp_max":291.232,"pressure":955.98,"sea_level":1027.67,"grn[…]
and that's the json object
Bruce Young
@mutantspore
May 28 2016 14:51
@K3nzie @K3nzie the weather api call wasn’t in the pen you posted.. can you show one that does?
Davide
@K3nzie
May 28 2016 14:52
impossible, i linked the right one http://codepen.io/K3nzie/pen/qNBqgW it should be there
Bruce Young
@mutantspore
May 28 2016 14:53
@K3nzie that one is.. but the oter didn’t perhaps you hadn’t saved it at that point
Davide
@K3nzie
May 28 2016 14:53
probably
I think there's a problem with concatenation when I ask for the properties, but im not sure, I tried every combination possible >:<
Yaroslav
@YVeselovskyi
May 28 2016 14:58
hello
Anush Reddy
@anushreddy
May 28 2016 14:58
hello
Yaroslav
@YVeselovskyi
May 28 2016 14:58
blob
Matthew Horsman
@Karnivool89
May 28 2016 14:58
Hey guys, I'm working on on the Twitch TV API project right now, and I'm wondering if some of the features shown on the example codepen are necessary even if they aren't talked about on the freecodecamp challenge page (e.g., toggling online/offline users). Here's my project so far https://codepen.io/Horsman/pen/QELomo
Yaroslav
@YVeselovskyi
May 28 2016 14:58
who know how to fix it?
Bruce Young
@mutantspore
May 28 2016 14:58
@K3nzie the issue is that the api calls are asynchronous. they go off and do their thing and you done’t know when they’ll be back. if you put code straight after it … it will run it straight away while the other process is still running. So you can wrap the weather api call in a function and call it from within the end of teh geolocation api. I also changed you api call to be correct for the weather in a city.
http://codepen.io/MutantSpore/pen/oLNZNo
@K3nzie the temperature returned is in Kelvin.
Davide
@K3nzie
May 28 2016 15:00
Yeah ik I already have the conversion formula, first I wanna fix this output problem
Yaroslav
@YVeselovskyi
May 28 2016 15:00
@anush6533 could you help me?
Bruce Young
@mutantspore
May 28 2016 15:01
@K3nzie my fork there has it fixed
Davide
@K3nzie
May 28 2016 15:01
@mutantspore So I have to wrap the function somewhere else and not directly ?
Oh great! Thanks a lot :)
Bruce Young
@mutantspore
May 28 2016 15:02
@K3nzie you can put all that weather api code inside th eip getjason if you like
Yaroslav
@YVeselovskyi
May 28 2016 15:02
blob
I made it :D
Anush Reddy
@anushreddy
May 28 2016 15:02
i am still in building my personal portfolio :(
Bruce Young
@mutantspore
May 28 2016 15:03
@K3nzie also you now need to pass the function the lat/lon and not use the city name. You can pass it as a function argument or make it global. the problem with the city name ..in my case.. is that I live in Hudson Florida.. a vastly different climate than Hudson New York which is what it wil try to do.
Matthew Horsman
@Karnivool89
May 28 2016 15:04
Hey guys, I'm working on on the Twitch TV API project right now, and I'm wondering if some of the features shown on the example codepen are necessary even if they aren't talked about on the freecodecamp challenge page (e.g., toggling online/offline users). Here's my project so far https://codepen.io/Horsman/pen/QELomo
Dylan
@dhcodes
May 28 2016 15:06
@Karnivool89 you only technically need to fulfill the user stories, but i usually try to mirror the full functionality of their example as a challenge to myself
your call though
@Karnivool89 looks good! you can do the online/offline by adding some buttons and then having them hide/show the users based on whether they are online or offline
using jquery
Matthew Horsman
@Karnivool89
May 28 2016 15:08
@dhcodes Yeah I've followed that philosophy so far, might as well keep it going! Thanks
CamperBot
@camperbot
May 28 2016 15:08
karnivool89 sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 906 | @dhcodes |http://www.freecodecamp.com/dhcodes
Davide
@K3nzie
May 28 2016 15:13
@mutantspore I'll try to do it :) thanks again
CamperBot
@camperbot
May 28 2016 15:13
k3nzie sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1646 | @mutantspore |http://www.freecodecamp.com/mutantspore
Davide
@K3nzie
May 28 2016 15:31

I'm following this browser api request

http://api.openweathermap.org/data/2.5/forecast/city?lat=LATVARIABLE&lon=LONVARIABLE&APPID=MYAPIKEY

In the browser works perfectly but not when I request with jquery, mmh, maybe this kind of request doesn't work for apps?

Bruce Young
@mutantspore
May 28 2016 15:33
@K3nzie that is a request for the FORECAST for a number of days. You really want to use the current weather endpoint
http://openweathermap.org/current
@K3nzie it wil work if you get the right object
Davide
@K3nzie
May 28 2016 15:35
Haha always ready :) thanks
Davide
@K3nzie
May 28 2016 15:44
I guess the numbers for lat and lon have to be integer (?)
Bruce Young
@mutantspore
May 28 2016 15:45
@K3nzie ? numbers, with decimals, floating point numbers .. you’d be off by a very long way just using integers
Davide
@K3nzie
May 28 2016 15:51
done btw^^
Now I just need to understand how to get rid of all those zeroes without regex
and that was not a request for you haha just a reminder for me
Bruce Young
@mutantspore
May 28 2016 15:53
@K3nzie Math functions
Davide
@K3nzie
May 28 2016 15:53
yep, that was the direction ^^
Riston Denaux
@ToccataN
May 28 2016 16:25
hello, why will this code not yield data from the twitch api, what am i doing wrong? I know the client is receiving a response.

$('#sub').on('click', function(e){
e.preventDefault;

var text= document.getElementById("txt").value;
var URL="https://api.twitch.tv/kraken/search/streams?q="+text+"?callback=?";
$.getJSON(URL, function(data){
$.each(data, function(key, value){
$('.res').append(key+": "+ value)
})
})

})

I just cant access the data, despite trying to do so several other ways from the each function
Bruce Young
@mutantspore
May 28 2016 16:26
e.preventDefault();
@ToccataN a pen would be better to work it out
Riston Denaux
@ToccataN
May 28 2016 16:27
is that the line that is messing it up?
Bruce Young
@mutantspore
May 28 2016 16:33
@ToccataN look in the brower dev console for results
http://codepen.io/MutantSpore/pen/LZYWmr?editors=1010
Riston Denaux
@ToccataN
May 28 2016 16:33
I am looking, its getting stuff back, I just seems to be missing something.
Bruce Young
@mutantspore
May 28 2016 16:34
&callback=?
Riston Denaux
@ToccataN
May 28 2016 16:36
ah yes....
hmmm well now at least Im getting back "objects", which is more than before
Bruce Young
@mutantspore
May 28 2016 16:36
and really the prevent default is as I showed earlier e.preventDefault();
@ToccataN yes some fun picking them appart
The computer overwrites its own moves sometimes
Can someone tell me why
and how to fix it
??
Riston Denaux
@ToccataN
May 28 2016 16:38
thanks @mutantspore
CamperBot
@camperbot
May 28 2016 16:38
toccatan sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1647 | @mutantspore |http://www.freecodecamp.com/mutantspore
Aryan
@aryandua
May 28 2016 16:47
hello?
No one here wants to answer my question
???
Toni Shortsleeve
@KoniKodes
May 28 2016 16:57
@CSStiles There are couple of good tutorials out there. Try http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/ or http://www.tutorialspoint.com/bootstrap/ . They may help you.
Sorin Ruse
@sorinr
May 28 2016 16:58
@aryandua the problem its in ur code. the comp after some moves its no longer responding
Aryan
@aryandua
May 28 2016 16:59
@sorinr its because the comp overwrites iits own move
Sorin Ruse
@sorinr
May 28 2016 16:59
@aryandua then change the logic
Aryan
@aryandua
May 28 2016 17:00
yes i want help on that
chetanmahore
@chetanmahore
May 28 2016 17:00
hello
i'm working on tribute page.
Can anyone help me to make everything centered on the page?
Aryan
@aryandua
May 28 2016 17:01
put it in a center tag @chetanmahore
chetanmahore
@chetanmahore
May 28 2016 17:02
I want to make it using bootstrap, not html
Gilbert Smith
@GJSmith3rd
May 28 2016 17:03
try class text-center for bootstrap
chetanmahore
@chetanmahore
May 28 2016 17:03
@GJSmith3rd there, i used this tag, but it only centers text.
Gilbert Smith
@GJSmith3rd
May 28 2016 17:03
oh what images?
chetanmahore
@chetanmahore
May 28 2016 17:03
There is also an image in the content.
Aryan
@aryandua
May 28 2016 17:04
@chetanmahore I did my page on sachin too!
chetanmahore
@chetanmahore
May 28 2016 17:05
@aryandua hehe, cool
can you help out with this
Aryan
@aryandua
May 28 2016 17:05
Tommorow is IPL finals
@chetanmahore yes
@chetanmahore just use the <center>
<center>
YOUR HTML
</center>
Gilbert Smith
@GJSmith3rd
May 28 2016 17:06
try center-block and/or center-block class
chetanmahore
@chetanmahore
May 28 2016 17:07
@GJSmith3rd ok
Gilbert Smith
@GJSmith3rd
May 28 2016 17:07
yeah center-block you already have img-responsive
it works i just tried it on your pen @chetanmahore
chetanmahore
@chetanmahore
May 28 2016 17:09
i can put it under same div as text-center ? right?
Gilbert Smith
@GJSmith3rd
May 28 2016 17:09
yep just use a space in class="this that"
J.S. Toy
@toymechqm
May 28 2016 17:10
I have a 100vh landing page. where the image takes up the entire viewport
how would I hide the nav bar until AFTER you scroll past the image?
Gilbert Smith
@GJSmith3rd
May 28 2016 17:10
class="img-responsive center-block"
sorry put it in the img tag under class
chetanmahore
@chetanmahore
May 28 2016 17:11
ohh, i was putting it under div class.
it didn't work.
Gilbert Smith
@GJSmith3rd
May 28 2016 17:12
repost the pen
Gilbert Smith
@GJSmith3rd
May 28 2016 17:14
too many quotes! " img-repsonsive center-block"
chetanmahore
@chetanmahore
May 28 2016 17:14
opps, sorry. it worked now. I was putting quotes for individual properties.
Gilbert Smith
@GJSmith3rd
May 28 2016 17:14
great
chetanmahore
@chetanmahore
May 28 2016 17:14
thanks @GJSmith3rd
CamperBot
@camperbot
May 28 2016 17:14
chetanmahore sends brownie points to @gjsmith3rd :sparkles: :thumbsup: :sparkles:
:cookie: 501 | @gjsmith3rd |http://www.freecodecamp.com/gjsmith3rd
Dominic Lobban
@alkapwn3d
May 28 2016 17:21
@dagman its a thing i guess
Islam Ibakaev
@dagman
May 28 2016 17:22
do it means that looks good?
chetanmahore
@chetanmahore
May 28 2016 17:22
looks super cool as titled
bio font size is big, make it smaller
Islam Ibakaev
@dagman
May 28 2016 17:23
@alkapwn3d @chetanmahore thx guys
CamperBot
@camperbot
May 28 2016 17:23
dagman sends brownie points to @alkapwn3d and @chetanmahore :sparkles: :thumbsup: :sparkles:
:cookie: 151 | @chetanmahore |http://www.freecodecamp.com/chetanmahore
:cookie: 37 | @alkapwn3d |http://www.freecodecamp.com/alkapwn3d
Riston Denaux
@ToccataN
May 28 2016 17:30
haha now I cannot get the thing to reveal offline users
Davide
@K3nzie
May 28 2016 17:33
The search field in the wikipedia viewer will be a tough one haha
Riston Denaux
@ToccataN
May 28 2016 17:36
how so?
Davide
@K3nzie
May 28 2016 17:37
well I never implemented an ajax search field hehe
Riston Denaux
@ToccataN
May 28 2016 17:41
yeah, its interesting, are you doing the action: "opensearch"?
Davide
@K3nzie
May 28 2016 17:52
still didn't start, I first need to do some researching
Riston Denaux
@ToccataN
May 28 2016 18:22
yeah, I cant figure out how to determine if channel is online or offline
from the api data, its not in there
Will Power
@restartedwill
May 28 2016 18:34
For the personal profile project, I'm trying to float a nav bar. I'm using Bootstrap. I googled, and have a CSS-based solution that should be working by setting the top to 0. But it doesn't work. Is this a CodePen issue?
Davide
@K3nzie
May 28 2016 18:35
guys what does it means when the console is blocking content showing from a specific api?
matthew3454
@matthew3454
May 28 2016 18:43
@khaduch thank you
CamperBot
@camperbot
May 28 2016 18:43
matthew3454 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1215 | @khaduch |http://www.freecodecamp.com/khaduch
matthew3454
@matthew3454
May 28 2016 18:44
I'm working on the "Show the local weather app" and I'm wondering where to find the city code for my my location. If someone knows that would be great.
storbeck
@storbeck
May 28 2016 18:49
why do you need city code when you can get longitude and latitude
matthew3454
@matthew3454
May 28 2016 18:55
@storbeck I guess you're right. I don't thank you.
CamperBot
@camperbot
May 28 2016 18:55
matthew3454 sends brownie points to @storbeck :sparkles: :thumbsup: :sparkles:
:star2: 1620 | @storbeck |http://www.freecodecamp.com/storbeck
storbeck
@storbeck
May 28 2016 18:55
hm ok
Aryan
@aryandua
May 28 2016 19:02
@matthew3454 Why not
?
Juwdohr
@Juwdohr
May 28 2016 19:11
Need some help, when recalling the previous number it will display properly then says it is a NaN.
http://codepen.io/juwdohr/pen/eZoNKB
Colin Harrison
@giraffesinspace
May 28 2016 19:12
Can someone tell me what's wrong with my <div>'s because I have two images and I cannot get them to be on a single row
Actually what is the importance of a container
Juwdohr
@Juwdohr
May 28 2016 19:15
@giraffesinspace you have a link to what your talking about with the divs?
Juwdohr
@Juwdohr
May 28 2016 19:20
the containers is for the bootstrap col-- to work properly.
Colin Harrison
@giraffesinspace
May 28 2016 19:21
I added a container so why aren't my bootstrap col's working
Juwdohr
@Juwdohr
May 28 2016 19:22
2 image is extremly large so its pushing onto a second row.
Colin Harrison
@giraffesinspace
May 28 2016 19:23
can I make it smaller somehow?
Juwdohr
@Juwdohr
May 28 2016 19:23
css
check out img on w3schools
fearlessinc
@fearlessinc
May 28 2016 19:24

I can not get data in the console for some reason any suggestions please `$(document).ready(function(){
var url, value, entry;

$('#press').on('click', function(){
value = $("input#searchbox").val();
url = 'https://en.wikipedia.org/w/api.php?action=opensearch&datatype=json&limit=5&search='+ value +'&callback=?';

console.log(value,url);

$.getJSON(url, function(data){
console.log(data);
$('header').append(data);
});
});
});
`

Juwdohr
@Juwdohr
May 28 2016 19:25
@giraffesinspace also its col-md-6 not col-med-*
fearlessinc
@fearlessinc
May 28 2016 19:26
Riston Denaux
@ToccataN
May 28 2016 19:27
I dont think this looks too bad, I just need to figure out how to determine if the resulting channels are offline or not.
Dave
@BeingDS
May 28 2016 19:29
Hi, I'm working on my Personal Portfolio Page... and I don't think I've gotten to the part of the course where how to make a button do anything is covered. I know how to make a button and style it, but telling the button what to do when it is clicked... I can't seem to find that anywhere. Doesn't that require Javascript?
Juwdohr
@Juwdohr
May 28 2016 19:29
@BeingDS depends on what the button is doing if it is a link to something no.
Dave
@BeingDS
May 28 2016 19:30
It's a "Contact me" button. It takes the inputs from several text fields and composes and sends and email.
Matthew D.
@m4tty-d
May 28 2016 19:35
@BeingDS Hey! The type of the button should be submit. (type="submit")
Dave
@BeingDS
May 28 2016 19:36
@m4tty-d I do, but I'm not linking to anything. I'm taking inputs from my page and sending an email. I googled how to do a mailto link, but how do I get the button to take the text entries and put them in the email?
Eli
@theprofi
May 28 2016 19:37
Guys im doing the Tribute page challenge. How can I make the corners of the img round?
Matthew D.
@m4tty-d
May 28 2016 19:37
Just edited my answer.
I tried to read how to make the corners round but everything I tried wasnt the perfect solution
Dave
@BeingDS
May 28 2016 19:38
@m4tty-d So I guess what's confusing me is how does the submit button know what it's submitting? How to I tell it which text entries to submit? How does it know where those entries go in the email it generates?
Matthew D.
@m4tty-d
May 28 2016 19:38
@BeingDS You should create a form. Are you using Bootstrap?
Dave
@BeingDS
May 28 2016 19:39
@m4tty-d Yes. I guess I need to go back and redo those bonfires. Does a submit button in a form submit everything in that form?
Bruce Young
@mutantspore
May 28 2016 19:39
@fearlessinc th eform tag causes the page to reload on submit (notmal behavior). So you need to stop that using event.prevenDefault();
http://codepen.io/MutantSpore/pen/MeWmzB?editors=1011
Matthew D.
@m4tty-d
May 28 2016 19:39
@BeingDS Yes.
matthew3454
@matthew3454
May 28 2016 19:40
Hello everyone. I'm still working on the the show the local weather app project, and I don't know what to add to my api code to make it contain my location. Can someone give me a pointer? This is what I have so far:
whoops it's this one:
jv
@jv88899
May 28 2016 19:41
@matthew3454 Hi Matthew, I used a ip-api.com to get longitude and latitude. So, I started with something like this:
$(document).ready(function() {
  $.getJSON("http://ip-api.com/json", function(json) {
    var myLat = json.lat;
    var myLon = json.lon;
Matthew D.
@m4tty-d
May 28 2016 19:42
@BeingDS Also, would you like to send the email from your server? If yes than you can't use javascript, you should use php.
matthew3454
@matthew3454
May 28 2016 19:43
@jv88899 I'll give it a try thanks
CamperBot
@camperbot
May 28 2016 19:43
matthew3454 sends brownie points to @jv88899 :sparkles: :thumbsup: :sparkles:
:cookie: 274 | @jv88899 |http://www.freecodecamp.com/jv88899
Riston Denaux
@ToccataN
May 28 2016 19:47
@mutantspore hi again. do you know how to get whether a stream/channel is online or offline on the twitch API? I cant really see where to access that anywhere in the JSON/REST response
Juwdohr
@Juwdohr
May 28 2016 19:49
Any help would be appreciated:
http://codepen.io/juwdohr/pen/eZoNKB
Riston Denaux
@ToccataN
May 28 2016 19:50
what are you trying to do?
as in whats wrong?
jv
@jv88899
May 28 2016 19:51
I'm working on the weather app and I created the following code to change F to C and C to F. However, when I click the button the first time, the button that is generated cannot be clicked. Any ideas why?
$("button").click(function() {
        if (tempFormat === "f") {
          tempFormat = "c";
          tempDivInfo = (tempDivInfo - 32) / (9 / 5);
          $(tempDiv).replaceWith("<p> " + Math.round(tempDivInfo) + " <button> C </button>" + "</p>");
        } else if (tempFormat === "c") {
          tempFormat = "f";
          tempDivInfo = (tempDivInfo * 1.8) + 32;
          $(tempDiv).replaceWith("<p> " + Math.round(tempDivInfo) + " <button> F </button>" + "</p>");
          }
        // need to change the temp on the page now
        // need to figure out a way to change the temp back
      });
Dave
@BeingDS
May 28 2016 19:51
@m4tty-d Thanks!
CamperBot
@camperbot
May 28 2016 19:51
beingds sends brownie points to @m4tty-d :sparkles: :thumbsup: :sparkles:
:cookie: 137 | @m4tty-d |http://www.freecodecamp.com/m4tty-d
Matthew D.
@m4tty-d
May 28 2016 19:52
@BeingDS Hope I could help. :)
Riston Denaux
@ToccataN
May 28 2016 19:53
@jv88899 hey try organizing the clicks by odd & even
Juwdohr
@Juwdohr
May 28 2016 19:53
@ToccataN I keep getting NaN when using the Ans button not sure why.
Riston Denaux
@ToccataN
May 28 2016 19:57
have you tried doing an .empty() function on it? maybe it is chucking it into an array or string?
Kyle W Pilkinton
@tadake
May 28 2016 19:58
hey guys why aren't my buttons equal? lol I'm know I'm over looking something http://codepen.io/tadake/pen/VjZNON
jv
@jv88899
May 28 2016 19:58
@ToccataN I'm sorry, I'm not sure what you mean?
EtherealPain
@EtherealPain
May 28 2016 20:00
Hello guys, check out my wikipedia search page. It's mostly finished, I just need a nice background I can use with parallax and the footer with the credits https://codepen.io/EtherealPain/full/BzaRxW/
Riston Denaux
@ToccataN
May 28 2016 20:00
@jv88899 check out how I did it, its at the botom of the JS windowhttp://codepen.io/ToccataN/pen/yOWKJJ
Riston Denaux
@ToccataN
May 28 2016 20:12
@EtherealPain hey looks pretty nice
jv
@jv88899
May 28 2016 20:15
@ToccataN Sorry, I still don't get it. I'm not seeing how it changes the temp?
jv
@jv88899
May 28 2016 20:47
Hello everyone, for the Wikipedia viewer, can you complete that project with just JS/jQuery? Or do you need to use something like Angular?
Bruce Young
@mutantspore
May 28 2016 20:50
@jv88899 no you don’t need Angular, FCC no longer even teaches it.
jv
@jv88899
May 28 2016 20:50
@mutantspore Awesome, thanks! Just curious, why did they stop teaching it?
CamperBot
@camperbot
May 28 2016 20:50
jv88899 sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1648 | @mutantspore |http://www.freecodecamp.com/mutantspore
Bruce Young
@mutantspore
May 28 2016 20:51
@jv88899 moved to React instead
Konstantin
@kostanakis
May 28 2016 20:55
@ToccataN Looks nice, but it will be perfect to have choice Celsius/Fahrenheit
Kenzo Mendoza
@KenzoM
May 28 2016 21:42
Hello all, I have a quick question
Im almost finished making my portfolio page and I'd like to add a header section like so in this template: http://blackrockdigital.github.io/startbootstrap-creative/
I've been trying to figure out how you can set a background picture?
here's what I have so far: http://codepen.io/neotriz/pen/gMORXo
As you can see right below the navbar, the picture doesnt display the whole thing, but rather it is constrained
does anyone have any hints? I've tried to reverse engineer, but I cant seem to find it
Kevin Min
@placidmoon1
May 28 2016 21:45
Can someone help me tell why doesn't my weather app show anything?
http://codepen.io/placidmoon1/pen/zBYNxV?editors=1011
Riston Denaux
@ToccataN
May 28 2016 21:53
@kostanakis it does, if you click on the temp it will change.
thanks though for the feedback! i should probably make it more obvious that it does that
Joost
@joostvanheesbeen
May 28 2016 22:06
Hi Guys- made a random chuck norris joke generator: http://codepen.io/joostvanheesbeen/pen/qNBjoa I think I'm nearly there just literally only need to get the right syntax to pull the joke from the API..... Anyone that can help?
RompePC
@RompePC
May 28 2016 22:16
@Neotriz Interesting, I was going to make a small tuto to say how to do a simple background for the body. Just add a <img> to <body>, and set its CSS to this:
@Neotriz
img#background {
  /* Positioning. */
  position: absolute;
  z-index: -1;

  /* Box-model. */
  width: 100%;
  height: 100%;
}
Bruce Young
@mutantspore
May 28 2016 22:21
@joostvanheesbeen console.log(result.value.joke);
Joost
@joostvanheesbeen
May 28 2016 22:24
thanks @mutantspore got it :)
CamperBot
@camperbot
May 28 2016 22:24
joostvanheesbeen sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1649 | @mutantspore |http://www.freecodecamp.com/mutantspore
Keenen Garnett
@Wallyw4
May 28 2016 22:57
Hey how do i link my codepen
What do you guys think? http://codepen.io/Wallyw4/pen/qNBjgr
for some reason you have to make the twitter open in a new tab idk why it doesnt automatically
EtherealPain
@EtherealPain
May 28 2016 23:01
it gives me the same quote over and over again @Wallyw4
CSStiles
@CSStiles
May 28 2016 23:01
@KoniKodes thanks!
CamperBot
@camperbot
May 28 2016 23:01
csstiles sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 276 | @konikodes |http://www.freecodecamp.com/konikodes
EtherealPain
@EtherealPain
May 28 2016 23:02
nevermind, I just had to open it