These are chat archives for FreeCodeCamp/HelpFrontEnd

29th
Aug 2016
Greg Duncan
@GregatGit
Aug 29 2016 00:25
@bmo84 can you post your pen up?
Kantra
@removed~kantrakantra
Aug 29 2016 00:32

This text needs to remain centered throughout the animation

Hey guys, can anybody help me center the text during this css animation

Moisés Man
@moigithub
Aug 29 2016 00:36
wonders.. what text.. cuz all looks very centered to me @kantrakantra
Tomislav Perić
@tomislavperich
Aug 29 2016 00:37
@kantrakantra Wrap the last letter into <span> and set it's style to letter-spacing: 0;
@kantrakantra Since the last letter also has the same letter-spacing like all the other letters before it.
*its
Kantra
@removed~kantrakantra
Aug 29 2016 00:47
@tomislavperich Can you elaborate on why this works?
Tomislav Perić
@tomislavperich
Aug 29 2016 00:49
@kantrakantra Basically every letter has it's own letter spacing aka kerning (individual space between two letters). In this instance, the last letter also has letter space that goes after it - therefor the whole sentence appears less wide than it actually is with it's space.
@kantrakantra C_O_N_S_U_LT, and when you wrap the last letter (T) in span and set it's letter-spacing to 0, it becomes C_O_N_S_U_L_T without the last space.
@kantrakantra (There was meant to be another underscore in the first CONSULT example after the T)
C_O_N_S_U_L_T_ vs. C_O_N_S_U_L_T
Kantra
@removed~kantrakantra
Aug 29 2016 00:52
@tomislavperich Ahhhhhh! I see. Makes perfect sense. Thx
CamperBot
@camperbot
Aug 29 2016 00:52
kantrakantra sends brownie points to @tomislavperich :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @tomislavperich |http://www.freecodecamp.com/tomislavperich
Tomislav Perić
@tomislavperich
Aug 29 2016 00:52
@kantrakantra Np :) Good luck with your project.
Hugo Machado
@snake7up
Aug 29 2016 01:02
guys can you help me, i want to remove space between rows but everything i tried to do didnt work, here is the picture http://imgur.com/a/e4sQR
miriam-z
@miriam-z
Aug 29 2016 01:06
Hi I am following a mock-up which is 1440 width and has 4 thumbnails on one row which should each be 320px wide and a 40px margin in-between. and 20px margin on the left and right of the row.
but when I am creating this in html it is not working
is there something I am missing here as it is not adding up
the last thumbnail drops to the next row? This is being done using bootstrap
Tomislav Perić
@tomislavperich
Aug 29 2016 01:11
@miriam-z Make sure the parent div/element has no padding at all.
miriam-z
@miriam-z
Aug 29 2016 01:12
@tomislavperich thanks for your comment the div doesn’t have any padding
CamperBot
@camperbot
Aug 29 2016 01:12
miriam-z sends brownie points to @tomislavperich :sparkles: :thumbsup: :sparkles:
:cookie: 121 | @tomislavperich |http://www.freecodecamp.com/tomislavperich
miriam-z
@miriam-z
Aug 29 2016 01:13
any other suggestions?
Tomislav Perić
@tomislavperich
Aug 29 2016 01:13
Have you tried with:

.marginRow {
    margin: 0px !important;
}

so you'd set both top and bottom.
@snake7up
@miriam-z Is there a way I can take a look at the code?
Gustavo Salgado
@onepointtwentyonegigawatts
Aug 29 2016 01:14
                                                                             http://codepen.io/onepointtwentyonegigawatts/pen/jAgKdb
miriam-z
@miriam-z
Aug 29 2016 01:17

`<div class="row-fluid">

<div class="col-md-3">
<a href="#" class="thumbnail img-responsive">
<img src="img/thumbnail_1.jpg" alt="thumbnail-1" /></a>

<h2>Heading<br>
<span>some text</span></h2>
</div>`

It is this 4 times for each thumbnail

`div.row-fluid {
padding: 0px;
}

div.col-md-3 {
position: relative;
width: 320px;
padding: 0px;
}

a.thumbnail.img-responsive {
position: relative;
border: 0px;
padding: 0px;
width: 100%;
max-width: none;
margin-bottom: 0px;
}
`

this is the css
Tomislav Perić
@tomislavperich
Aug 29 2016 01:20
@miriam-z Try setting the div's width to 20% and margin to 0. Also set a's margin to 0
miriam-z
@miriam-z
Aug 29 2016 01:20
@tomislavperich thanks please explain why the divs width should be changed to 20%?
CamperBot
@camperbot
Aug 29 2016 01:20
miriam-z sends brownie points to @tomislavperich :sparkles: :thumbsup: :sparkles:
:warning: miriam-z already gave tomislavperich points
Hugo Machado
@snake7up
Aug 29 2016 01:21
i did
but didnt work
Tomislav Perić
@tomislavperich
Aug 29 2016 01:22
@miriam-z It automatically calculates the needed width instead of using a fixed one. A better habit of sizing things later on also.
@miriam-z 20% is 20% width of the parent element; therefor if there's 4 divs, each would have a width of 20% and fit perfectly. The rest to figure out are paddings and margins.
miriam-z
@miriam-z
Aug 29 2016 01:24
:+1:
thanks but they are now all stacked on top of each other instead of sitting on the same row
rybka02
@rybka02
Aug 29 2016 01:25
Any jquery gurus here?
miriam-z
@miriam-z
Aug 29 2016 01:26
I had 20% on the wrong div :)
no worries
Tomislav Perić
@tomislavperich
Aug 29 2016 01:26
@miriam-z Alright :D
Margaret
@Margaret2
Aug 29 2016 01:29
@snake7up
.well {
  margin-bottom:0px;
}
Hugo Machado
@snake7up
Aug 29 2016 01:30
@Margaret2 Thanks very much ... it worked! i guess i was chaning the wrong div
CamperBot
@camperbot
Aug 29 2016 01:30
snake7up sends brownie points to @margaret2 :sparkles: :thumbsup: :sparkles:
:cookie: 345 | @margaret2 |http://www.freecodecamp.com/margaret2
paulrishworth
@paulrishworth
Aug 29 2016 02:16
@ndburrus thanks norvin ... couldn't work out how to search the wiki yesterday, but have got it figured now.
CamperBot
@camperbot
Aug 29 2016 02:16
paulrishworth sends brownie points to @ndburrus :sparkles: :thumbsup: :sparkles:
:star2: 1947 | @ndburrus |http://www.freecodecamp.com/ndburrus
Dakota Vaughn
@StruckCroissant
Aug 29 2016 02:17
Hey, can anybody help me with some bootstrap related alignment issues?
Norvin Burrus
@ndburrus
Aug 29 2016 02:18
@paulrishworth you're welcome! excellent! glad to hear! :+1:
Tim Evearitt
@timevearitt
Aug 29 2016 02:25
Hi all, I'm having some issues with my page anchor tags (only on mobile). I've been banging my head for hours. Not sure if this is a code pen issue or something with my code. http://codepen.io/tevearitt/pen/WxqYwR
I should specify, these are the bookmark anchors. Understood _blank must be used to open a new page
Ken Haduch
@khaduch
Aug 29 2016 02:40
@StruckCroissant - what have you got?
Dakota Vaughn
@StruckCroissant
Aug 29 2016 02:41
@khaduch - I fixed the issue, however could i ask your opinion on the page i fixed?
Ken Haduch
@khaduch
Aug 29 2016 02:41
@StruckCroissant sure
Hugo Machado
@snake7up
Aug 29 2016 02:44
guys can you tell me why my list is not working right ... the dot dont appear http://codepen.io/snake7up/pen/PzrqPy
Ken Haduch
@khaduch
Aug 29 2016 02:45
@timevearitt - I just tried it on my phone and it looks like it opened a new page? The bulldog tribute page - is that the only link you have that should do this?
Dakota Vaughn
@StruckCroissant
Aug 29 2016 02:45
@snake7up Because your image is over it
Hugo Machado
@snake7up
Aug 29 2016 02:45
but i thought the rows were side by side
the image is in one row and text in another
Dakota Vaughn
@StruckCroissant
Aug 29 2016 02:46
For me the text loaded before the image, the dot is definately there
Hugo Machado
@snake7up
Aug 29 2016 02:47
hum ok thank you @StruckCroissant will try to figure it out
CamperBot
@camperbot
Aug 29 2016 02:47
snake7up sends brownie points to @struckcroissant :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @struckcroissant |http://www.freecodecamp.com/struckcroissant
Dakota Vaughn
@StruckCroissant
Aug 29 2016 02:48
@snake7up - im still going to work around on it, if i find a solution ill tell you
Hugo Machado
@snake7up
Aug 29 2016 02:48
wow thank you for trying
Jaren Escueta
@jarenescueta731
Aug 29 2016 02:50
anyone good at bootstrap 3 know why my navbar links don't change background color when i use scrollspy?
here's my css statement that tries:
.navbar-default .navbar-nav li.active {
    background-color: #ea8d41;
}
the color should change to orange but it still ends up using the default grey
Hugo Machado
@snake7up
Aug 29 2016 02:54
@StruckCroissant i just changed the margin of the photo, and dot appeared but thanks man i preciate
CamperBot
@camperbot
Aug 29 2016 02:54
snake7up sends brownie points to @struckcroissant :sparkles: :thumbsup: :sparkles:
:warning: snake7up already gave struckcroissant points
Dakota Vaughn
@StruckCroissant
Aug 29 2016 02:54
@snake7up your columns also need to add up to 12 per row
Hugo Machado
@snake7up
Aug 29 2016 02:54
@StruckCroissant will do
Dakota Vaughn
@StruckCroissant
Aug 29 2016 02:56
If you change your col's to col-md-6 Personally i find it looks better, the picture acts as a thumbnail
Ken Haduch
@khaduch
Aug 29 2016 02:56
@StruckCroissant - I think that the backgrounds are a little "busy", but it looks fairly good - the one thing that doesn't work too well, in my opinion, is the "Contact" icons when the window is narrowed - probably a minor tweak would make them be centered.
Dakota Vaughn
@StruckCroissant
Aug 29 2016 02:57
Yeah i have no idea why they are left aligned to the columns
The portfolio thumbnails were doing that until I actually used the class thumbnail
Ken Haduch
@khaduch
Aug 29 2016 03:00
@StruckCroissant - I cannot see the class "row-centered" defined anywhere? I added "text-center", and it at least aligns them in the center on the narrow screen?
Dakota Vaughn
@StruckCroissant
Aug 29 2016 03:02
@khaduch that's just an empty class i was working with, I plan on going through and getting rid of useless classes
@khaduch huh, it seems that text-center fixed that problem, thank you very much
CamperBot
@camperbot
Aug 29 2016 03:04
struckcroissant sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1597 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Aug 29 2016 03:08
@StruckCroissant -ok, great! You're welcome...
Dakota Vaughn
@StruckCroissant
Aug 29 2016 03:09
@khaduch What do you mean by the backgrounds are a bit "busy"?
codeandrew
@codeandrew
Aug 29 2016 03:20
hello guys! I'm having some issues with the responsiveness of my code.
I already written a code for max-width640px, max-width540px, max-width480px
but when I open my site on a 480px width phone. it reads the 640px codes
Dylan
@dhcodes
Aug 29 2016 03:24
@codeandrew can you paste your code?
or at least the max-width parts?
are you using a media query?
Ken Haduch
@khaduch
Aug 29 2016 03:36
@StruckCroissant - there is too much color and distraction (my opinion, at least) it distracts from the content that you really want the site visitors to notice.
Dakota Vaughn
@StruckCroissant
Aug 29 2016 03:36
@khaduch Alright, so removing the picture backgrounds might be beneficial?
Ken Haduch
@khaduch
Aug 29 2016 03:39
@StruckCroissant - having some that are a little less noticeable - more subtle colors, softer / blurred images that show something like an office scene is something that is less of a distraction. I liked some of the backgrounds that are shown on this site: http://lea.verou.me/css3patterns - textured backgrounds generated using CSS3.
Dakota Vaughn
@StruckCroissant
Aug 29 2016 03:45
@khaduch Take a look now, bit better?
buiphuking
@buiphuking
Aug 29 2016 03:46
someone has better way to do this, twitchtv???????????????????????
$(document).ready(function() {
  getChannelInfo();
  $(".selector").click(function() {
    $(".selector").removeClass("active");
    $(this).addClass("active");
    var status = $(this).attr('id');
    if (status === "all") {
      $(".online, .offline").removeClass("hidden");
    } else if (status === "online") {
      $(".online").removeClass("hidden");
      $(".offline").addClass("hidden");
    } else {
      $(".offline").removeClass("hidden");
      $(".online").addClass("hidden");
    }
  })
});
Ken Haduch
@khaduch
Aug 29 2016 03:47
@StruckCroissant - I think so, although I might not have chosen the wavy background - but it is more uniform and I think easier on the page viewer...
Tim Evearitt
@timevearitt
Aug 29 2016 03:49
@khaduch - Thanks for looking, the issue is the navbar links. On mobile the page bookmarks don't work. For example if you click Social the page just move to bottom. Seems to work find from a laptop.
CamperBot
@camperbot
Aug 29 2016 03:49
timevearitt sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1598 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Aug 29 2016 03:56
@timevearitt - oh, let me see if I can find your page again and do a quick check on the code... although I'm fading out here... ;)
Ken Haduch
@khaduch
Aug 29 2016 04:00
@timevearitt - have you tried putting your section IDs on the <div> elements instead of the <a> tags? Not sure if that's going to be it, but that looks a little strange?
Tim Evearitt
@timevearitt
Aug 29 2016 04:01
yeah i tried it on the div's and didn't seem to work either.
so I had something like <div id="contact">
Ken Haduch
@khaduch
Aug 29 2016 04:03
@timevearitt - well, mobile browsers seem to be less tolerant of different types of errors, there are a lot of invalid HTML issues on your page. Not sure if that would be it, either... I'm toying around with it a little...
Tim Evearitt
@timevearitt
Aug 29 2016 04:04
Thanks for looking, I also had tried it with a plan page and didn't have luck getting it to work on mobile either.
Ken Haduch
@khaduch
Aug 29 2016 04:09
@timevearitt - I thought I had my page working, but it doesn't seem to be jumping to the sections on mobile, either? Crazy!
Tim Evearitt
@timevearitt
Aug 29 2016 04:11
Yeah, I was going crazy so started looking at other pages and code and didn't really find any that worked on my iPhone. hmm
Ken Haduch
@khaduch
Aug 29 2016 04:12
@timevearitt - I think that it is a problem looking at it in the CodePen interface? Try looking at the debug view on your phone - I found that mine worked when I did that - change from "/pen/" to "/debug/" in your URL - it eliminates the CodePen dashboard...
@timevearitt - So the version that I modified is working on my mobile phone, at least in the Chrome browser - I went back to putting the ID values on the divs for each section, but I'm not sure if that is doing the trick. But take a look at my fork of your profile. I also added the "Most common viewport meta tag" (go into the HTML config panel and click that link at the bottom.) I posted the debug link in my version - that's the one that should work.
Tim Evearitt
@timevearitt
Aug 29 2016 04:17
@khaduch - Yeah, seems to actually work in debug mode but my page didn't resize as I expected in debug mode so I'll have to fix that issue.
Ken Haduch
@khaduch
Aug 29 2016 04:17
@timevearitt - yes, if you add that viewport meta tag that I mentioned - it should fix that resizing issue.
Tim Evearitt
@timevearitt
Aug 29 2016 04:19
@khaduch - Pulled your up and looks perfect. Thanks so much! I'll get that viewport tag added tomorrow, fading out myself for the night!
CamperBot
@camperbot
Aug 29 2016 04:19
timevearitt sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: timevearitt already gave khaduch points
Ken Haduch
@khaduch
Aug 29 2016 04:19
@timevearitt - ok, Tim - you all set? I hope so, I cannot explain the problem with using the CodePen view of the page, but there is probably some issue with how the page is presented in that mode. I'm signing off - you're welcome!
Tim Evearitt
@timevearitt
Aug 29 2016 04:20
@khaduch - Had a feeling, thanks so much for the assist! Have a great night.
CamperBot
@camperbot
Aug 29 2016 04:20
timevearitt sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: timevearitt already gave khaduch points
Ryan Apolinar
@ryanapolinar
Aug 29 2016 04:32
Hello, whenever my Bootstrap Columns change from their XS setting to their SM setting, the page suddenly gains more width and a horizontal scrollbar appears. All my columns add up to 12, or less, so I don't know what's causing it. Here is the Codepen
It only happens when the page width gets larger than 770 pixels or so
Nevermind, fixed it by adding container-fluid to the parent instead of container
tyl-er
@tyl-er
Aug 29 2016 06:28

Trying to set up my background image. Not sure why the if statement at the end of my code isn't working.
http://codepen.io/tyl-er/pen/bZXArK

if ($scope.Data.des === "clear") {
document.getElementById('background').background = "https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&s=67e0f69f50e9477c8980ad9cdacd6b9e";
}
else {
document.getElementById('background').background = "http://openweathermap.org/themes/demo/assets/vendor/owm/images/logo_OpenWeatherMap_orange_website.png";
}

aushakov95
@aushakov95
Aug 29 2016 06:32
@tyl-er Are you using the current weather api from open weather?
tyl-er
@tyl-er
Aug 29 2016 06:37
I think so @aushakov95
aushakov95
@aushakov95
Aug 29 2016 06:40

@tyl-er
try adding

console.log($scope.Data.des)

right before the beggining of your if statement and look at your console to see if it contains anything

tyl-er
@tyl-er
Aug 29 2016 06:55
@aushakov95 I did. For some reason the console never works for me. Hmm actually it's giving me undefined. But that doesn't make sense because i'm using it before in the same function.
Chris Cullen
@123xylem
Aug 29 2016 07:37
http://codepen.io/123xylem/pen/JKqYZY?editors=0011
Please help why does my prompt function get overridden by the .boxclick function beneath it?
Chris Cullen
@123xylem
Aug 29 2016 07:51
$(document).ready(function() {
  user = prompt("Choose X or O", "Choose Wisely!");
  if(user == "X"||"x"){
    userX = true;
    userText = "X".css("color", "red");
  }
  else{
    userO = true;
    userText = "O".css("color", "blue");
  }
  console.log("Player chose symbol: " + user);
  $(".box").on('click', function act(){
    var id = $(this).attr('id');//id equals the id of the box clicked
    var index = null;

    for(var i = 0; i < choices.length; i++){
      if(boxesTaken[i] == id){   //if that id has been used
        console.log("This box is taken");
        alert("Choose Another Box");
      }
      if(choices[i] === id){      //If that is still available in choices
        console.log("Player chose box: " + id);
        $("#" + id).text(userText);
            boxesTaken.push(id);
             console.log(boxesTaken);

        answer.push(id.toUpperCase()); //NEEDED??
        removeChoice(i);
        cpu();
        break;
      }
    };
  })
});
Is this prompt written corectly? Its not executing after the first else statement...
Hey can anyone take a look at this for me please?
I'm struggi
*I'm struggling with a couple of things
  1. To scrape the page ID from the wikipedia API so I can turn the results into links
    So you can click them and go to the wiki page
    And also make it so that the search executes when you press the Enter key
    Rather than having to click the search button
    Can anybody help?
skdey
@skdey
Aug 29 2016 08:40
What is the best way to add photos on CodePen . Don't suggest CodePen Pro . Please suggest Free and Working Resources . Any help will be appreciated . Thanks in Advance
Chris Cullen
@123xylem
Aug 29 2016 08:58

@123xylem

$(document).ready(function() {
  user = prompt("Choose X or O", "Choose Wisely!");
  if(user == "X"||"x"){
    userX = true;
    userText = "X";
  }
  else{
    userO = true;
    userText = "O";    
    console.log(userText);

  }

Any idea why my else wont trigger?

Marc Vesper
@marcvesper
Aug 29 2016 09:19
I'm really struggling on most of the intermediate algorithm problems. When I look up the answers, they make sense, and I'm quite good at reverse engineering or just finding what I need to copy, adapt and plug it in, but when confronting the problems myself 'from scratch', I 'feel' what must be done, but don't know how to think in terms of planning/ designing it logically. Any newbie pointers on thinking structurally?
Darth Skywalker
@adityaparab
Aug 29 2016 09:24

@123xylem : Why are you tagging yourself? :P

also, not sure why your else won't trigger.

Additonally, you can simplify your if condition like

if(user.toLowerCase() == "x"){
Chris Cullen
@123xylem
Aug 29 2016 09:25
@adityaparab it was because the second or was always true apparently
thanks tho
Darth Skywalker
@adityaparab
Aug 29 2016 09:25
@123xylem : Right! For "x" || "X" is always true. For neither "X" nor "x" is falsy
Correct syntax for that would be
if(user == "X" || user == "x"){
r2d2
@UsamaHameed
Aug 29 2016 09:27
It is not the best design though :P
Darth Skywalker
@adityaparab
Aug 29 2016 09:27
Seems strong with the force @UsamaHameed
r2d2
@UsamaHameed
Aug 29 2016 09:28
It should be. I made it :laughing:
Darth Skywalker
@adityaparab
Aug 29 2016 09:28
Would be great if you can disable to the start button when timer is running and enable on pause.
Same goes for pause button.
@UsamaHameed
r2d2
@UsamaHameed
Aug 29 2016 09:29
Will do @adityaparab
Darth Skywalker
@adityaparab
Aug 29 2016 09:29
You've done good validation :)
r2d2
@UsamaHameed
Aug 29 2016 09:29
validation? Like stop the minutes from going to negative?
Darth Skywalker
@adityaparab
Aug 29 2016 09:30
Not only that. Not decrementing timer on clicking -10 button if current interval is less than 10 mins.
Timer doesn't screw up if I hit start multiple times.
And clicking reset while timer is on, resets the timer and stops it.
Good job!
r2d2
@UsamaHameed
Aug 29 2016 09:31
Yes. Feels good man! :smile:
Darth Skywalker
@adityaparab
Aug 29 2016 09:32
One issue though. If the timer is running, and I hit -1, it cuts down the timer by 1 min.
same for other buttons.
Allow that when the timer is not running, and it's good
r2d2
@UsamaHameed
Aug 29 2016 09:33
Before I put an if statement on the start button listener, you could hit the start button multiple times and actually start multiple setIntervals that sped the clock up :laughing:
Okay. Will do. Disable those buttons when timer is running.
Darth Skywalker
@adityaparab
Aug 29 2016 09:34
@UsamaHameed :Yeah, many newbies make that mistake. And the timer starts counting down exponentially. I wish that was possible in real life. so that I could do that as soon as I enter office and get out in 2 minutes of real time :P
Time Machine :D
r2d2
@UsamaHameed
Aug 29 2016 09:35
I thought of making a very lenient pomodoro. That can let you change the time on the go. Like if you want to change the time while it is already running, you could do that. (Assuming they do it for good purposes lol)
Darth Skywalker
@adityaparab
Aug 29 2016 09:35
@UsamaHameed : If that was intentional, then fine. Just don't let it happen as a bug and then advertise it as a "feature" :P
r2d2
@UsamaHameed
Aug 29 2016 09:35
Is there a limit to how many Async processes you can start?
Lol. Nope that was intentional.
Should disable the start button when it is clicked though.
Not the best design by the way.
Darth Skywalker
@adityaparab
Aug 29 2016 09:36
images.png
r2d2
@UsamaHameed
Aug 29 2016 09:36
rofl :D
Darth Skywalker
@adityaparab
Aug 29 2016 09:37
:P
Force works in mysterious ways :D
r2d2
@UsamaHameed
Aug 29 2016 09:38
I found a very passionate sith lord. :P
Here on gitter.
Darth Skywalker
@adityaparab
Aug 29 2016 09:38

Is there a limit to how many Async processes you can start?

Not that I am aware of

r2d2
@UsamaHameed
Aug 29 2016 09:39
He is a true star wars buff.
Darth Skywalker
@adityaparab
Aug 29 2016 09:39
@UsamaHameed Who is it?
I hope you see him here. :P
Darth Skywalker
@adityaparab
Aug 29 2016 09:39
ha!
r2d2
@UsamaHameed
Aug 29 2016 09:39
He is good :P
Darth Skywalker
@adityaparab
Aug 29 2016 09:39
good!
:D
Did I tell you I performed my first stand up comedy last weekend?
r2d2
@UsamaHameed
Aug 29 2016 09:40
Yes, you did
Darth Skywalker
@adityaparab
Aug 29 2016 09:40
I decided to go by the Stage name "Lord Vader" :P
r2d2
@UsamaHameed
Aug 29 2016 09:40
One question: the API calls are sent to the event loop once they are completed, right? Is it same for the Async processes, right?
Did you try to speak like him?
And where is this place exactly? India?
Stephen James
@sjames1958gm
Aug 29 2016 09:41
@UsamaHameed Yes, there is only one "thread" so the sync process are run on the same event loop.
Darth Skywalker
@adityaparab
Aug 29 2016 09:42

because Vader means, Father. It's a slight variation Dutch word for father and said like they in German. :D

And the joke was a on girls who are in relationships and refer to their boyfriends as "baby". So I just wanted to shit talk about them. I like it when my gf calls me daddy and that is why I go by the name Vader :P

r2d2
@UsamaHameed
Aug 29 2016 09:42
rofl :P
Darth Skywalker
@adityaparab
Aug 29 2016 09:42

One question: the API calls are sent to the event loop once they are completed, right? Is it same for the Async processes, right?

Yes. async calls are queued.

r2d2
@UsamaHameed
Aug 29 2016 09:43
You should watch the season "Seinfeld". It is about a guy who is a stand up comedian. He is good.
Darth Skywalker
@adityaparab
Aug 29 2016 09:43
Seinfeld is boring :D
Jim Jefferies and George Carlin are my favorites.
r2d2
@UsamaHameed
Aug 29 2016 09:44
Lol. You must know better :P
@UsamaHameed Yes, there is only one "thread" so the sync process are run on the same event loop.
@sjames1958gm Yeah I heard JS has only one thread.
Darth Skywalker
@adityaparab
Aug 29 2016 09:45
Punch line - There are some ladies over here who (describe all the couple activities really graphically with gory details) with a guy and they call him "baby". What are you? A pedophile? :P
r2d2
@UsamaHameed
Aug 29 2016 09:52
Lol. That pedophile thing always comes to my mind.
Why even call someone baby?
When there are other words.
Martine Ross
@moi238
Aug 29 2016 10:00

Hi I have a problem with my HTML for the personal profile page, I wanted smooth scrolling when the links on the navbar are clicked, I had it working fine and so I started to tidy up my code and have managed to delete something important, that made it work, but I can't work out what it is. I haven't touched the jquery and that and bootstrap is enabled so I know it's something I have deleted! The navigation itself still works I have posted all of the HTML below: <head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:300i,400,400i,500,500i,700,700i" rel="stylesheet" type "text/css">
<meta charset="UTF-8">
<link rel="stylesheet" href="css/style.css">
<script src='js/jquery.scrollto.js'></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="jquery.scrollNav.min.js"></script>

</head>

<style>
div {background-color: silver;
font-family: FiraSans, Arial;
vertical-align: middle;
text-align: center;
}

ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: lightskyblue;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
#Firstsection {

font-weight: bold;
font-size: 75px;
vertical-align: middle;
}
h1 {
position: absolute;
top: 200px;
left: 0;
width: 100%;
font-size: 75px;
color: white;

}
.image {
position: relative;
width: 100%;
background-color: silver;
}
#footer {
background-color: rebeccapurple;
text-align: center;
color: white;

}

#followGithub {
color: #121516;
text-shadow: 0 1px 1px #ccc;
padding: 0.2em 0.4em;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
-moz-box-shadow: 0px 0px 2px #666;
-webkit-box-shadow: 0px 0px 2px #666;
box-shadow: 0px 0px 2px #666;
background-color: #eeeeee;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#aaaaaa));
background-image: -webkit-linear-gradient(top, #eeeeee, #aaaaaa);
background-image: -moz-linear-gradient(top, #eeeeee, #aaaaaa);
background-image: -ms-linear-gradient(top, #eeeeee, #aaaaaa);
background-image: -o-linear-gradient(top, #eeeeee, #aaaaaa);
background-image: linear-gradient(top, #eeeeee, #aaaaaa);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#eeeeee', EndColorStr='#aaaaaa');
}
#followGithub img { position: relative; top: 2px; margin: 0 6px 0 0; }

</style>

<div class="container-fluid">
<body><script type="text/javascript">
jQuery(document).ready(function($) {

// Hook up the current state to the nav bar
$('.page-navigation').onePageNav();

});
</script>

<script>$(document).ready(function() {
$('#nav').onePageNav();
});</script>
<div>
<header><nav class="site-navigation page-navigation">
<ul class="menu">
<li id="Home"><a href="#Firstsection"><h3>Home</h3></a>
</li>
<li id="About"><a href="#AboutMe"><h3>About</h3></a>
</li>
<li id="Portfolio"><a href="#Portfolio"><h3>Portfolio</h3></a></li>
<li id="contact"><a href="#footer"><h3>Contact</h3></a>
</li>
</ul>
</nav>
</header>
</div>

<div id="Firstsection" class="image img-responsive"><img src="http://deathtothestockphoto.com/wp-content/uploads/TeaAndToast.jpg" class="larger-image" alt="Teaandtoast" />
<h1><b>MARTINE ROSS</b></h1></div>
<div id="Contactbuttons" class="inline">

Martine Ross
@moi238
Aug 29 2016 10:06

<a id="twitter" href="https://twitter.com/moi241" class="twitter-follow-button" data-size="large" data-show-count="false">Follow @moi241</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<a href="https://github.com/moi238" id="followGithub" class="noBg">
<img src="https://github.com/favicon.ico" />Follow me on Github
<a href="https://uk.linkedin.com/pub/martine-ross/b6/5a2/907">
<img src="https://static.licdn.com/scds/common/u/img/webpromo/btn_myprofile_160x33.png" width="160" height="33" border="0" alt="View Martine Ross's profile on LinkedIn">
</a>
<button id="FreeCodeCamp"><a href=https://freecodecamp.com/moi238>
<img src="https://cdn-images-1.medium.com/fit/c/30/30/1*MotlWcSa2n6FrOx3ul89kw.png" alt="freecodecampicon"/>FreeCodeCamp</a>
</button></div</div>

</body>
</div>

<div id="AboutMe"><h2><b>ABOUT</b></h2>
</div>
<div id="Portfolio" class="img-responsive">
<center><table> <h2><b>PORTFOLIO</b></h2>
<tr><td><img id="Thumbnail1" class="img-thumbnail" src="http://loremflickr.com/360/240?random=1" alt "placeholder1"/></td>
<td><img id="Thumbnail2" class="img-thumbnail" src="http://loremflickr.com/360/240?random=2" alt="placeholder2" /></td>
<td> <img id="Thumbnail3" class="img-thumbnail" src="http://loremflickr.com/360/240?random=3" alt="placeholder3" /></td></tr>
<tr><td><img id="Thumbnail4" class="img-thumbnail" src="http://loremflickr.com/360/240?random=4" alt="placeholder4" /></td>
<td> <img id="Thumbnail5" class="img-thumbnail" src="http://loremflickr.com/360/240?random=5" alt="placeholder5" /></td>
<td><img id="Thumbnail6" class="img-thumbnail" src="http://loremflickr.com/360/240?random=6" alt="placeholder6" /></td></tr>
</table></center>
</div>
<footer id="footer" class="inline">

<h4 class="_14">Follow me on</h4>
<button="social-icons">
<a href=" " class="social-icon ">
<a href="https://twitter.com/moi241 " class="twitter-follow-button " data-show-screen-name="false " data-show-count="false ">Follow @moi241</a><script async src="//platform.twitter.com/widgets.js " charset="utf-8 "></script>
<button><a href=" " class="social-icon "><a href="https://github.com/moi238 " title="Follow moi238 on Github " id="followGithub " class="noBg ">
<img src="https://github.com/favicon.ico " />Follow me on Github
</a></button>
<a href=" " class="social-icon "> <a href="https://uk.linkedin.com/pub/martine-ross/b6/5a2/907">
<img src="https://static.licdn.com/scds/common/u/img/webpromo/btn_myprofile_160x33.png" width="160" height="33" border="0" alt="View Martine Ross's profile on LinkedIn">
</a>
</a>
<button id="fccfooter"><a href="https://freecodecamp.com/moi238">
<img src="https://cdn-images-1.medium.com/fit/c/30/30/1*MotlWcSa2n6FrOx3ul89kw.png" alt="freecodecampicon"/>FreeCodeCamp</a>
</button> </footer>
</body>

</div>
</div>

Sorry just realised it didn't all post
Adam Pankowski
@losbaltica
Aug 29 2016 10:32
Hi i got some problem in my code. Dont know why it not show my current position. Can somebody help me?
http://codepen.io/codermaster/pen/XKvoRQ?editors=0010
K R Vinay Kumar
@vinaykumar94
Aug 29 2016 10:44
hello people i need help with my project
Gatreek92
@Gatreek92
Aug 29 2016 10:45
@vinaykumar94 whats the problem ?
Stephen James
@sjames1958gm
Aug 29 2016 10:46
@losbaltica You have a typo - mispelled success in your geolocation call
K R Vinay Kumar
@vinaykumar94
Aug 29 2016 10:46
i have a project called resume generator. where user gives input and have to convert that input in to html page ..how can i do that using jquery?? @Gatreek92
Adam Pankowski
@losbaltica
Aug 29 2016 11:01
@sjames1958gm ok still dont work :(
Marian
@bitflut
Aug 29 2016 11:03

I have a problem, that I can't figure out on my own:

I can't get Chrome (v52) to scroll with momentum within a fixed positioned element. See this example: http://codepen.io/anon/pen/rLXPxB

Can anyone point me in the right direction here? Since -webkit-overflow-scrolling is no longer supported by Chrome, I have no idea.

Stephen James
@sjames1958gm
Aug 29 2016 11:08
@losbaltica error is defined inside of success so it cannot be accessed by the geolocation call (use devtools to see these errors)
Andrew1024
@Andrew1024
Aug 29 2016 11:13
Can anybody help? I can't find out where offline channel's logos are?http://codepen.io/Andrew1024/pen/LkwOdv
Weili Wang
@weiliwang1
Aug 29 2016 11:16
Hi
kirbyedy
@kirbyedy
Aug 29 2016 11:19
@Andrew1024 did you try with https://api.twitch.tv/kraken/channels/
Andrew1024
@Andrew1024
Aug 29 2016 11:21
@kirbyedy do you mean I should change my URL from 'https://www.twitch.tv/' to https://api.twitch.tv/kraken/channels/?
kirbyedy
@kirbyedy
Aug 29 2016 11:26
no I mean you should do another getJSON and load those logos which are offline
as you can see this channel is offline, so no data is displayed
but... even if its offline you can get the logo from this link: https://api.twitch.tv/kraken/channels/freecodecamp
Andrew1024
@Andrew1024
Aug 29 2016 11:30
Ok, I understand
Albert Brennan
@bluegreybolt
Aug 29 2016 11:33
Lmao I was about to ask the exact same question
And it's just been asked
Weird...
Andrew1024
@Andrew1024
Aug 29 2016 11:36
@kirbyedy Thank you)
CamperBot
@camperbot
Aug 29 2016 11:36
andrew1024 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1335 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Gatreek92
@Gatreek92
Aug 29 2016 11:40
@vinaykumar94 sorry i can't help you i didn't get there yet :worried:

hello everyone i'am stuck in the Mutations exercice i need a little help . this is my code , can anyone tell me why i always get false as a result ?

function mutation(arr) {

for (var i=0 ; i< arr[0].length;i++){
for (var j=0; j<arr1.length;j++)
{
if (arr[0].indexOf(i,arr[1][j]==-1)){

  return false;
}
else return true ;
  }
}

}

mutation(["hello", "hey"]);

Chintan Acharya
@ChintanAcharya
Aug 29 2016 11:49
Hey guys, I'm having trouble making API calls through Codepen.
I am trying to build the weather app. Since codepen doesn't use https, i am unable to use getCurrentLocation.
getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
Dan
@dcgoings
Aug 29 2016 11:51
@Gatreek92 i feel like there's something wrong with this line:
if (arr[0].indexOf(i,arr[1][j]==-1))
Kietil
@Kietil
Aug 29 2016 11:52
I am looking for a "talk to us" component (or similar) that flutterwave and OpenGov has in bottom right corner - anyone who knows where to find or what it's generally called?
Nicolas Reboredo
@nicolasmdf
Aug 29 2016 11:54
Hey guys! Good morning (or whatever :) )to everyone
could I get some feedback with the twitch viewer? Im having trouble testing it for some reason
@ChintanAcharya Hey man, that was a problem for me too, your API call should include a callback, it solves the insecure problem (cause you will run into it many times). I was not able to figure out how to solve that particular problem, so I decided to use IP location, which is not as accurate but works fine in most cases.
Albert Brennan
@bluegreybolt
Aug 29 2016 12:01
@ChintanAcharya I used this API http://ip-api.com/
It gets your location from your IP address so it can be used by CodePen
It doesn't give as accurate results but it is fine for the purpose of this app I think.
Chintan Acharya
@ChintanAcharya
Aug 29 2016 12:12
@nicolasmdf Can you have a look?https://codepen.io/ChintanAcharya/pen/YWmBWE
Albert Brennan
@bluegreybolt
Aug 29 2016 12:27
Hey I need some help with formatting?
I have a div for my twitch project
But I want it to only be as big as what's inside
So say I want to show 3 online channels, it should only be as big as 3
But if I want to show all 10 channels, it should resize to 10
Nicolas Reboredo
@nicolasmdf
Aug 29 2016 12:30
@ChintanAcharya works on my browser!
Chintan Acharya
@ChintanAcharya
Aug 29 2016 12:32
@nicolasmdf Which browser are you using?
Nicolas Reboredo
@nicolasmdf
Aug 29 2016 12:32
chrome... :0
someone told me when I was researching this stuff that codepen is https and that it should work everywhere, but it did not work for me, it seems to be working fine for you though
Chintan Acharya
@ChintanAcharya
Aug 29 2016 12:34
@nicolasmdf It doesn't work on mine. :(
Nicolas Reboredo
@nicolasmdf
Aug 29 2016 12:35
it is probably because when i pressed the update button for the first time it prompted me for permission to get location data
maybe you have it off by default?
@bluegreybolt have you looked into hidding the stuff you dont want to show?
Chintan Acharya
@ChintanAcharya
Aug 29 2016 12:37
@nicolasmdf I am getting the location correct. It is the API call that is not working. The error in the console is "Mixed Content: The page at 'https://codepen.io/ChintanAcharya/pen/YWmBWE' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint"
Albert Brennan
@bluegreybolt
Aug 29 2016 12:37
@nicolasmdf Yes I'm doing that at the moment. Should I just change the CSS on my div when I press the button?
Nicolas Reboredo
@nicolasmdf
Aug 29 2016 12:38
you can use .css(), yes
kirbyedy
@kirbyedy
Aug 29 2016 12:43
@ChintanAcharya it`s because openweather api does not support https
at least not in the free version
Can anyone give some feedback on my Twitch project?
Thanks.
kirbyedy
@kirbyedy
Aug 29 2016 12:53
@bluegreybolt what are these 3 dots here ?
Screen Shot 2016-08-29 at 15.52.55.png
Albert Brennan
@bluegreybolt
Aug 29 2016 12:53
Oh lol
The buttons are part of a list
I guess the bullet points stuck around
Gone now
Connor Murphy
@papasmurph
Aug 29 2016 13:07
Hi guys, I'm really quite struggling with the front-end portfolio project. This is what I've got so far ovbiously it needs a lot of work still but I like some reassurance I'm on the right track and feedback/suggestions are more than welcome :) http://imgur.com/a/g96yM
Connor Murphy
@papasmurph
Aug 29 2016 13:22
@GregatGit huh?
Greg Duncan
@GregatGit
Aug 29 2016 13:25
@bluegreybolt your code is nice and easy to read but you have a lot of blank lines that you don't need to have in both your js and html.
Juan Sierra
@juan-sierra
Aug 29 2016 13:41
Screen Shot 2016-08-29 at 9.40.47 AM.png
hello guys, anyone know how to solve this issue with the third image at the bottom?
i got the padding i want between them
but the third image is not stretching all the way
Yuri Romanko
@FreeDigger
Aug 29 2016 13:48
Hi, guys! Tribute Page. Were I have to get the story? From Wiki? Any story?
kat-mag
@kat-mag
Aug 29 2016 13:52
@FreeDigger any story. From anywhere ;p Whatever you like
Yuri Romanko
@FreeDigger
Aug 29 2016 13:52
@kat-mag Thank you.
CamperBot
@camperbot
Aug 29 2016 13:52
:cookie: 314 | @kat-mag |http://www.freecodecamp.com/kat-mag
freedigger sends brownie points to @kat-mag :sparkles: :thumbsup: :sparkles:
kat-mag
@kat-mag
Aug 29 2016 13:53
@FreeDigger No problem. Good luck!
tylerobot
@tylerobot
Aug 29 2016 14:12
Can anyone help me figure out why my JSON request is only outputting the last item in my array? I've tried a normal for loop, a forOf loop, and now a forEach, but it keeps doing the same thing.
https://codepen.io/Algenib/pen/WxVWNk?editors=1010
Alexander Domikov
@AlexanderDom
Aug 29 2016 14:21
@tylerobot i'm not sure
but seems like your first iis a global variable
tylerobot
@tylerobot
Aug 29 2016 14:23
@AlexanderDom thanks! changed it
CamperBot
@camperbot
Aug 29 2016 14:23
tylerobot sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 366 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Alexander Domikov
@AlexanderDom
Aug 29 2016 14:26
also you url variable is defined inside each but you call it after so boom VM170 pen.js:17 Uncaught ReferenceError: url is not defined
Hugo Machado
@snake7up
Aug 29 2016 14:28
http://codepen.io/snake7up/pen/PzrqPy guys there is a way the text on the right is aligned with the image in the bottom?
with the image, in the bottom, because surparsses a little
Alexander Domikov
@AlexanderDom
Aug 29 2016 14:30
you want your image to be aligned at right ? @snake7up
Hugo Machado
@snake7up
Aug 29 2016 14:34
@AlexanderDom i want my text or image to be alignet with eachother, because the bottom of the text surparsses a little the bottom of the image
im talkin about the red image and the text on the side
TrayBanks
@TrayBanks
Aug 29 2016 14:38
blob
Hey guys, I am creating a tribute page at the moment and I need so code help. I want to create a floating navi bar with the name centered around tabs that I am going to create later. I am trying to get the name in the center to stand out but still seamless with the navi bar. so far this is what I have. Please any suggestions or advice would be greatly appreciated.
Alexander Domikov
@AlexanderDom
Aug 29 2016 14:39
@snake7up like this ?
Capture d’écran 2016-08-29 à 16.39.36.png
best solution is to put image in same container than text but it gonna be smaller of course
Hugo Machado
@snake7up
Aug 29 2016 14:42
humm good idea, didnt think of that ... thanks @AlexanderDom
CamperBot
@camperbot
Aug 29 2016 14:42
snake7up sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 367 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
TrayBanks
@TrayBanks
Aug 29 2016 14:43
Anyone...?
Alexander Domikov
@AlexanderDom
Aug 29 2016 14:45
you're welcome @snake7up :), @TrayBanks sorry i'm not ignoring you, i have lot to do now :)
@TrayBanks link to your codepen however
gonna be easier to help you
TrayBanks
@TrayBanks
Aug 29 2016 14:46
How would one do that exactly?
@AlexanderDom
Alexander Domikov
@AlexanderDom
Aug 29 2016 14:47
copy paste your codepen url ?
save your codepen than paste it here ;)
TrayBanks
@TrayBanks
Aug 29 2016 14:47
aaaawwweeee @AlexanderDom
Alexander Domikov
@AlexanderDom
Aug 29 2016 14:51
so @TrayBanks first things first, if you want to use inline css (css directly on html elements), use it like this <p style="font-size: 12px"> and not <p font size:500px; font-family:Times New Roman > and font size 500px man you gonna have big letter here :)
@TrayBanks
<h1 class="text-primary">Hello World</h1>
<ul>
  <li><a href="default.asp">Bio</a></li>
  <li><a href="news.asp">Education</a></li>
  <li><p style="font-size:500px; font-family:Times New Roman; margin: 0"><b>The Father of the Internet</b></p></li>
  <li><a href="contact.asp">Pictures</a></li>
  <li><a href="about.asp">Work Cited</a></li>
</ul> <!-- you forgot to close your ul here -->
but like i said 500px it's to big ^^
and you can target every child of your li not only a elements
li > * {
  display: block;
  color: black;
  text-align: center;
  padding: 14px 16px;
  text decoration: none;
}
/*or*/
li > a,
li > p
/*or if you don't like > selector*/
li a, li p
Alejandro
@alejandroariasag
Aug 29 2016 15:54

Hi guys, I have an issue with my code in here: https://peg-n-rope-alejandroarias.c9users.io/v1/index.html

As you can guess I wanted to put the shadow from the sidebar to the rest of the page x) Didn't work at all! Ideas?

Alexander Domikov
@AlexanderDom
Aug 29 2016 16:03
@alejandroariasag you mean box-shadow: 0 0px 20px 0px rgba(0, 0, 0, 0.3) ?
instead of your existing code ?
Capture d’écran 2016-08-29 à 18.03.43.png
@Naijachic nice page, but some correction
Alexander Domikov
@AlexanderDom
Aug 29 2016 16:08
<ul><font face="Sans-serif" size="1" align="left">
</font><div id="ul"><font face="Sans-serif" size="1" align="left">    
<li>
ul accepts only li for direct child role i mean <ul><li> other tihng must be in <li> and center element and fontare deprecated since html 5
you have text-center class from bootstrap to center your text
Panayiotis Mangafas
@mangafas
Aug 29 2016 16:18
hey i tried to import bootstrap into my code in github but it doesn't work. Here is my repository
and the site
Panayiotis Mangafas
@mangafas
Aug 29 2016 16:25
anyone
kat-mag
@kat-mag
Aug 29 2016 16:29
@mangafas load it over https
@mangafas look at console in dev tools. It tells you exactly that
Alejandro
@alejandroariasag
Aug 29 2016 16:37
@AlexanderDom Not really, I want to separate the sidebar and the main page, a shadow from the top, where the image starts till the end
tylerobot
@tylerobot
Aug 29 2016 17:02
How can I set my name variable to a link from the data in the nameLink variable?
https://codepen.io/Algenib/pen/jAgbQY?editors=1010
TrayBanks
@TrayBanks
Aug 29 2016 17:14
So I put this in the css box? @AlexanderDom I was testing it to see if it would change but it never did. I would have made it like 100px at the most
Alexander Domikov
@AlexanderDom
Aug 29 2016 17:15
Yes target your paragraph in CSS box @TrayBanks
TrayBanks
@TrayBanks
Aug 29 2016 17:17
so how do I specify just that text tho? @AlexanderDom
Alexander Domikov
@AlexanderDom
Aug 29 2016 17:22
You can target a class if you a class on it, or id, or if you're sure that's your only paragraph only p {}
Hugo Machado
@snake7up
Aug 29 2016 17:35
hello guys how can i remove these borders from my rows in the top http://codepen.io/snake7up/full/PzrqPy/ , i tried border:0px; border-top:none but didnt work
i solved guys, forgot to remove the well class :P
Karayel
@Karayel
Aug 29 2016 18:00
[1,2,3,4],1,2 how can ı reach last 1 or 2
Stephen James
@sjames1958gm
Aug 29 2016 18:00
@Karayel Seek and Destroy? use arguments object - see link or go to MDN
Karayel
@Karayel
Aug 29 2016 18:01
@sjames1958gm Yeap. I didn't understodd what it is
Stephen James
@sjames1958gm
Aug 29 2016 18:02
It is an array like object that holds all of the parameters so arguments[0] is [1, 2, 3, 4] and arguments1 is 1, etc.
See that link for a way to convert to normal array.
Conor-Hughes
@Conor-Hughes
Aug 29 2016 18:03
Could anyone help me with my tribute page? I'm pretty much done just need help with changing the border/margin right at the top?
Karayel
@Karayel
Aug 29 2016 18:04
I try to reach your answer with using chrome console but it gives me Uncaught SyntaxError: Unexpected number
Adam Pankowski
@losbaltica
Aug 29 2016 18:04
hi guys, can somebody tell me why this code not return location?
http://codepen.io/codermaster/pen/XKvoRQ?editors=0010
Conor-Hughes
@Conor-Hughes
Aug 29 2016 18:04
@Karayel Me?
Karayel
@Karayel
Aug 29 2016 18:04
@Conor-Hughes what ?
Dakota Vaughn
@StruckCroissant
Aug 29 2016 18:05
Hey, anyone want to take a look at my Portfolio page and give me their opinion?
Karayel
@Karayel
Aug 29 2016 18:06
@sjames1958gm ohh I get it. Thanks
CamperBot
@camperbot
Aug 29 2016 18:06
karayel sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2947 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 29 2016 18:06
@Karayel :+1:
How would I move the title down(Nikola Tesla) whilst keeping the background color grey?
Dakota Vaughn
@StruckCroissant
Aug 29 2016 18:08
@Conor-Hughes - Ay, glad to see another fan of Nikolai tesla. I did my tribute page on him
Juwdohr
@Juwdohr
Aug 29 2016 18:09
Hey wondering if I could get some help here. Uploaded my codepen to my ePortfolio on github. Now the bootstrap is not working on this one project?
https://juwdohr.github.io/ePortfolio/randomquote/
Any suggestions?
Conor-Hughes
@Conor-Hughes
Aug 29 2016 18:09
He's pretty amazing - Did you read how Thomas Edison screwed him over?
Dakota Vaughn
@StruckCroissant
Aug 29 2016 18:10
@Conor-Hughes - yup, you know about the things Thomas did to try to make Tesla's A-C concept seem super dangerous?
Juwdohr
@Juwdohr
Aug 29 2016 18:10
A-C?
Conor-Hughes
@Conor-Hughes
Aug 29 2016 18:11
Alternating Current
Nah, what was it?
Dakota Vaughn
@StruckCroissant
Aug 29 2016 18:11
He slaughtered tons of animals using high amperage AC
Conor-Hughes
@Conor-Hughes
Aug 29 2016 18:12
Oh yeah I skimmed that, like Whitehousing or something
Dakota Vaughn
@StruckCroissant
Aug 29 2016 18:12
Mhmmm
https://codepen.io/StruckCroissant/pen/AXGpoR heres how I did mine if you wanna look it over or draw some inspiration from it
Juwdohr
@Juwdohr
Aug 29 2016 18:14
Did you know tesla came up with a way to give out free electricity?
Dakota Vaughn
@StruckCroissant
Aug 29 2016 18:14
Yes, but in reality its more of stealing electricity. It pulls it out of nearby wire/the air
Janine vN
@janine9vn
Aug 29 2016 18:15
@losbaltica Well, when are you calling your code? You don't have a document.ready function or anything. It's just sitting there
Adam Pankowski
@losbaltica
Aug 29 2016 18:20
@janine9vn ok :D
Juwdohr
@Juwdohr
Aug 29 2016 18:24
any one know why <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'> would fail to load or even when inspecting the page not show up?
Never mind fixed it.
ufuft
@ufuft
Aug 29 2016 18:35
Hi, I have a question! i'm working on the wikipedia viewer and having trouble with the API. biggest problem right now is that my API requests appear to timeout(maybe?) which leads to me just not getting a result a high percentage of time. So far I tried implementations with just ajax using $.ajax and also $.getJSON versions, including getJSON.(url).then(function...)) constructs which dont appear to help
Jason Luboff
@JLuboff
Aug 29 2016 18:35
@ufuft Post your codepen?
ufuft
@ufuft
Aug 29 2016 18:36
sec, door
not pretty obviously
Jason Luboff
@JLuboff
Aug 29 2016 18:41
It seems like your input isn't getting passed to the API call function, but not sure why
ufuft
@ufuft
Aug 29 2016 18:42
it works a decent amount of the time, when u look at the javascript console you'll see it spit out a bunch after a few trys
Joakim Bajoul Kakaei
@Todai88
Aug 29 2016 18:44

Hi guys.
Attempting to add an animation class on an icon, but for some reason it won't work as intended. I've already managed to fix another icon to work fine (it rotates), but this other one won't move on its x-axis. I'm trying to add the movement on ic2!*
css:

@keyframes mymove {
    from {right: 0px;}
    to {right: 200px;}
}

.cloud-background {
  z-index: 1;
  color: rgb(130,130,130);
  font-size: .7em; 
}
.move {
  animation: mymove 5s linear infinite;
}

jquery/js:

  $("#ic").addClass("wi wi-cloud main-cloud");
  $("#ic2").addClass("wi wi-cloud cloud-background");
  $(".main-cloud").addClass(".main-cloud");
  $(".cloud-background").addClass(".move");

Here is the pen: http://codepen.io/Todai/pen/QEZdwE

fluffykat
@fluffykat
Aug 29 2016 18:45
hi - for some reason drop down menus are not working in codepen for me? I open up an example codepen and they work. Any advice how to fix this?
someone elses example*
Jason Luboff
@JLuboff
Aug 29 2016 18:46
@fluffykat Did you add bootstrap/jquery ( depending on what it uses) in codepen settings?
fluffykat
@fluffykat
Aug 29 2016 18:47
yes @JLuboff
anyone?
Jason Luboff
@JLuboff
Aug 29 2016 18:48
It might be helpful if you post your codepen
fluffykat
@fluffykat
Aug 29 2016 18:49
Jason Luboff
@JLuboff
Aug 29 2016 18:50
I don't see any drop down menus there or in the code?
Are you refering to mobile response?
fluffykat
@fluffykat
Aug 29 2016 18:51
yes, you need to minimise the window to see the menu
minimise/reduce size*
Jason Luboff
@JLuboff
Aug 29 2016 18:51
Got it. Load bootstrap in the JS settings and it will work
fluffykat
@fluffykat
Aug 29 2016 18:52
ah thanks.
Stacey
@anastasi5
Aug 29 2016 18:53
I'm logging in to codepen from a different computer... Somehow the links to my graphics are broken, even though they're just copied from imgur... It's always something...
Jason Luboff
@JLuboff
Aug 29 2016 18:53
@anastasi5 Imgur links don't work in coepen (don't allow hotlinking or whatever its called). Use a different image host (I use hptobucket)
photobucket*
Stacey
@anastasi5
Aug 29 2016 18:57
@JLuboff , the links have been working up until now... I re-linked, and they seem OK now,,,
Stacey
@anastasi5
Aug 29 2016 19:05
Weird... the links for the sample portfolio aren't loading either... I wonder if there's a problem with the firewall I'm on...
Jason Luboff
@JLuboff
Aug 29 2016 19:12
@anastasi5 imgur links won't work...
Stacey
@anastasi5
Aug 29 2016 19:17
@jluboff, but they have been working... I'll try photobucket anyway, but it was frustrating the codepen didn't like google photos...
Jason Luboff
@JLuboff
Aug 29 2016 19:18
They were most likely cached
Dale
@dwhale84
Aug 29 2016 19:22
Hi everyone. I'm on the early stages of my Wiki viewer, and I can't get the ajax function to work. can someone take a look and help me find what I'm doing wrong? http://codepen.io/dwhale84/pen/EyBRNm?editors=1011
ufuft
@ufuft
Aug 29 2016 19:24
i m working on the same thing
  1. jsonp doesnt work with wiki api
Dale
@dwhale84
Aug 29 2016 19:25
yeah, I've been trying with both jsonp and json, and neither has been working
ufuft
@ufuft
Aug 29 2016 19:28
$.ajax is the complicated way to do this btw, u can just use $.getJSON(url, function(wiki) {...}
ALLY
@ally0426
Aug 29 2016 19:28
can anyone help with my code?
Dale
@dwhale84
Aug 29 2016 19:28
ok, i'll give that a try...
ALLY
@ally0426
Aug 29 2016 19:28
argAnalyzer(7, -3, 0, 12, 44, -5, 3);
this should return { "odds": 4, "negatives": 2, "avg": 8.29, "median": 3 }
my code is:

var argAnalyzer = function(nums) {
var countObj = {};
sum = 0;
countObj.odds = 0;
countObj.negatives = 0;

for(var i = 0; i < nums.length; i++) {
  sum += nums[i];
  if (Math.abs(nums[i]) % 2 = 1) {
    countObj.odds += 1;
  } 
  if (nums[i] < 0) {
    countObj.negatives += 1;
  }
}

function median(nums) {

nums.sort(function(a, b) {
  return a - b
});

var countObj.median = Math.floor(nums.length / 2);

if(nums.length % 2)
    return nums[half];
else
    return (nums[half-1] + nums[half]) / 2;

}

return countObj;
}

console.log(argAnalyzer(7, -3, 0, 12, 44, -5, 3));

Dale
@dwhale84
Aug 29 2016 19:31
getJSON isn't working for me either, still hitting a wall
ALLY
@ally0426
Aug 29 2016 19:32
I don't know where is wrong
ufuft
@ufuft
Aug 29 2016 19:33
Dale, your url looks off
Dale
@dwhale84
Aug 29 2016 19:36
@ufuft thanks, that's working now. I took mine from the wiki API page linked in the project overview. Not sure how I got steered wrong, but it's working now.
CamperBot
@camperbot
Aug 29 2016 19:36
dwhale84 sends brownie points to @ufuft :sparkles: :thumbsup: :sparkles:
:cookie: 288 | @ufuft |http://www.freecodecamp.com/ufuft
ufuft
@ufuft
Aug 29 2016 19:38
ally did u define "half" ?
ufuft
@ufuft
Aug 29 2016 19:44
also, and i'm not sure, but you treat nums like a list, while you get tons of "arguments"
try console.log(nums) right after this line: "var argAnalyzer = function(nums) {" and see if it spits out a list or "7"
ALLY
@ally0426
Aug 29 2016 19:48
yeah, it gives 7
I just deleted half parts
ufuft
@ufuft
Aug 29 2016 19:49
aha! now that seems to be a problem, doesnt it!
ALLY
@ally0426
Aug 29 2016 19:49

var argAnalyzer = function(nums) {
var countObj = {};
sum = 0;
countObj.odds = 0;
countObj.negatives = 0;

for(var i = 0; i < nums.length; i++) {
  sum += nums[i];
  if (Math.abs(nums[i]) % 2 = 1) {
    countObj.odds += 1;
  } 
  if (nums[i] < 0) {
    countObj.negatives += 1;
  }
}

function median(nums) {

nums.sort(function(a, b) {
  return a - b
});

var countObj.median = Math.floor(nums.length / 2);

return countObj;
}

console.log(argAnalyzer(7, -3, 0, 12, 44, -5, 3));

yeah, I didn't declare it
maybe works without half parts?
ah linked german one by mistake
Anshul Jain
@ajain706
Aug 29 2016 19:51
can anuone help me
anyone*
ufuft
@ufuft
Aug 29 2016 19:51
there, this will help u access all the values that get fed into your function
and then I think you could do all your calculations inside a single function
ALLY
@ally0426
Aug 29 2016 19:52
ok, let me try, thanks
ufuft
@ufuft
Aug 29 2016 19:53
whats up ajain?
Anshul Jain
@ajain706
Aug 29 2016 19:53
Search and Replace @ufuft
i dont understand what i need to do in this
ufuft
@ufuft
Aug 29 2016 19:54
what do you have trouble with?
Anshul Jain
@ajain706
Aug 29 2016 19:55
can you explain what i need to do to complete that challenge
ufuft
@ufuft
Aug 29 2016 19:56
ok, you have to feed in 3 things into your function 1. some sentence with some words 2. a word that is in the original sentences 3. a word that shall replace word#2
so 1. "This is my house" 2. "my" 3."your"
should spit out "This is your house"
Anshul Jain
@ajain706
Aug 29 2016 19:56
oh ok i get it
thanks bro
ufuft
@ufuft
Aug 29 2016 19:57
no problem, that was the kind of question i can actually answer
Anshul Jain
@ajain706
Aug 29 2016 19:57
hmmmm nic
tylerobot
@tylerobot
Aug 29 2016 20:17
I am grabbing JSON data from this api call - https://api.twitch.tv/kraken/streams/brunofin, and I've got this code to evaluate if the user doesn't exist, but it's not working. ```if (data.status === 422)
what am I doing wrong?
Stephen James
@sjames1958gm
Aug 29 2016 20:18
@tylerobot link to pen?
Stacey
@anastasi5
Aug 29 2016 20:21
@davisec52 , I'm trying to match the sample given to us... but I can't get the top CSS to be fixed. Using the .navbar in bootstrap works, but I can't customize the buttons...
Stephen James
@sjames1958gm
Aug 29 2016 20:22
@tylerobot Not sure why you are not getting the response into your getJSON for those. But you can add this code to the end of your
getJSON
}).fail(function(x) {console.log(x)}); //end getJSON request
x will be the response that you can process
tylerobot
@tylerobot
Aug 29 2016 20:23
@sjames1958gm awesome! thank you! I'll try that out
CamperBot
@camperbot
Aug 29 2016 20:23
tylerobot sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2949 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Anshul Jain
@ajain706
Aug 29 2016 20:40
need help
guyz
tylerobot
@tylerobot
Aug 29 2016 20:43
what do you need help with @ajain706?
Anshul Jain
@ajain706
Aug 29 2016 20:44
in javascript
@tylerobot can you help
tylerobot
@tylerobot
Aug 29 2016 20:45
maybe, what exactly do you need help with?
Anshul Jain
@ajain706
Aug 29 2016 20:46

@ajain706
stuck in Search and Replace lesson
my code :- function myReplace(str, before, after) {

var a = str.split(" ");
str=str.replace(before,after);

return str;
}

myReplace("He is Sleeping on the couch", "Sleeping", "sitting");

@tylerobot
here is my code
i need to know is there any problem with the code
lesson name is Search and Replace
@tylerobot
tylerobot
@tylerobot
Aug 29 2016 20:50
I'm actually a few lessons behind that on the twitch project, don't think I'll be of much help
sorry!
Anshul Jain
@ajain706
Aug 29 2016 20:51
no problem
Stephen James
@sjames1958gm
Aug 29 2016 20:52
@ajain706 You don't have to split to replace, but you need to look at the case of the start of before and adjust after.
Anshul Jain
@ajain706
Aug 29 2016 20:52
yeah i just figure it out but now how can i do that
@sjames1958gm
Stephen James
@sjames1958gm
Aug 29 2016 20:53
@ajain706 Compare before[0] to before[0].toUpperCase() ?
Anshul Jain
@ajain706
Aug 29 2016 20:53
alright i will try
@sjames1958gm
Prithvi-A
@Prithvi-A
Aug 29 2016 21:11

function diffArray(arr1, arr2) {
  var newArr = [];
  var x, y;
  // Same, same; but different.
  for(var i=0; i< arr1.length; i++) {
    x = arr1[i];
  }
  for(var j=0; j<arr2.length; j++) {
    y = arr[j];
  }
  if(x !== y) {
    newArr.push(x);
  } else {
    newArr.push(y);
  }

  return newArr;
}

diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
I'm not sure how to go about comparing two arrays
guys need your help!
ALLY
@ally0426
Aug 29 2016 21:23
y = arr2[j];
Prithvi-A
@Prithvi-A
Aug 29 2016 21:24
yeah because its the second loop
Moisés Man
@moigithub
Aug 29 2016 21:26
@Prithvi-A do u know what this does ?
  for(a=0;a<5; a++){
     console.log("hello");
  }
Prithvi-A
@Prithvi-A
Aug 29 2016 21:28
@moigithub Of course loops through 4 times and prints hello to the console
Aaron
@apalm1341
Aug 29 2016 21:28
I just tried dragging the image from my folder into dropbox and url does not work in codepen
instead this shows up
blob
Does anyone know why this is?
Moisés Man
@moigithub
Aug 29 2016 21:28

@Prithvi-A and... this ?

var myVar=0;
  for(a=0;a<5; a++){
      myVar = a;
  }

what do u think will be the value of myVar ?? after the loop finish

Prithvi-A
@Prithvi-A
Aug 29 2016 21:29
re-assignes the global variable to a myVar = a;
Aaron
@apalm1341
Aug 29 2016 21:29
blob
I just tried dragging the image from my folder into dropbox and url does not work in codepen
instead this shows up
Does anyone know why this is?
Prithvi-A
@Prithvi-A
Aug 29 2016 21:30
after the loop - myVar = 0
Moisés Man
@moigithub
Aug 29 2016 21:30
nope @Prithvi-A
Prithvi-A
@Prithvi-A
Aug 29 2016 21:31
ah so it resets the global variable since it is not declared as var inside the loop and hence myVar = a after the loop ends
Moisés Man
@moigithub
Aug 29 2016 21:32
yep.. so the value of myVar would be 4
that last loop example.. is similar to what u doing here @Prithvi-A
  for(var i=0; i< arr1.length; i++) {
    x = arr1[i];
  }
Prithvi-A
@Prithvi-A
Aug 29 2016 21:33
ah ok a stops at <5 so . ok
But here I'm getting the value each index of the array
Moisés Man
@moigithub
Aug 29 2016 21:34
it loop through all arr1 values.. and re-assign whatever value arr1[i] have to x
soo after the loop ends... x will have the LAST value of arr1
Prithvi-A
@Prithvi-A
Aug 29 2016 21:35
that's true, dang! you're right
Let me try to fix it
Moisés Man
@moigithub
Aug 29 2016 21:36
pythontutor.com/javascript.html @Prithvi-A
u can test ur code using that tool
Daniel
@DanielMW34
Aug 29 2016 21:38
Anybody here have any familiarity with the Wikipedia API challenge?
Prithvi-A
@Prithvi-A
Aug 29 2016 21:38
@moigithub That's an awesome tool!
Aaron
@apalm1341
Aug 29 2016 21:59
@moigithub hey
can you help me?
Erivan Cerqueira
@erivancerqueira
Aug 29 2016 22:02
Good night. Where can l uploads image to link on Pen?
Veronika Krukovich
@VKrukovich
Aug 29 2016 22:02

How to make in js course nextInLine([2], 1) should return 2?function nextInLine(arr, item) {
// Your code here

return item; // Change this line
}

// Test Setup
var testArr = [4];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 6)); // Modify this line to testconsole.log("After: " + JSON.stringify(testArr));

Dylan
@dhcodes
Aug 29 2016 22:02
@erivancerqueira google drive works *I think
@VKrukovich you need to push the item onto the arr
and then shift off the first item in the array
and return it
thus 2
so i am at a road block... perform basic equations with two numbers but i am having a hard time trying to chain multiple methods together
like 1+1*3
any ideas?
*i can perform
tyl-er
@tyl-er
Aug 29 2016 22:10

Having trouble pulling info from the openweathermap API. The second document.write() is not working.

http://codepen.io/tyl-er/pen/ALAAGR

$(document).ready(function() {

//"http://ipinfo.io/json?
var ip = "http://ipinfo.io/json";
//api.openweathermap.org/data/2.5/weather?zip=94040,us
var key = "&appid=bde5bc09f9567d02227cbef4e63b0194";

//OMFG that took so long to find
//Use .getJSON() to get the coords
$.getJSON(ip, function(ipInfo) {
var zip = ipInfo.postal
var usa = ipInfo.country
document.write(zip, " " ,usa);

var api = "api.openweathermap.org/data/2.5/weather?zip=" + zip + "," + usa + key;
      //get our weather data
    $.getJSON(api, function(apiInfo) {
 document.write(apiInfo.weather.id);
  });

});

});

Stephen James
@sjames1958gm
Aug 29 2016 22:12
@tyl-er put http:// on the front of your URL or it is sending that request to codpen.
roninjedi
@roninjedi
Aug 29 2016 22:13
So I have a question. Do you think its better to add java/widigts as i go or get the HTML/CSS set up first then start adding Java/fancy scrollbars etc?
Stephen James
@sjames1958gm
Aug 29 2016 22:14
@tyl-er http://s.codepen.io/boomerang/537a8bfb1a9a0f2d3238e4080122bc411472508812524…p.org/data/2.5/weather?zip=75070,US&appid=bde5bc09f9567d02227cbef4e63b0194 Failed to load resource: the server responded with a status of 404 (Not Found)
This error in the devtools console has a http://s.codepen.io host that is what led me to that error.
tyl-er
@tyl-er
Aug 29 2016 22:14
@sjames1958gm Hmm now it's saying "undefined"
Stephen James
@sjames1958gm
Aug 29 2016 22:14
@roninjedi Html/CSS first -
tyl-er
@tyl-er
Aug 29 2016 22:15
ok I need to go back fix something then@sjames1958gm
Stephen James
@sjames1958gm
Aug 29 2016 22:15
@tyl-er Do this document.write(JSON.stringify(apiInfo)); and you can see the full structure in the window.
roninjedi
@roninjedi
Aug 29 2016 22:16
that makes sense, you have to have a base to build on. I just get distracted and start trying to add scrolling nav bars and other things while I'm still working on half the page
Veronika Krukovich
@VKrukovich
Aug 29 2016 22:16
This message was deleted
Stephen James
@sjames1958gm
Aug 29 2016 22:16
@roninjedi Probably should do what feels the most comfortable, but you do need a base before adding the fancy.
@VKrukovich nextInLine is the function name - use arrfor the array - item is a variable so don't put it in "" or in [] as you are pushing onto an existing array
Bunji
@BunjRingnyu
Aug 29 2016 22:18
Hello World, am new here, writing from Istanbul Turkey.I have a passion for programming and i have been trying it out on my own. Was actually looking for a forum where i could get help and share ideas, then i stumbled on this amazing community online. Hope it will be an amazing experience.
CamperBot
@camperbot
Aug 29 2016 22:18

welcome to FreeCodeCamp @BunjRingnyu!

tyl-er
@tyl-er
Aug 29 2016 22:31
@sjames1958gm I went back and double checked everything. It's still not working :\
Stephen James
@sjames1958gm
Aug 29 2016 22:32
@tyl-er `document.write(apiInfo.weather.main); I believe weather is an array so you need apiInfo.weather[0].main
tyl-er
@tyl-er
Aug 29 2016 22:34
Thank you that fixed it! @sjames1958gm
CamperBot
@camperbot
Aug 29 2016 22:34
tyl-er sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2952 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 29 2016 22:44
@tyl-er :+1:
jrandallhansen
@jrandallhansen
Aug 29 2016 23:15
could anyone take a look at my attempt to style the local weather app responsively using bootstrap?
Daniel
@DanielMW34
Aug 29 2016 23:15
Anybody know why I am getting the "F*ck you" response in my API query of wikipedia?
https://en.wikipedia.org/w/api.php?action=query&titles=Nick%20Saban&prop=info&list=allpages&format=jsonfm
Ty
@TheNewStyles
Aug 29 2016 23:17
I am trying to access currentCityZip outside of this function. I have tried without var to make global but I still can't access it. Any suggestions?
function getLocationZip(){    
    //use location api to determine users location
    var getIP = 'http://ip-api.com/json/';
    $.getJSON(getIP).done(function(location) {
        //assign location to current zip
        var currentCityZip = location.zip;            
        return currentCityZip;    
    });
}
jrandallhansen
@jrandallhansen
Aug 29 2016 23:19
try declaring var currentCityZip = ""; before you define the function. then the variable should be setting the global variable which you initialize as the empty string
@TheNewStyles
Patrick S
@thinktwice84
Aug 29 2016 23:21
@DanielMW34 That is hilarious. No idea why you're getting that. Here's the url I'm using. Found this on the API sandbox. https://en.wikipedia.org/w/api.php?action=opensearch&format=json&callback=?&search=[search term here]
Daniel
@DanielMW34
Aug 29 2016 23:23
@thinktwice84 I am going to reverse engineer your call there. thank you
CamperBot
@camperbot
Aug 29 2016 23:23
danielmw34 sends brownie points to @thinktwice84 :sparkles: :thumbsup: :sparkles:
:cookie: 274 | @thinktwice84 |http://www.freecodecamp.com/thinktwice84
Greg Duncan
@GregatGit
Aug 29 2016 23:25
@TheNewStyles
var currentCityZip = "";
function getLocationZip(){    
    //use location api to determine users location
    var getIP = 'http://ip-api.com/json/';
    $.getJSON(getIP, function(data) {
        //assign location to current zip
        currentCityZip = data.zip;    
    });
}
Patrick S
@thinktwice84
Aug 29 2016 23:25
@DanielMW34 Anytime. I'd highly advise using the sandbox. It's my best friend right now. I'm on the same project.
I need some help with my codepen responsiveness. Whenever the content is too large for the page vertically, all the text is pushed off the page ABOVE the screen instead of pushing down so I can scroll. http://codepen.io/thinktwice84/pen/rLXEdY
Daniel
@DanielMW34
Aug 29 2016 23:27
@thinktwice84 I just started with this today. I am on the sandbox, don't recall seeing the action=query vs action=opensearch
@GregatGit thank you. I will dig into that
CamperBot
@camperbot
Aug 29 2016 23:28
danielmw34 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 748 | @gregatgit |http://www.freecodecamp.com/gregatgit
Daniel
@DanielMW34
Aug 29 2016 23:28
@thinktwice84 Once I get this API call under control, I will look at your front end code and see what I can troubleshoot
Patrick S
@thinktwice84
Aug 29 2016 23:29
https://en.wikipedia.org/wiki/Special:ApiSandbox
You can find the opensearch on the action dropdown. Then click on search and type in your query.
Pretty simple actually.
Daniel
@DanielMW34
Aug 29 2016 23:30
@thinktwice84 I don't think I would have looked at the action dropdown.... this API is redonkulous
BREAK TIME!!!
Evan Davis
@davisec52
Aug 29 2016 23:36
@anastasi5 Hi. I made a few changes to the earlier fork I made of your portfolio. Basically, I added a class to <li> elements that contain your Home, About, Portfolio, Contact menu items. I then changed some of the CSS to modify their appearance. See line 14 of the Pen's CSS section. Here is the link: http://codepen.io/davisec52/pen/VjoYwZ?editors=1100
Greg Duncan
@GregatGit
Aug 29 2016 23:36
This message was deleted
Evan Davis
@davisec52
Aug 29 2016 23:36
This message was deleted
Greg Duncan
@GregatGit
Aug 29 2016 23:39
@thinktwice84 you haven't added bootstrap.js - that should fix your problem
Patrick S
@thinktwice84
Aug 29 2016 23:41
@GregatGit That would have been nice, but didn't solve it. Thanks though.
CamperBot
@camperbot
Aug 29 2016 23:41
thinktwice84 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 749 | @gregatgit |http://www.freecodecamp.com/gregatgit
Patrick S
@thinktwice84
Aug 29 2016 23:42
I don't have any bootstrap references in my JS
kennyq94
@kennyq94
Aug 29 2016 23:59
can someone help me I want my hexagon to stay fixed when minimizing screen. I want it to have the same effect when minizing screen from the right. Notice the padding causes picture to shift with the screen when minizing screen from the left. Thank You!!!
https://codepen.io/kennyqsoftware/pen/OXKomj