These are chat archives for FreeCodeCamp/HelpFrontEnd

6th
Aug 2016
Phil
@mremotoo
Aug 06 2016 00:42
I have a question regarding a code pls
max77p
@max77p
Aug 06 2016 00:44
hey guys i am having the toughest time creating a slide out tab for my pen can anyone help please?
basically when user hovers over one of the 3 circles at top right of pen container...it slides left to show the circle and word all or online or offline
struggling to build this
Ken Haduch
@khaduch
Aug 06 2016 02:08
@mremotoo - what is your question?
zhllx
@zhllx
Aug 06 2016 02:20
Design a danmu app 。help
how to design a danmu app ?
Ryan Williams
@Ryanwfile
Aug 06 2016 03:32
Can someone please help me with this code for the simon project, I am trying to have the user click as many buttons as needed for each sequence of lights but it seems this function isn't forcing the user to click at all. The codepen link is http://codepen.io/Ryanwfile/pen/VjEVZB Thank you very much for any help
function clicker()
{
  console.log("Clicker has been called");
  console.log("Order length is " + order.length);
  for (var i = 0; i < order.length; i++)
  {
    console.log("i is " + i);
    $('.sector').on('click',function()//Handles the user's button clicks
    {
      console.log("The order array is [" + order + "]");
      setTimeout(function()
       {
         if (this.id == order[i] && order[i] == 'red')
         {
           buttons.brightRed();
           //setTimeout(function(){buttons.red()},1100);
         }
         else if (this.id == order[i] && order[i] == 'green')
         {
           buttons.brightGreen();
           //setTimeout(function(){buttons.green()},1100);
         }
         else if (this.id == order[i] && order[i] == 'blue'){
          buttons.brightBlue();
          //setTimeout(function(){buttons.blue()},1100);
        }
        else if (this.id == order[i] && order[i] == 'yellow')
        {
          buttons.brightYellow();
          //setTimeout(function(){buttons.yellow()},1100);
        }
       },1100 * count)//ends the setTimeout statement of the for loop
  });//ends button click function 
 }//ends for loop

beeper(); 
}
Chris
@capozzic1
Aug 06 2016 03:38
Hello, if I want to stack 2 divs on top of each other with bootstrap, is this valid?
<div class="portf row">
<div class="portfolio col-md-8">
<p>portfolio here</p>
</div>
<div class="contact col-md-8">
<p>Contact</p>
</div>
</div>
DJ
@qualitymanifest
Aug 06 2016 03:42
@capozzic1 it's fine except that bootstrap rows take 12 columns. 8x2===16 so you have too many columns in that row
Chris
@capozzic1
Aug 06 2016 03:43
oh. so if I wanted to have 2 divs on top of each other, would it be smarter to make 3 rows for each div?
for some reason the divs still stack on each other when I use one row
i meant 3 divs on top of each other
@qualitymanifest if I wanted 3 divs on top of each other, is it okay that I use one row?
DJ
@qualitymanifest
Aug 06 2016 03:48
@capozzic1 so the point of the row is that you can make it so that, at larger screens, all of the columns inside appear in one row, but then, in smaller screens, they stack
Chris
@capozzic1
Aug 06 2016 03:51
thanks alot!
Zeeshan Haider
@zeeshan72
Aug 06 2016 04:50

$('document').ready(function() {
$('#searchButton').click(function() {
console.log("hi");
$("body").css("background-color", "white");
});

$("#search").keypress(function(e) {
if (e.which === 13) { //$('#searchButton').click();//Trigger search button click event
$("body").css("background-color", "white");

}

});

});

<body>
<div class="container">

<div class="row outPopUp">
<div class="col-xs-9 col-sm-9 col-md-9">

<form class="form-inline">

<div class="form-group">
<label for="search">Click icon to search</label>
<section id="search"><input type="text" class="form-control in-width" placeholder="Type here"> <i id="searchButton" class="fa fa-search fa-2x" aria-hidden="true"></i></section>
<br>
<p>Click <a href="https://en.wikipedia.org/wiki/Special:Random" target='_blank'>here</a> for a random article</p>
</div>
</div>
</form>

</div>
</div>

</div>
</body>
my keypress method is not working properly...
can anyone help??
Chris
@capozzic1
Aug 06 2016 04:53
hmm where is the key event
Zeeshan Haider
@zeeshan72
Aug 06 2016 04:54
i have applied it on input

$('document').ready(function() {
$('#searchButton').click(function() {
console.log("hi");
$("body").css("background-color", "white");
});

$("#search").keypress(function(e) {
if (e.which === 13) { //$('#searchButton').click();//Trigger search button click event
$("body").css("background-color", "white");

}

});

});

Chris
@capozzic1
Aug 06 2016 04:58
hmmm thats strange
so on pressing enter, it should execute a search?
im a newbie so im not sure, i would try the next chatroom called "HelpJavaScript." I was having a css issue so it led me here.
Zeeshan Haider
@zeeshan72
Aug 06 2016 05:00
according to my code it should make the background color white. which it does for like a split second but then redirects..
what issue were you having??
DJ
@qualitymanifest
Aug 06 2016 05:05
@zeeshan72 if you have a codepen, paste a link to that. it is much more helpful if we are able to test out your code, and a URL is way shorter than a wall of code...
Chris
@capozzic1
Aug 06 2016 05:06
i fixed the first issue of stacking divs, now I am trying to center them in http://codepen.io/capozzic1/full/JKmZzZ/
Zeeshan Haider
@zeeshan72
Aug 06 2016 05:07
Joshua Sullivan
@jaesulli95
Aug 06 2016 05:08
If you are trying to center a div
apply text-align:center to parent div
then all child elements will be centered within the parent div
Sabrina Ferguson
@itsacoyote
Aug 06 2016 05:08
@capozzic1 centering the text or the div boxes in the main layout of the page?
Chris
@capozzic1
Aug 06 2016 05:09
I notice that text-align centers all of my text. I'm trying to center all of the div boxes on the page.
Sabrina Ferguson
@itsacoyote
Aug 06 2016 05:10
@capozzic1 you can add a class center-block on the div's. That should work if you're using bootstrap
Also you're only using 8 cols in each div in a div.row. A full grid has 12 columns to work with
Sorin Ruse
@sorinr
Aug 06 2016 05:10
@zeeshan72 have you put your input id="search" within a form?
Chris
@capozzic1
Aug 06 2016 05:11
hmm center-block doesn't seem to work
i am using bootstrap as well
Joshua Sullivan
@jaesulli95
Aug 06 2016 05:11
apply it to the parent
probs
Zeeshan Haider
@zeeshan72
Aug 06 2016 05:11
input is with in a form
DJ
@qualitymanifest
Aug 06 2016 05:13
@zeeshan72 it seems like your keypress function submits the form. when you submit a form it refreshes the page by default, which makes everything start over. add event.preventDefault(); to the first line of your if statement inside the keypress function
Zeeshan Haider
@zeeshan72
Aug 06 2016 05:13
its id is search
Sorin Ruse
@sorinr
Aug 06 2016 05:14
@zeeshan72 just prevent your form submition or comment out the form tags to see what happens
Zeeshan Haider
@zeeshan72
Aug 06 2016 05:15
@qualitymanifest thanks now it works
CamperBot
@camperbot
Aug 06 2016 05:15
zeeshan72 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star2: 1329 | @qualitymanifest |http://www.freecodecamp.com/qualitymanifest
Zeeshan Haider
@zeeshan72
Aug 06 2016 05:15
@sorinr thanks
CamperBot
@camperbot
Aug 06 2016 05:15
zeeshan72 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 618 | @sorinr |http://www.freecodecamp.com/sorinr
Chris
@capozzic1
Aug 06 2016 05:17
center-block. aahh why wont you work :(
Zeeshan Haider
@zeeshan72
Aug 06 2016 05:19
@capozzic1 use your own center block
center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
give it a try....
include the class in your parent div..
Sorin Ruse
@sorinr
Aug 06 2016 05:23
@zeeshan72 welcome. you can even do it like: <form class="form-inline" onsubmit="return false">
Chris
@capozzic1
Aug 06 2016 05:23
i tried that, still having issues. hmmm maybe i have a missing div tag somewhere
Sabrina Ferguson
@itsacoyote
Aug 06 2016 05:24
@capozzic1 not sure what you want to do with the div centering, I think your divs are at the full width of the content page area, so you won't exactly see them center.
Zeeshan Haider
@zeeshan72
Aug 06 2016 05:25
@capozzic1 .outPopUp {
position: absolute;
width: 500px;
z-index: 15;
left: 50%;
margin: -250px 0 0 0px;
}
@capozzic1 try this
Sabrina Ferguson
@itsacoyote
Aug 06 2016 05:25
@capozzic1 it's looking centered now
Zeeshan Haider
@zeeshan72
Aug 06 2016 05:25
@sorinr yeah it looks good..
Sorin Ruse
@sorinr
Aug 06 2016 05:25
@zeeshan72 center-block its not a valid html tag. maybe .center-block
Chris
@capozzic1
Aug 06 2016 05:25
thanks for the info Sabrina
Zeeshan Haider
@zeeshan72
Aug 06 2016 05:27
@sorinr yeah was taking about .center-block and adding a center-block class to div element..
@capozzic1 note that the width which i have set to 500px should be equal to the width of you div element..
Chris
@capozzic1
Aug 06 2016 05:30
let me try that thanks
Chris
@capozzic1
Aug 06 2016 05:38
can't get it to perfectly center yet, still googling. hehe
Sabrina Ferguson
@itsacoyote
Aug 06 2016 05:39
@capozzic1 are you trying to center vertically as well?
Chris
@capozzic1
Aug 06 2016 05:39
yes, all 4 divs under my navbar I want to be centered vertically
Sorin Ruse
@sorinr
Aug 06 2016 05:39
@capozzic1 use display:flex;, justify-content: center;align-items: center;
Chris
@capozzic1
Aug 06 2016 05:42
that worked. thanks alot. hmm i've never seen those properties before.
Sorin Ruse
@sorinr
Aug 06 2016 05:44
@capozzic1 you can read more here: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
David
@davidcedresx
Aug 06 2016 05:44
Hello guys I Just made my first challenge
and I wanted to share it here
idk
check it out, I hope you like it
Chris
@capozzic1
Aug 06 2016 05:45
@sorinr thanks alot
CamperBot
@camperbot
Aug 06 2016 05:45
capozzic1 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 619 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Aug 06 2016 05:50
@capozzic1 welcome
Mark
@cityproject
Aug 06 2016 06:38
could anyone help me applying this animation to my live site?http://codepen.io/capreasy/pen/uawgv I'm having difficulty adding the animation class when click on the button etc
Jaren Escueta
@jarenescueta731
Aug 06 2016 06:50
@cityproject I'd suggest trying to recreate the menu effect yourself, it's more beneficial than copy-pasting complex code you don't understand and easier than spending the time to fully understand it
Mark
@cityproject
Aug 06 2016 06:51
it's a bit rush to conclude that i don't understand anything.
surely i can just give animation just by adding class name
i just wasn't sure if there is more than just adding class or removing the class
cause the original fiddle has its own js script for the animation part
buiphuking
@buiphuking
Aug 06 2016 08:59
hi guys, i build twichtv, i have a question, i want youtube channel about lcs lol, how do i know this is possible to embed in twichtv ?????????????????????
Nazim Abdimomunov
@dm-nz
Aug 06 2016 09:34

        <script>
            $(document).ready(function() {
                $.getJSON('/json/quotes.json', function(json){
                    $("#quote").html(JSON.stringify(json));
                });
            });
        </script>
This code works on Safari, but doesn’t work on Firefox and Chrome. Why?
hallowcard13
@hallowcard13
Aug 06 2016 09:39
@dm-nz which jquery version u r using ?
Nazim Abdimomunov
@dm-nz
Aug 06 2016 09:40
@hallowcard13 1.11.3
hallowcard13
@hallowcard13
Aug 06 2016 09:46
Nazim Abdimomunov
@dm-nz
Aug 06 2016 09:56
@hallowcard13 it doesn’t help. But this challenge https://www.freecodecamp.com/challenges/get-json-with-the-jquery-getjson-method works without additional libraries on any browser.
Sorin Ruse
@sorinr
Aug 06 2016 10:01
@dm-nz this is a local resource '/json/quotes.json' ?
Nazim Abdimomunov
@dm-nz
Aug 06 2016 10:02
@sorinr yes. I’m working on AMPPS local server.
Sorin Ruse
@sorinr
Aug 06 2016 10:04
@dm-nz i would try $.getJSON('http://localhost/json/quotes.json'
Nazim Abdimomunov
@dm-nz
Aug 06 2016 10:14
@sorinr thanks, but that is not the case. I’ve configured host names for this project. The path is correct.
CamperBot
@camperbot
Aug 06 2016 10:14
dm-nz sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 620 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Aug 06 2016 10:20
@dm-nz can you pass me by pm the quotes.json file to test it on my local machine? i'm on xampp using chrome
Mohanad Mjawaz
@Mohanad-Mjawaz
Aug 06 2016 10:36
hello guys
i have 2 question
im using :
$("#followerInfo").prepend("<div class='row'>" + "<div class='col-md-4'>" + "<img src='" + logo + "'>" + "</div>" + "<div class='col-md-4'>" + "<a href='https://www.twitch.tv/'" + name + ">" + name + "</a>" + "</div>" + "<div class='col-md-4'>" + status + "</div></div>");
twice in my program, should i make it a function ?
and how can i target blank page ! i mean i think i know how to do it but its not actually working.
and i just found out that the link is not working :S
i think its quotation problem but i cant see it
Sorin Ruse
@sorinr
Aug 06 2016 10:42
@dm-nz let me know if it is ok now
Nazim Abdimomunov
@dm-nz
Aug 06 2016 10:50
@sorinr it is OK. Thanks again.
CamperBot
@camperbot
Aug 06 2016 10:50
dm-nz sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: dm-nz already gave sorinr points
Sorin Ruse
@sorinr
Aug 06 2016 10:52
@dm-nz good . welcome
laststand0810
@laststand0810
Aug 06 2016 11:32

@laststand0810
Hi guys, I got a problem, i'm trying to get the json from openweathermap back to my codepen and make a json object there, but it is seems to be a cross domain call so I got nothing at all, I tried to use jsonp and CORS but I don't know how to do it right, can anybody take a look at my pen and show me?

the url works fine, I can go to it and look at the json but can't seems to pull it out by getJSON

https://codepen.io/laststand0810/pen/bZxGkA?editors=1011

Sorin Ruse
@sorinr
Aug 06 2016 11:37
@laststand0810 as a quick fix to test its working you can use https://crossorigin.me in front of your http call like https://crossorigin.me/http://openweather....... but if that site is down your app will be also down
laststand0810
@laststand0810
Aug 06 2016 11:42
@sorinr ah k thanks, but can I have the normal way too? for reference? where do I have to fix? there's some guy on flows said openweather don't approve CORS anymore, and they only allow jsonp now, so how can I apply it to my app?
CamperBot
@camperbot
Aug 06 2016 11:42
laststand0810 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 621 | @sorinr |http://www.freecodecamp.com/sorinr
Stephen James
@sjames1958gm
Aug 06 2016 11:42
@laststand0810 make sure your URL has http:// on the front or it will launch with http://codepen
laststand0810
@laststand0810
Aug 06 2016 11:43
@sjames1958gm ah yes I did, actually it must be https for openweather only allow safe domain
sry forgot to mention that
Stephen James
@sjames1958gm
Aug 06 2016 11:44
I didn't think that openweather allowed https:// unless you paid.
@laststand0810
Try this?
$.ajax({
            url: "https://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + long + "&appid=39127289f84c4b76a04b9b47a08e3d08&callback=?",
            dataType: "jsonp",
            sucess: "logResults"
         });
laststand0810
@laststand0810
Aug 06 2016 11:44
well they ...sorta did so i dunno :v
Sorin Ruse
@sorinr
Aug 06 2016 11:47
another weather api that works ether on http and https is this: http://www.apixu.com/pricing.aspx they have a free plan of 5000 calls/month
laststand0810
@laststand0810
Aug 06 2016 11:49
@sjames1958gm nope, not working
the https://api.openweathermap.org is not running, plus the &callback=? is using only for getJSON
@sorinr yeah i'll try it out, thnks
Stephen James
@sjames1958gm
Aug 06 2016 11:54

@laststand0810
I ran this over http:// on codepen (had to hardcode the lat long as getPosition doesn't work over http://)

         $.ajax({
            url: "http://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + long + "&appid=39127289f84c4b76a04b9b47a08e3d08&callback=?",
            dataType: "jsonp",
            success: function(data) {
               console.log(data);
            }
         });

And I got back a response

laststand0810
@laststand0810
Aug 06 2016 12:04
@sjames1958gm wow k now this is weird :v, anyway I got the data just like u said but now the geolocation wont run lol, guess i'll figure sth else out later, anyway thanks alot, cheers :)
CamperBot
@camperbot
Aug 06 2016 12:04
laststand0810 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2376 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Zeusnux
@HunL
Aug 06 2016 12:19
hi all, glad to meet you
Azlan Mukhtar
@azlan
Aug 06 2016 12:28
hello @HunL
Ken Haduch
@khaduch
Aug 06 2016 12:29
@HunL - hello, welcome to freecodecamp...
Ramesh syangtan
@rameshsyn
Aug 06 2016 12:31
@HunL hello and welcome to FCC :dancer:
Zeusnux
@HunL
Aug 06 2016 12:33
:smile:
Norvin Burrus
@ndburrus
Aug 06 2016 13:26
@HunL Welcome to Free Code Camp & the community! :sparkles:
If you need assistance, just ask!
CamperBot will provide information (if possible) when you type "help (subject)" in the chat room :) .
Also, you may enjoy these: :sparkles: How To Rapidly Progress When Learning To Code, How To Teach Yourself Code, & Please do learn to code
Jose Ruivo
@jruivo
Aug 06 2016 14:02

Can anyone help me adjust the "history timeline" part of the page below the thumbnail?
On FreeCodeCamp's example, they have it centered and dimensioned whereas mine extends all the way. I saw that they have this " <div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2"> " I'm not sure if that's the thing supposed to do the trick.

Mine:
http://codepen.io/JRuivo/pen/jAZJzr

Freecodecamp:
https://codepen.io/FreeCodeCamp/full/NNvBQW/

Sorin Ruse
@sorinr
Aug 06 2016 14:12
@jruivo instead of col-md-8 col-md-offset-2 just try col-md-6 col-md-offset-3
Blake Geraci
@bgeraci714
Aug 06 2016 15:00
Anyone have any thoughts on why crossorigin.me would affect an API call to the current weather api?
vs
a noteworthy difference is the temperature 294 (or ~70 degrees) vs 298 ( ~80 degrees)
Sorin Ruse
@sorinr
Aug 06 2016 15:09
@bgeraci714 at witch intervals did u made the calls?
Ryan Williams
@Ryanwfile
Aug 06 2016 15:33
This message was deleted

Can someone please help me with this code for the simon project. I am trying to have the user click a button for each iteration of a for loop. The codepen link is http://codepen.io/Ryanwfile/pen/VjEVZB

function clicker()
{
  console.log("Clicker has been called");
  console.log("Order length is " + order.length);
  for (var i = 0; i < order.length; i++)
  {
    console.log("i is " + i);
    $('.sector').on('click',function()//Handles the user's button clicks
    {
      console.log("The order array is [" + order + "]");
      setTimeout(function()
       {
         if (this.id == order[i] && order[i] == 'red')
         {
           buttons.brightRed();
           //setTimeout(function(){buttons.red()},1100);
         }
         else if (this.id == order[i] && order[i] == 'green')
         {
           buttons.brightGreen();
           //setTimeout(function(){buttons.green()},1100);
         }
         else if (this.id == order[i] && order[i] == 'blue'){
          buttons.brightBlue();
          //setTimeout(function(){buttons.blue()},1100);
        }
        else if (this.id == order[i] && order[i] == 'yellow')
        {
          buttons.brightYellow();
          //setTimeout(function(){buttons.yellow()},1100);
        }
       },1100 * count)//ends the setTimeout statement of the for loop
  });//ends button click function 
 }//ends for loop

beeper();//random light generation function 
}

Thank you for any help

Isaac Weber
@ikey2244
Aug 06 2016 15:36
http://codepen.io/ikey2244/pen/NAObkK
any ideas how to make my nav bar align right center on top of the svg and also have it responsive
Cristty
@cristix415
Aug 06 2016 16:37

$.ajax({
url: "http://api.openweathermap.org/data/2.5/weather",
datatype: "jsonp",
data: {
key: "AIzaSyDzZs6EOB382qgoDdqNPJKoZwjDg_6gVNo",
lat: 46.18,
lon: 21.32,
appid: "e7be36817bfeb1a276e90e23b39e442f"

    },
    success: function(jsonp) {

$("#location").html(json.country[0]);
},
}); //
.... any help cu this code? .... I dont understand why doen't display my Country ....

Moisés Man
@moigithub
Aug 06 2016 16:57
@cristix415 open ur browser devtools (F12 or control + shift +J on most browsers)
and check if u get any error on console
Harry Adel
@harryadel
Aug 06 2016 17:21

http://codepen.io/Hadouken/pen/bEmymd

Any ideas on why my countdown function isn't triggering the setInterval method inside of it?

I'm getting no errors at all in my console BTW
When the session is clicked, It'd only display 60 sec and just stop there
I need to continuously keep decreasing
Ajay Tanwar
@ajayt365
Aug 06 2016 18:42
  getValue();
});

var getValue = function(){
  var longitude;
  var latitude;
  if(navigator.geolocation){
    navigator.geolocation.getCurrentPosition(function(position){

      longitude=position.coords.longitude;
      latitude=position.coords.latitude;
    });
  }
  else{
    console.log("location could not be detected");
  }
   console.log(longitude);
  var url="https://crossorigin.me/http://api.openweathermap.org/data/2.5/weather?lat="+latitude+"&lon="+longitude+"";
   $.getJSON(url,function(data){
     console.log(data);
   });
  };
why console.log(longitude) returns undefined here?
sentedelviento
@sentedelviento
Aug 06 2016 18:46
I have a question for anyone who has finished, or hell, even started the calculator project.
I am creating the calculator in html/css, but I have no idea how to create the buttons of my calculator... semantically
Harry Adel
@harryadel
Aug 06 2016 18:47
@sentedelviento You got two options
sentedelviento
@sentedelviento
Aug 06 2016 18:47

Should I just go

<div></div> over and over for each button in the calculator?

that seems kinda gross
Harry Adel
@harryadel
Aug 06 2016 18:47
Either lists
and then use float to align them and grant the plus button bigger size
or tables
which are somewhat better and easier
sentedelviento
@sentedelviento
Aug 06 2016 18:48
Why does the plus button have to be a bigger size?
Harry Adel
@harryadel
Aug 06 2016 18:49
@sentedelviento you know, just to look like the example project
lol but if you want all the buttons to be of the same size its ok dude :D
I was just trying to replicate the same look, that's all
sentedelviento
@sentedelviento
Aug 06 2016 18:50
Oh haha, I forgot the example project had a disproportionally large plus button. I do plan to redesign the calculator, but I wasn't trying to come off as nitpicky, my bad, haha.
I haven't used tables yet, guess I'm in for a fun time.
I just remember reading a lot of design blogs where people said, "You should NEVER use tables that's horrible"
and then counter responses where people were saying, "Actually that's dumb tables are perfectly okay"
Harry Adel
@harryadel
Aug 06 2016 18:51
tables are dumb :D LOL
I only used lists because I was more used to it when I did my nav bars
but in reality tables are the perfect fit and it'd be nice to learn it as you do this project since you already know how to use lists, I suppose
sentedelviento
@sentedelviento
Aug 06 2016 18:53
That's a good point. I don't remember why there was all of the hate for tables.
Do you know what I'm referring to, though?
Harry Adel
@harryadel
Aug 06 2016 18:53
@ajayt365 I guess you forgot to add the word "var" before defining longitude, my friend
Blake Geraci
@bgeraci714
Aug 06 2016 18:54
@sorinr I made the calls about 8 hrs from each other
Harry Adel
@harryadel
Aug 06 2016 18:54
@sentedelviento I understand what you are talking about but I don't know what site you are referring to
Blake Geraci
@bgeraci714
Aug 06 2016 18:54
but shouldn't when** i make the calls be irrelevant?
Ajay Tanwar
@ajayt365
Aug 06 2016 18:55
see third line @Harry97 . i declared var longitude and then i am using in if {} block
Blake Geraci
@bgeraci714
Aug 06 2016 18:55
Reposting this:
@bgeraci714
Anyone have any thoughts on why crossorigin.me would affect an API call to the current weather api?
https://crossorigin.me/http://api.openweathermap.org/data/2.5/weather?q=Easthampton&appid=176611c00d609a0919ef1cd4b31da46b
vs
http://api.openweathermap.org/data/2.5/weather?q=Easthampton&appid=176611c00d609a0919ef1cd4b31da46b
a noteworthy difference is the temperature 294 (or ~70 degrees) vs 298 ( ~80 degrees)
Muhammad Hasham
@MohammadHasham
Aug 06 2016 18:55
can anyone help me with todo list codepen?
not a fcc project though
Blake Geraci
@bgeraci714
Aug 06 2016 18:56
another question, for the crossorigin.me issue. If i reload the page for the crossorigin.me it works.
But shouldn't it be doing that anyways anytime someone clicks the link? (shouldn't it be a dynamic response?)
Sorin Ruse
@sorinr
Aug 06 2016 19:00
@bgeraci714 thats why. they actualize the temp every 3 hours
Ajay Tanwar
@ajayt365
Aug 06 2016 19:00
@sorinr can u help with the code above ?
Sorin Ruse
@sorinr
Aug 06 2016 19:03
@ajayt365 where do u call this getValue(); }); and where do u use var getValue = function(){..... ?
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:18
can anyone help me with this,actually you have to add an item and then when you will click the item it should be striked but it is making the other items in the list also striked and the new items are not being added on the next row please can anyone help
Sorin Ruse
@sorinr
Aug 06 2016 19:18
@ajayt365 first you can do if(navigator.geolocation.getCurrentPosition)
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:18
@ajayt365 @sorinr
Harry Adel
@harryadel
Aug 06 2016 19:20
@MohammadHasham What do you mean by "striked"?
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:20
like drawn a line over some text
as if it is done or cancelled
@Harry97
Sorin Ruse
@sorinr
Aug 06 2016 19:21
@ajayt365 if you console.log(longitude,latitude); you will get the coordinates.
Harry Adel
@harryadel
Aug 06 2016 19:22
and you want the text to be drawn over the text you clicked on only
not the whole thing, correct?
Omar Adzagic
@1ucid
Aug 06 2016 19:22
does anyone know
when will Sass and React exercises will be finished
and accessable for working
on freeCodeCamp
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:22
@Harry97 Yes
yes but that is acting weird
Harry Adel
@harryadel
Aug 06 2016 19:24
that's because you've assigned your click function to the WHOLE table data
not just the clicked part
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:24
@Harry97 I am assignind the id of the particular <td>
id = wer
isnt that okay?
Harry Adel
@harryadel
Aug 06 2016 19:25
every piece of text you add is directly added to the same element (id=wer)
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:26
so how can i dynamically change id's or is there something else i need to do
@Harry97
Harry Adel
@harryadel
Aug 06 2016 19:27
We'd have to single out the clicked part
I'm searching for a solution
maybe using children() method
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:27
i'll be really thankful if you can help me with that issue
Harry Adel
@harryadel
Aug 06 2016 19:28
@MohammadHasham Don't worry I'mma do my best till we find a solution together ^^
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:28
@Harry97 really thankful
to you
$("#wer").children().wrapInner('<strike>'); tried this but still it cancels the whole thing i have got your point which is extremely valid but dont know that how to solve such cases
@Harry97
Harry Adel
@harryadel
Aug 06 2016 19:32
well It was just a guess
better search for a different way around this
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:32
Okay :worried:
Sorin Ruse
@sorinr
Aug 06 2016 19:33
@MohammadHasham it should be: $("#wer").on('click',function(e){ console.log(e); $(e.target).closest('td').wrapInner('<strike>');
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:35
@sorinr Thanks
CamperBot
@camperbot
Aug 06 2016 19:35
mohammadhasham sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 623 | @sorinr |http://www.freecodecamp.com/sorinr
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:35
can you explain me the target and closest
what is there significance here
@sorinr
Please can you tell me that why did the code worked due to closest and target and why was'nt it working without it was i doing something wrong?
@sorinr
Harry Adel
@harryadel
Aug 06 2016 19:41
@MohammadHasham Dude, sorin already solved it for ya
target gets you which type of DOM element was clicked
and then closest even narrows it down even more in order for it to pick the specific clicked td rather than every single td
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:43
@sorinr @Harry97 Thanks
CamperBot
@camperbot
Aug 06 2016 19:43
mohammadhasham sends brownie points to @sorinr and @harry97 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for harry97
:warning: mohammadhasham already gave sorinr points
Sorin Ruse
@sorinr
Aug 06 2016 19:44
@MohammadHasham yea. @Harry97 already explained how it works
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:44
can we use document.getElementById instead of target or the target is more better way?
@sorinr @Harry97
Harry Adel
@harryadel
Aug 06 2016 19:45
@MohammadHasham Why would you not use jQuery?!
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:45
@Harry97 Okay so that is more better
hope so one day i'll be like you guys in js :smile:
@sorinr @Harry97
Harry Adel
@harryadel
Aug 06 2016 19:46
It was all sorinr not me
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:46
You guys are deeply immensed in js
Sorin Ruse
@sorinr
Aug 06 2016 19:46
@MohammadHasham hope not being like me. i'm too lazy on doing things :)
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:46
@sorinr i was really struggling with this issue but you did it in no time
Sorin Ruse
@sorinr
Aug 06 2016 19:48
@MohammadHasham its just a matter of how to find certain elements on your page. keep calm. you will learn it in time :)
Muhammad Hasham
@MohammadHasham
Aug 06 2016 19:49
@sorinr Hopes alive.
Sorin Ruse
@sorinr
Aug 06 2016 19:50
@MohammadHasham yep. happy coding. trial and error is the mother of learning
Vince
@Vince33
Aug 06 2016 19:59
hey guys was wondering if any one has some solid experience with webpack
trying to get a new project started here and want to get HMR working
I have a config file started but not sure i am understanding the docs properly
Juan Sierra
@juan-sierra
Aug 06 2016 20:37
hello guys
anyone here know media queries
Charles Chung
@chulmo
Aug 06 2016 20:45

D3 Experts: Can someone please help me figure out why my D3 bar chart starts overlapping data when you click on the button to dynamically update the chart?

http://codepen.io/anon/pen/OXBZNY

Ajay Tanwar
@ajayt365
Aug 06 2016 20:58
@sorinr i can get cosnole.log if i write it in if{} block , but the real thing is that i want to use them in getJSON request in url . which when i see the url in console the lat and long have attribute values 'undefined'. why can't i use them in my request ? they are in the same function , then why values are 'undefined'?
@sorinr i can get cosnole.log if i write it in if{} block , but the real thing is that i want to use them in getJSON request in url . which when i see the url in console the lat and long have attribute values 'undefined'. why can't i use them in my request ? they are in the same function , then why values are 'undefined'?
Sorin Ruse
@sorinr
Aug 06 2016 21:03
@ajayt365 sorry but now i'll go to a friend of mine called "bed". if u don't figure out by yourself just pm with the link
Ajay Tanwar
@ajayt365
Aug 06 2016 21:04
cool:)
Kreemly
@Krono08
Aug 06 2016 21:37
Hello all, can somebody advise me about my changelle build a tribute page ??
Dylan C. Israel
@PizzaPokerGuy
Aug 06 2016 21:37
Sure
what do you need help with
this is it. i want to know your critics
Dylan C. Israel
@PizzaPokerGuy
Aug 06 2016 21:39
I would add custom font. I would also make the paragraph maybe be centered in the page and not go the entire width.
if you don't know how to do that I cover these things in some videos on my channel you can see here: https://www.youtube.com/watch?v=lFaBtDiMN34&list=PLHdCowjFIBmLbdG9RGlCwpZF6Y_FaEVco
Yo, why is that so big lol
Greetings, would anyone be able to help me regarding a react project. I can get an entire array to display from the API get Call, but I can't seem to render a single index. Any help is appreciated.
Kreemly
@Krono08
Aug 06 2016 21:41
thank you @PizzaPokerGuy
CamperBot
@camperbot
Aug 06 2016 21:41
krono08 sends brownie points to @pizzapokerguy :sparkles: :thumbsup: :sparkles:
:cookie: 248 | @pizzapokerguy |http://www.freecodecamp.com/pizzapokerguy
Harry Adel
@harryadel
Aug 06 2016 21:41

Any thoughts on how to chain countdowns in order to start counting down the break time?

http://codepen.io/Hadouken/pen/bEmymd?editors=0010

Dylan C. Israel
@PizzaPokerGuy
Aug 06 2016 21:41
yes
Harry Adel
@harryadel
Aug 06 2016 21:41
I've managed to create a function that starts counting down the session time
Harry Adel
@harryadel
Aug 06 2016 21:42
@PizzaPokerGuy I ain't sure they've approached the project the same way I did
Dylan C. Israel
@PizzaPokerGuy
Aug 06 2016 21:43
it chains the two together
I scanned your code I think in vid 3 or 4
I get into linking them together
Harry Adel
@harryadel
Aug 06 2016 21:44
@PizzaPokerGuy Well, thanks, buddy. I'mma check it out and report back to ya!
CamperBot
@camperbot
Aug 06 2016 21:44
harry97 sends brownie points to @pizzapokerguy :sparkles: :thumbsup: :sparkles:
:cookie: 249 | @pizzapokerguy |http://www.freecodecamp.com/pizzapokerguy
Major Dills
@Major4k
Aug 06 2016 22:03
oh snap Coding Tutorials I just came across your videos yesterday.. Just wanted to say thanks for your time with those
@PizzaPokerGuy
Dylan C. Israel
@PizzaPokerGuy
Aug 06 2016 22:03
@Major4k Thanks man. Got some news one coming out all the time so glad they help haha
CamperBot
@camperbot
Aug 06 2016 22:03
pizzapokerguy sends brownie points to @major4k :sparkles: :thumbsup: :sparkles:
:cookie: 116 | @major4k |http://www.freecodecamp.com/major4k
Major Dills
@Major4k
Aug 06 2016 22:04
lol Well thanks bro. i think thats my first brownie p
Matt K
@mkrump
Aug 06 2016 22:26
what's the best way to center calculator + make buttons same size. I've tried using btn-groups, but that didn't really look right. This is where I'm at right now. http://codepen.io/okeydoke/pen/KrGjxa
Ryan Williams
@Ryanwfile
Aug 06 2016 22:26
Can someone please help me with this code for the simon project. I am trying to have the user click a button for each iteration of a for loop. The codepen link is http://codepen.io/Ryanwfile/pen/VjEVZB Thank you for any help
function clicker()
{
  console.log("Clicker has been called");
  console.log("Order length is " + order.length);
  for (var i = 0; i < order.length; i++)
  {
    console.log("i is " + i);
    $('.sector').on('click',function()//Handles the user's button clicks
    {
      console.log("The order array is [" + order + "]");
      setTimeout(function()
       {
         if (this.id == order[i] && order[i] == 'red')
         {
           buttons.brightRed();
           //setTimeout(function(){buttons.red()},1100);
         }
         else if (this.id == order[i] && order[i] == 'green')
         {
           buttons.brightGreen();
           //setTimeout(function(){buttons.green()},1100);
         }
         else if (this.id == order[i] && order[i] == 'blue'){
          buttons.brightBlue();
          //setTimeout(function(){buttons.blue()},1100);
        }
        else if (this.id == order[i] && order[i] == 'yellow')
        {
          buttons.brightYellow();
          //setTimeout(function(){buttons.yellow()},1100);
        }
       },1100 * count)//ends the setTimeout statement of the for loop
  });//ends button click function 
 }//ends for loop

beeper();//random light generation function 
}
aagussn
@aagussn
Aug 06 2016 23:14
can someone help me?
i cant align vertical my h1 with my img https://codepen.io/aagussn/pen/xOadLA?editors=0100
if u have some tips plz :D
Sabrina Ferguson
@itsacoyote
Aug 06 2016 23:45
@aagussn how so do you mean align vertical with your img?
oh I see it now, it's resized differently in the chat versus the whole browser page
@aagussn perhaps give the h1 a line-height: 56px?