These are chat archives for FreeCodeCamp/Help

10th
Sep 2017
Eric Miller
@ericmiller777
Sep 10 2017 00:57
trying to get around the whole address bar makes blank space under background image thing
so im going to try and make it resize with javascri[t
but if i set my background imag ewith css
how can i tag the image?
background: url(../img/bg.jpg)
korzo
@korzo
Sep 10 2017 01:14
@ericmiller777 You can't
You can only resize HTML element which has this background image
Eric Miller
@ericmiller777
Sep 10 2017 01:14
okay so
i set a image
set it to hidden? or just create a dom object in javascript?
/jquery
korzo
@korzo
Sep 10 2017 01:15
@ericmiller777 But you can use background-size css property to cover/contain
Eric Miller
@ericmiller777
Sep 10 2017 01:15
that works fine
but
when i scroll down on mobile
theres a blank space when the address bar hides
is there a way
korzo
@korzo
Sep 10 2017 01:16
@ericmiller777 Or you can use absolutely positioned <img> under your element and resize it with javascript.
Could you post link to your codepen?
Eric Miller
@ericmiller777
Sep 10 2017 01:17
to set to 100% vh/vw from css?
i could make one buts it really is just a blank page with a background atm
and github is very slow atm
korzo
@korzo
Sep 10 2017 01:17
@ericmiller777 What do you mean by 'address bar '?
Eric Miller
@ericmiller777
Sep 10 2017 01:17
on mobile
the adress bar at the top
when it hides
it leaves space at the bottom
if you scroll down
korzo
@korzo
Sep 10 2017 01:19
Oh, I understand.
Do you have your code at github?
Eric Miller
@ericmiller777
Sep 10 2017 01:20
yea but github seems to be broken
not taking updates atm
i have some code i used in my weather app
i could probably set its height with that
:/
i wonder if i broke my repository somehow
@korzo ill just link it
<html>
<head>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<!-- Latest compiled and minified JavaScript   -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css" integrity="sha384-OHBBOqpYHNsIqQy8hL1U+8OXf9hH6QRxi0+EODezv82DfnZoV7qoHAZDwMwEJvSw"
    crossorigin="anonymous">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" />

<link href="https://fonts.googleapis.com/css?family=Orbitron" rel="stylesheet"> 

<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<style>
    body {
    background: url("wood-floor.jpg") no-repeat center center fixed;
    background-size: cover;
}
</style>
<body>
<div class="container">
<h1>hi</h1>
</div>
<script>
</script>
</body>
</html>
browser that looks great
korzo
@korzo
Sep 10 2017 01:25
@ericmiller777 Give me a moment
@ericmiller777 But there is no background image in your code at https://ericmiller777.github.io/Weather_App_freeCodeCamp/
Eric Miller
@ericmiller777
Sep 10 2017 01:27
no no
at the bottom i center the whole div
jQuery.fn.center = function () {
    this.css("position","absolute");
    this.css("top", Math.max(0, (($(window).height() - $(this).outerHeight()) / 2) + 
                                                $(window).scrollTop()) + "px");
    this.css("left", Math.max(0, (($(window).width() - $(this).outerWidth()) / 2) + 
                                                $(window).scrollLeft()) + "px");
    return this;
}
found that somewhere probably stack overflow
weird my github is update but not my github page
korzo
@korzo
Sep 10 2017 01:31
@ericmiller777 Oh, I thought we are talking about background image :)
Gersho
@Gersho
Sep 10 2017 01:31
did you try ctrl+F5 ? @ericmiller777
Eric Miller
@ericmiller777
Sep 10 2017 01:32
oh i am sorry im just crazy lol
Gersho
@Gersho
Sep 10 2017 01:32
ok, should i call the crazy house ?
Eric Miller
@ericmiller777
Sep 10 2017 01:32
yep
and yep
Gersho
@Gersho
Sep 10 2017 01:33
i have them on speed dial don't worry, i go there often too
Eric Miller
@ericmiller777
Sep 10 2017 01:33
im gonna go eat come back and maybe itll be fixed
Gersho
@Gersho
Sep 10 2017 01:33
have a nice meal
Eric Miller
@ericmiller777
Sep 10 2017 01:33
cant really test on mobile unless that starts working
@korzo @gersho thanks
CamperBot
@camperbot
Sep 10 2017 01:33
ericmiller777 sends brownie points to @korzo and @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 407 | @gersho |http://www.freecodecamp.com/gersho
:cookie: 468 | @korzo |http://www.freecodecamp.com/korzo
Eric Miller
@ericmiller777
Sep 10 2017 01:34
$ git commit index.html
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
gotta love that
lol
but i guess
it is
korzo
@korzo
Sep 10 2017 01:36
@ericmiller777 Your .container is unnecessary
korzo
@korzo
Sep 10 2017 01:49
@ericmiller777 I replaced the center function and centered div with CSS : https://jsbin.com/fuzahis/edit?html,css,output
Jill Lee
@jill-lee
Sep 10 2017 01:57
image.png
Hi can someone help me with the error?
image.png
Also why is the carousel not working?
korzo
@korzo
Sep 10 2017 01:59
@phoenix-burn It means file doesn't exists
Jill Lee
@jill-lee
Sep 10 2017 01:59
@korzo I mean how do i goabout it?
because it works on codepen
korzo
@korzo
Sep 10 2017 02:01
@phoenix-burn Are those files in the same folder as index.html?
Nope
js on script.js if that is what you mean?
korzo
@korzo
Sep 10 2017 02:04
@phoenix-burn Nope. errors from console are files stylesheetB.css and files css
It's the same as on codepen
@phoenix-burn Those files are in css , lines 10 and 13
Jill Lee
@jill-lee
Sep 10 2017 02:13
@korzo Thanks I missed it. Also why is the carousel not working on my local file?
CamperBot
@camperbot
Sep 10 2017 02:13
phoenix-burn sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 470 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Sep 10 2017 02:23
@phoenix-burn Where did you add your JS code from codepen inside local file?
@phoenix-burn Because it works for me when I copy your pen in local file. It just load for very long time
Jill Lee
@jill-lee
Sep 10 2017 02:30
image.png
@korzo
korzo
@korzo
Sep 10 2017 02:34
@phoenix-burn did you add script tag for script.js file...after jquery and bootstrap?
Jill Lee
@jill-lee
Sep 10 2017 02:39
@korzo yes will that cause problems? im a noob still learning :)
korzo
@korzo
Sep 10 2017 02:40
@phoenix-burn If you don't add it, your JS from codepen JS box doesn't run... so no carousel
@phoenix-burn Just copy/paste js code to script.js and add into your html <script src="script.js"></script> right before closing </body> tag
Jill Lee
@jill-lee
Sep 10 2017 02:43
@korzo thanks! :D
CamperBot
@camperbot
Sep 10 2017 02:43
phoenix-burn sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
api offline
Eric Miller
@ericmiller777
Sep 10 2017 02:44
@korzo lol nice, does that work on all screen sizes?
korzo
@korzo
Sep 10 2017 02:46
@ericmiller777 I hope so :smile: I tested it only on desktop, tablet and mobile
Eric Miller
@ericmiller777
Sep 10 2017 02:46
probably so then, the issue i had was that it would change position, either lower or higher after it filled in the formation from the api
@korzo so it updated
now if ytou try that on mobile
if you scroll down
and the address bar hides
there will be space the size of the address bar
korzo
@korzo
Sep 10 2017 02:48
@ericmiller777 wrong Url I suppose
Eric Miller
@ericmiller777
Sep 10 2017 02:48
hmm?
idk i was just going to add a img tag then resize it with javascript
Engjell Bislimi
@Engjell00
Sep 10 2017 02:49
I have a question. I'm learning Bootstrap and there is so many content to learn Am I obligated to know all this without googling it example If I'm working
korzo
@korzo
Sep 10 2017 02:50
@ericmiller777 Oh, that's the bg image problem we started with, right?
Eric Miller
@ericmiller777
Sep 10 2017 02:50
yea
id rather do it with css
but
seems that all the solutions ive tryed dont work
korzo
@korzo
Sep 10 2017 02:51
@ericmiller777 try to add margin:0; padding: 0 to body and html
Eric Miller
@ericmiller777
Sep 10 2017 02:51
okay
korzo
@korzo
Sep 10 2017 02:51
@ericmiller777 on which mobile you have empty space there?
Eric Miller
@ericmiller777
Sep 10 2017 02:53
android
chrome
but you gotta scroll and its when the ADDRESS BAR HIDES
oops
oops
@korzo well now it just doesnt hide which i suppose is fine?
@korzo thanks
CamperBot
@camperbot
Sep 10 2017 02:57
ericmiller777 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 471 | @korzo |http://www.freecodecamp.com/korzo
Girish Kumar Sharma
@GirishKumarSharma
Sep 10 2017 03:38
Good morning
I need excel help. Anyone here please?
Eric Miller
@ericmiller777
Sep 10 2017 04:37
hey
oh idk excel :(
piteto
@piteto
Sep 10 2017 04:38
@GirishKumarSharma What challenge is this for?
I'd like to try some excel challlenges if they have them
Eric Miller
@ericmiller777
Sep 10 2017 04:54
id like to get the buttons center with the text box div
file:///C:/Users/Eric/Github/Javascript_Calculator_freeCodeCamp/index.html
eh
or at least just centered
piteto
@piteto
Sep 10 2017 04:58
Add the text-center class to your row
Eric Miller
@ericmiller777
Sep 10 2017 04:59
.>
really
<div id="buttons" class="row text-center">
Eric Miller
@ericmiller777
Sep 10 2017 05:02
@piteto thanks
CamperBot
@camperbot
Sep 10 2017 05:02
ericmiller777 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 79 | @piteto |http://www.freecodecamp.com/piteto
Eric Miller
@ericmiller777
Sep 10 2017 05:02
but why
piteto
@piteto
Sep 10 2017 05:02
<button> is an inline-block element. To center an inline-block element, add text-align: center to the parent element
They act just like <img>
Eric Miller
@ericmiller777
Sep 10 2017 05:04
:(
i see
so weird
piteto
@piteto
Sep 10 2017 05:05
display: block, inline, inline-block
position: absolute, relative, static
and the CSS box model
^^ study those and get to know them well and you'll solve 90% of your CSS problems
the rest is all about floats, flexbox, and css grids
Eric Miller
@ericmiller777
Sep 10 2017 05:09
@piteto was working on that for a couple hours i think... thank you
CamperBot
@camperbot
Sep 10 2017 05:09
ericmiller777 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
api offline
Eric Miller
@ericmiller777
Sep 10 2017 05:09
@piteto ive been focusing so much on javascript i need to focus more on html
piteto
@piteto
Sep 10 2017 05:10
@ericmiller777 It's good to switch focus sometimes. JavaScript is definitely the harder of the two
Mukul Agrawal
@mukul09
Sep 10 2017 06:16
I do have some confusions regarding GSOC. Is there anyone who can guide me about the same?
Ravi Kishore Thella
@ravikishorethella
Sep 10 2017 06:25
Hello all, your feed back is highly appreciated. How is my wiki viewer
https://codepen.io/ravikishorethella/full/WEVMoX/
Eric Miller
@ericmiller777
Sep 10 2017 06:25
@ravikishorethella perfect gj
anyone else here use github pages, but they aRENT UPDATEING TODAY?
sorry
Ravi Kishore Thella
@ravikishorethella
Sep 10 2017 06:27
@ericmiller777 thanks
CamperBot
@camperbot
Sep 10 2017 06:27
ravikishorethella sends brownie points to @ericmiller777 :sparkles: :thumbsup: :sparkles:
:cookie: 297 | @ericmiller777 |http://www.freecodecamp.com/ericmiller777
rscales02
@rscales02
Sep 10 2017 08:14
var now = new Date();
     now = now.toDateString;
     $('#time').html(now);
gives an error that I am calling toDateString on a paragraph HTML element any idea why?
heroiczero
@heroiczero
Sep 10 2017 08:15
@rscales02 you want var now=Date();
rscales02
@rscales02
Sep 10 2017 08:17
It is no longer giving errors, but it is also not giving me a date at all
heroiczero
@heroiczero
Sep 10 2017 08:17
@rscales02 try
var now=Date();
$('#time').html(now);
rscales02
@rscales02
Sep 10 2017 08:20
Sun Sep 10 2017 02:19:31 GMT-0600 (Mountain Daylight Time)
is what that returns, I just want the date out of it
heroiczero
@heroiczero
Sep 10 2017 08:20
@rscales02 actually you just forgot the () in the original code
rscales02
@rscales02
Sep 10 2017 08:20
awesome!
heroiczero
@heroiczero
Sep 10 2017 08:20
@rscales02 now = now.toDateString();
rscales02
@rscales02
Sep 10 2017 08:21
now.toDateString is not a function apparently
 var now = Date();
     now = now.toDateString();
     $('#time').html(now);
heroiczero
@heroiczero
Sep 10 2017 08:23
@rscales02
var now=new Date;
     now = now.toDateString();
     $('#time').html(now);
rscales02
@rscales02
Sep 10 2017 08:23
you rock my socks @heroiczero
thanks @heroiczero
CamperBot
@camperbot
Sep 10 2017 08:24
rscales02 sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1709 | @heroiczero |http://www.freecodecamp.com/heroiczero
rscales02
@rscales02
Sep 10 2017 08:32
function displayWeather(lat, long) {
        $.ajax({
            type: 'GET',
            url: 'https://fcc-weather-api.glitch.me/api/current?lat='+ lat + '&lon=' + long,
            dataType: 'json',
            data: {},
            success: function(response) {
                whereYouIs = response.name;
                $('#whereYouIs').text(whereYouIs);
                temp = response.main.temp;
                $('#temp').text(temp); //problem 1 is here, I can't get this to pull the number from the json file
                conditions = response.weather[0].description;
                $('#conditions').text(conditions);
                icon = response.weather[0].icon;
                $('#condition_icon').html('<span src=\"' + icon + '\"></span>'); //problem 2 is here it does not load the icon
            }
        });
I have 2 more issues I cannot figure out, everything else in this code works and from what I can tell the icon "works" as in it is inserted into the html properly but does not load
Morchid Chellali
@Morched23MJ
Sep 10 2017 08:40
Can you give the link to the pen?
rscales02
@rscales02
Sep 10 2017 08:41
github? I haven't made it in pen yet
Morchid Chellali
@Morched23MJ
Sep 10 2017 08:42
Oh
Morchid Chellali
@Morched23MJ
Sep 10 2017 08:47
Can you remove the \ in the src?
@rscales02
rscales02
@rscales02
Sep 10 2017 08:50
@Morched23MJ I assume you are referring to the escape backslash?
Morchid Chellali
@Morched23MJ
Sep 10 2017 08:50
Yes?
It isn't needed since you used " instead of '
rscales02
@rscales02
Sep 10 2017 08:52
<span src="https://cdn.glitch.com/6e8889e5-7a72-48f0-a061-863548450de5%2F01n.png?1499366020783"></span>
that is the HTML it drops in which seems correct...
Morchid Chellali
@Morched23MJ
Sep 10 2017 08:53
Why don't you use <img>?
I never used span for icons, imgs
rscales02
@rscales02
Sep 10 2017 08:55
Because I like to make things that dont work :smile: icon fixed! now I just need to figure out how to pull the temp, which again I think is right, but clearly not! thanks @Morched23MJ
CamperBot
@camperbot
Sep 10 2017 08:55
rscales02 sends brownie points to @morched23mj :sparkles: :thumbsup: :sparkles:
:cookie: 302 | @morched23mj |http://www.freecodecamp.com/morched23mj
Morchid Chellali
@Morched23MJ
Sep 10 2017 08:56
Happy to help.
Saber I.
@icybears
Sep 10 2017 08:56
for icons u should use <span> or <i>
Morchid Chellali
@Morched23MJ
Sep 10 2017 08:57
But the fCC does give an image, as an icon, I think
in the weather project
Saber I.
@icybears
Sep 10 2017 08:57
that if u are using icons like font awesome, if you are making your "custom icons" from images then <img> is more appropriate
because I believe font awesome icons are SVG not some image you scale down
Morchid Chellali
@Morched23MJ
Sep 10 2017 08:58
@rscales02, for the temp, you're targetting #temp, while in the HTML, there is #temperature.
You should replace $('#temp') with $('#temperature')
rscales02
@rscales02
Sep 10 2017 09:00
damn details lol
thanks again @Morched23MJ I have been trying to figure those issues out for hours
CamperBot
@camperbot
Sep 10 2017 09:00
rscales02 sends brownie points to @morched23mj :sparkles: :thumbsup: :sparkles:
api offline
Morchid Chellali
@Morched23MJ
Sep 10 2017 09:00
Great, now move on. :D Cya
NAVANEETH
@NAVANEETH1
Sep 10 2017 09:22
best code editor for web development
can any one tell me which is the best one
heroiczero
@heroiczero
Sep 10 2017 09:24
@NAVANEETH1 i like using https://notepad-plus-plus.org/
NAVANEETH
@NAVANEETH1
Sep 10 2017 09:24
what about atom
heroiczero
@heroiczero
Sep 10 2017 09:25
yeah atom is good to
NAVANEETH
@NAVANEETH1
Sep 10 2017 09:26
is both equal
heroiczero
@heroiczero
Sep 10 2017 09:26
its just preference. I just used notepad++ for a while now.
NAVANEETH
@NAVANEETH1
Sep 10 2017 09:27
google tell atom is best
heroiczero
@heroiczero
Sep 10 2017 09:28
Atom is cross platform so I like that about Atom
NAVANEETH
@NAVANEETH1
Sep 10 2017 09:29
ok
Stephen James
@sjames1958gm
Sep 10 2017 09:31
@NAVANEETH1 vscode is getting very popular it is from microsoft and is cross platform - based on electron just like atom
NAVANEETH
@NAVANEETH1
Sep 10 2017 09:32
oh
i am a beginners
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 10:21
is there any rule whn you shoudl really use padding or margins?and any browser compatiblity problems?
BERTINI Nickolas
@BERTININickolas
Sep 10 2017 10:39
im actually working on my portfolio, can someone explain me why my h2 at the end dont show in the center of the div https://codepen.io/Ophe/pen/BdgOzo
hell, i got it
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 10:40
@Ophellia you can add display:block
to the row
BERTINI Nickolas
@BERTININickolas
Sep 10 2017 10:41
i just delete the last row
@tiagocorreiaalmeida thanks
CamperBot
@camperbot
Sep 10 2017 10:42
ophellia sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 341 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
rscales02
@rscales02
Sep 10 2017 10:53
I am trying to create a button to toggle my Celsius to Farenheit and back, upon load everything works temperature is defined. But upon button click I receive "Uncaught TypeError: Cannot read property 'temp' of undefined" which clearly is upon initial load. https://github.com/rscales02/Local-Weather/tree/convert-button
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 11:14
did you decleare the tmep?
doesnt seems to be declared :D
hope it solves it
rscales02
@rscales02
Sep 10 2017 11:18
the error that it is linking me to in the console is under my displayWeather() function which I call back to in my button click. Upon initial load temp it displays the current temperature (which leads me to think it is defined/declared)
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 11:22
I can't see any var temp
if you can point me the line
and beside that
can be the variable scope
if it is inside a function and isnt declared as a global wont be defined outside the function
declare
temp
right on the top of your js file line 2 and see how it goes
rscales02
@rscales02
Sep 10 2017 11:26
Same problem, it calls an error on line 43 which is calling to the .main.temp of the response json file from the api
Before the button click it loads the .temp data without issue, and after button click it seems to think that it is undefined
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 11:29
@rscales02 I know its on git but would be 2 much asking you to place all this in a pen?
rscales02
@rscales02
Sep 10 2017 11:29
give me a few minutes and I will work on that
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 11:31
thanks
and that wait if I can't help you just need to past the url in other chat room and anyone will help alot quickly
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 11:39
@rscales02 looking strange
cause I console.log the variable inside the if statement
and it has atually
the right value
@rscales02 FOUND IT
jesus man was looking hard
change this line
$('#temperature').html(temp);
if ($('#temperature').hasClass('celcius')) {
         temp = f_temp;
    console.log("f_temp",f_temp);
    console.log("first if", temp);
     } else {
         temp = temperature;
     console.log("first else", temp);
     }
based on your if
you wanna use temp
and not temperature like you had it
rscales02
@rscales02
Sep 10 2017 11:42
change: $('#temperature').html(temp); to $('#temperature').html(temperature);?
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 11:43
no the oposite
you had $('#temperature').html(temperature);?
you need ot change to
change: $('#temperature').html(temp);
cause that's the variable you update on your if/else
the one that has the value you wanna place in the html
rscales02
@rscales02
Sep 10 2017 11:48
I change that and it breaks the page on load :worried: as "temp" is not defined
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 11:49
oh and
right on the start
second line of your js code
var temp = "";
forgot that art
part
rscales02
@rscales02
Sep 10 2017 11:51
"cannot read property temp of undefined" also it has stopped loading the temperature when the page loads
although on button click it does load the original value
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 11:53
you still have the pen online?
@rscales02 did you updated the codepen code?looks different now
rscales02
@rscales02
Sep 10 2017 11:56
pen has been updated as you suggested, all else is the same
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 11:58
can you place back
the code you had?
and I correct it
to what I had
and give oyu the code?
Morchid Chellali
@Morched23MJ
Sep 10 2017 12:00
I have enabled GithubPages for my files, what to do now, to get a sub-domain? and actually see my website?
rscales02
@rscales02
Sep 10 2017 12:02
Pen reverted
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:04
@rscales02
```

$(document).ready(function() {
  var other = "";
    //html5 geolocator
    function pos (pos) {
        var lat = pos.coords.latitude;
        var long = pos.coords.longitude;
        var coords = lat + ", " + long;
        console.log(coords); //debug catcher
        displayWeather(lat, long);

    }

     function getLocation() {
         navigator.geolocation.getCurrentPosition(pos);
         return false;
     }

     var now = new Date();
     now = now.toDateString();
     $('#time').html(now);

     $('#convert').on('click', function(event) {
         /* Act on the event */
         displayWeather();
         if ($('#temperature').hasClass('celcius')) {
             other = f_temp;
         } else {
             other = temperature;
         }
         $('#temperature').html(other);
         $('#temperature').toggleClass('celcius farenheit');
     });

    //weather catcher to return json file
    function displayWeather(lat, long) {
        $.ajax({
            type: 'GET',
            url: 'https://fcc-weather-api.glitch.me/api/current?lat='+ lat + '&lon=' + long,
            dataType: 'json',
            data: {},
            success: function(response) {
                whereYouIs = response.name;
                $('#whereYouIs').text(whereYouIs); //insert location
                temperature = response.main.temp;
                f_temp = temperature * 9/5 +32;
                $('#temperature').html(response.main.temp); //insert temp
                conditions = response.weather[0].description;
                $('#conditions').text(conditions); //insert conditions
                icon = response.weather[0].icon;
                $('#condition_icon').html('<img src=\"' + icon + '\"/>'); //insert conditions icon
            }
        });
    }
    getLocation();
});
change this line $('#temperature').html(response.main.temp); //insert temp
and
declared
a variable called other
since we have a object called temp
so var other = ""; in the start
and updated the if
      if ($('#temperature').hasClass('celcius')) {
             other = f_temp;
         } else {
             other = temperature;
         }
         $('#temperature').html(other);
         $('#temperature').toggleClass('celcius farenheit');
     });
hope it works gl
Morchid Chellali
@Morched23MJ
Sep 10 2017 12:05
Tiago, can you help me?
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:06
@Morched23MJ I can try to
but leaving really soon 2 eat
if it fast
Morchid Chellali
@Morched23MJ
Sep 10 2017 12:07
I have enabled GithubPages for my files, what to do now, to get a sub-domain? and actually see my website?
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:07
@Morched23MJ what you are asking for its thsi I think
Morchid Chellali
@Morched23MJ
Sep 10 2017 12:07
Not custom
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:07
so?
Morchid Chellali
@Morched23MJ
Sep 10 2017 12:07
I just want to see my website
What's the url, after I enable Github Pages>
?
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:07
you wanna see the reposite?
Morchid Chellali
@Morched23MJ
Sep 10 2017 12:08
Not the files, the output, lol
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:08
as far I know github doesnt do that
goign to eat now when I comeback if you still need help
I will hlep
Morchid Chellali
@Morched23MJ
Sep 10 2017 12:08
Alright
rscales02
@rscales02
Sep 10 2017 12:10
thanks @tiagocorreiaalmeida works in code pen but still broken locally one step closer though...
CamperBot
@camperbot
Sep 10 2017 12:10
rscales02 sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 342 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
rscales02
@rscales02
Sep 10 2017 12:15
@Morched23MJ under your settings in your repository you should be able to launch in the "github pages" section
Sandip Shrestha
@saninmersion
Sep 10 2017 12:17
@Morched23MJ on the settings page where you enabled github pages for your repo, there should now be a link for your github page for that repo
Morchid Chellali
@Morched23MJ
Sep 10 2017 12:18
@saninmersion, I do, thank you, both of you, @rscales02
CamperBot
@camperbot
Sep 10 2017 12:18
morched23mj sends brownie points to @saninmersion and @rscales02 :sparkles: :thumbsup: :sparkles:
:cookie: 538 | @saninmersion |http://www.freecodecamp.com/saninmersion
:cookie: 263 | @rscales02 |http://www.freecodecamp.com/rscales02
Sandip Shrestha
@saninmersion
Sep 10 2017 12:19
:thumbsup:
rscales02
@rscales02
Sep 10 2017 12:19
:+1:
Jackson Pearce
@jacksonpearce
Sep 10 2017 12:23
Heya, i’m making my personal portfolio at the moment and i’m trying to get my navbar to cover or be ‘in front’ of everything. it works for text but not images or hyper links. What should i be doing differently?

<html>

<head>
<style>

.smaller-image {
width: 300px;
}

.square-image {
width: 225px;
}

.facebook-image {
width: auto;
height: 225px;
}
body {margin:0;}

.navbar {
overflow: hidden;
background-color: #333;
position: fixed;
top: 0;
width: 100%;
}
.navbar a {
float: right;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 20px;
text-decoration: none;
font-size: 17px;

}

.main {
padding: 16px;
margin-top: 100px;
height: 1500px;
}
</style>
</head>

Screen Shot 2017-09-10 at 10.22.02 pm.png
image added to help
just1witness
@just1witness
Sep 10 2017 12:24
z-index
@jacksonpearce
It set's layer priority
Jackson Pearce
@jacksonpearce
Sep 10 2017 12:26
BOOM. done! thank you sir!
just1witness
@just1witness
Sep 10 2017 12:26
Your welcome
Jackson Pearce
@jacksonpearce
Sep 10 2017 12:26
@just1witness You’re the bomb
just1witness
@just1witness
Sep 10 2017 12:26
lol :)
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:37
@rscales02 how's that going?
rscales02
@rscales02
Sep 10 2017 12:38
Still broken, how was lunch?
the codepen works but my local site still has the same error. I don't really understand why.
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:39
great thanks, do you have the repo updated?
rscales02
@rscales02
Sep 10 2017 12:40
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:41
it still gives temp undefined?
rscales02
@rscales02
Sep 10 2017 12:42
but your changes break in the same place as my blind guessing on my local
yeah
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:42
we only use tmep 1 time
replace this $('#temperature').html(response.main.temp); //insert temp
with html(temperature )
by the way
you dotn declare variables?
temperatura
f_temp
conditions
whereYouIs
icon
thoses should de declared
if you dont need to reuse them declare them inside the function if you do use them outside the function declare them on the start makign them global
rscales02
@rscales02
Sep 10 2017 12:44
didn't seem necessary as they are all working...
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:44
you need to declare all variables
really all
rscales02
@rscales02
Sep 10 2017 12:47
ok, that still doesn't explain why it is breaking i dont think.
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:48
declare them first and lets go further after, and no I dont think so neither
rscales02
@rscales02
Sep 10 2017 12:51
var declared for all and pushed to that branch
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:52
@rscales02 how work that way
you use the temperature variable
outside the function
so you need to declare them globaly
in this case in the start of the js file
like the other var
same for f_temp
and inside the function only asign the values like you had before
the others are ok
rscales02
@rscales02
Sep 10 2017 12:58
since I am calling back to the function that I am declaring them in shouldn't that work?
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 12:59
didnt saw that part
you still have theu ndefined?
rscales02
@rscales02
Sep 10 2017 13:00
yes, but it is saying that the undefined is from the json file that is returned (i think)
Tiago Correia
@tiagocorreiaalmeida
Sep 10 2017 13:01
another question why you use a json file in this case?
sorry im a bit confused and no im not really advanced onjs
know some things
rscales02
@rscales02
Sep 10 2017 13:02
That is what the API returns with the ajax request
heroiczero
@heroiczero
Sep 10 2017 13:03
you do know ajax is async meaning it executes at the end
so I would just get the Celsius and just do a conversion with the value given if you click the button.
rscales02
@rscales02
Sep 10 2017 13:07
@heroiczero is there another method for calling an api?
rscales02
@rscales02
Sep 10 2017 13:07
Is there a reason it would work on codepen, but not my local files?
@heroiczero the ajax request loads properly on the page, but it fails upon button click on my local files. Yet the same code in codepen works just fine.
heroiczero
@heroiczero
Sep 10 2017 13:12
  $('#convert').on('click', function(event) {
         /* Act on the event */
         let f_temp=0;
         let temperature=0;
         displayWeather();
         if ($('#temperature').hasClass('celcius')) {
             other = f_temp;
         } else {
             other = temperature;
         }
         $('#temperature').html(other);
         $('#temperature').toggleClass('celcius farenheit');
});
you could also try defining a global variable if you do it without async.
@rscales02 could i see your codepen
heroiczero
@heroiczero
Sep 10 2017 13:14
@rscales02 var f_temp = temperature * 9/5 +32; these are global variables by doing f_temp instead of using var. var makes it local
@rscales02 so you can't access it out of the scope of your ajax function
rscales02
@rscales02
Sep 10 2017 13:15
so not specifically declaring the variable declares it globally?
heroiczero
@heroiczero
Sep 10 2017 13:17
@rscales02 yes it makes it automatically global if you do not define it.
rscales02
@rscales02
Sep 10 2017 13:18
I am so confused can you let me know why the exact same code works in codepen but not locally? https://github.com/rscales02/Local-Weather/tree/pen-work-git-dont
sorry I have made several changes, now it is the same code that works in codepen on the git branch
rscales02
@rscales02
Sep 10 2017 13:27
did you click the button?
heroiczero
@heroiczero
Sep 10 2017 13:27
yes it works
but i am getting an error everytime i hit the button TypeError: response.main is undefined[Learn More] in firefox :https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Unexpected_type?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default this is the link
rscales02
@rscales02
Sep 10 2017 13:29
I am so confused! WTF! I swear that was not working 2 seconds ago!
heroiczero
@heroiczero
Sep 10 2017 13:30
it works but it just has an TypeError in the console
try hitting F12 to see errors in console
rscales02
@rscales02
Sep 10 2017 13:30
I am definitely already seeing those errors lol
LydaTech
@lydatech
Sep 10 2017 13:32
Anyone else using npm to install bootstrap?
rscales02
@rscales02
Sep 10 2017 13:35
so the fix would be to add if (typeof temp !== 'undefined'){}?
Morchid Chellali
@Morched23MJ
Sep 10 2017 13:37
In order to change the default title/icon of a github page, I have to create a file.yml? or even named the same as _config.yml? Since I didn't use a github theme for my page, I don't find the _config.yml file.
heroiczero
@heroiczero
Sep 10 2017 13:42
@rscales02 try deleting displayWeather(); inside
 $('#convert').on('click', function(event) {
         /* Act on the event */
         displayWeather(); //delete this
         if ($('#temperature').hasClass('celcius')) {
             other = f_temp;
         } else {
             other = temperature;
         }
         $('#temperature').html(other);
         $('#temperature').toggleClass('celcius farenheit');
});
rscales02
@rscales02
Sep 10 2017 13:43
@heroiczero thanks!
CamperBot
@camperbot
Sep 10 2017 13:43
rscales02 sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1710 | @heroiczero |http://www.freecodecamp.com/heroiczero
rscales02
@rscales02
Sep 10 2017 13:43
@tiagocorreiaalmeida thanks for your help too!
CamperBot
@camperbot
Sep 10 2017 13:43
rscales02 sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 343 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 13:46
can anyone tell me why my pic and text are not coming in same line???
heroiczero
@heroiczero
Sep 10 2017 13:47
@imyashbhardwaj its col-md-4
<div class="col-md-4 pic">
    <img src="https://scontent.fmaa4-1.fna.fbcdn.net/v/t1.0-9/21369552_1472467282822715_6602447095904463803_n.jpg?oh=e92bb1ae082c0426802fdccf86c411b0&oe=5A537FFC"></div>
    <div class=col-md-8 id=about><br>
      Hi!!!<br>
      I am a 18 year Old 2nd year Undergraduate Student of VIT University Completing my Computer Science and Engineering Degree.
    </div>
fix your classes
Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 13:50
ok thanks @heroiczero
CamperBot
@camperbot
Sep 10 2017 13:50
imyashbhardwaj sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1711 | @heroiczero |http://www.freecodecamp.com/heroiczero
Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 13:50
a silly mistake
Razvan
@razvanlikespizza
Sep 10 2017 13:54
/[\W_]/gremoves spaces too?
heroiczero
@heroiczero
Sep 10 2017 13:59
@razvanlikespizza no only letters and digits including capital letters are not removed everything else is removed
Razvan
@razvanlikespizza
Sep 10 2017 14:00
For me...it removes spaces too.
heroiczero
@heroiczero
Sep 10 2017 14:04
you might need \S
Razvan
@razvanlikespizza
Sep 10 2017 14:07
wut iz that?
Santosh Vijapure
@santoshvijapure
Sep 10 2017 14:07
anyone know batch programming here
Morchid Chellali
@Morched23MJ
Sep 10 2017 14:07
space pattern
Razvan
@razvanlikespizza
Sep 10 2017 14:08
@Morched23MJ You again..
:)
Morchid Chellali
@Morched23MJ
Sep 10 2017 14:08
:D
Razvan
@razvanlikespizza
Sep 10 2017 14:09
:wave: how're u ?
Morchid Chellali
@Morched23MJ
Sep 10 2017 14:09
I'm fine, thank you. :)
Razvan
@razvanlikespizza
Sep 10 2017 14:11
So, what that S do?
Morchid Chellali
@Morched23MJ
Sep 10 2017 14:11
it's the space pattern
for spaces, just as \w is for a-z0-9
Razvan
@razvanlikespizza
Sep 10 2017 14:12
I dont want my spaces to be removed..but \w removes them.
Do u have any idea what sohuld I do?
image.png
Really bitch?
...
HAAAAAAA
image.png
BITCH
Thayyeb salim
@Thayyebsalim
Sep 10 2017 14:19
guys I'm stuck at this challenge
smallest common multiple
function smallestCommons(arr) {
  var checkNum=0;
  for(var i=1,min=Math.min(arr[1],arr[0]),max=Math.max(arr[1],arr[0]);;i++){
     checkNum=i*min;
    if(lcm(checkNum,min,max))
      return checkNum;
  } 
  function lcm(num,min,max){
    while (min<=max){
      if (num%min==0){
        min++;
    }
      else 
        return false;
    }
    return true;
  }
}


smallestCommons([1,14]);
it works for 1,12 range
not above it
Sandip Shrestha
@saninmersion
Sep 10 2017 15:49
can someone suggest me any way to hide the lastchild from my panel in this flex layout. https://codepen.io/saninmersion/full/gxVjed/
Moisés Man
@moigithub
Sep 10 2017 15:52
elem:last-child { display:none; }
Darren
@DarrenfJ
Sep 10 2017 15:52
morning fCC
Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 15:56
can anyone tell me why on scrolling my content is overlapping on navigation bar
Moisés Man
@moigithub
Sep 10 2017 15:58
add a z-index to ur navbar
Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 15:58
@moigithub ??? didnt get u
Moisés Man
@moigithub
Sep 10 2017 16:00
u can google for more info.. whats z-index is ;) n how to use it
Sandip Shrestha
@saninmersion
Sep 10 2017 16:00
@DarrenfJ morning :D though its about 10 pm in here.
@moigithub if I did display:none I would have had to redisplay it again later. overflow: hidden did it for me.
Andrey Azimov
@AndreyAzimov
Sep 10 2017 16:04
yo
anyone regex expert ? :)
let reRegex = /((\d+)\s)\2/; // but this is not work :(
Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 16:06
@moigithub got it bro thanks
CamperBot
@camperbot
Sep 10 2017 16:06
imyashbhardwaj sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3628 | @moigithub |http://www.freecodecamp.com/moigithub
Tejas B N
@tejasbanga
Sep 10 2017 16:40
Could someone help me with the random quote machine project , I started it but I have no idea about how to use js with HTML
Like I get scared when I look at it
just1witness
@just1witness
Sep 10 2017 17:57
you reference your htlm element in JS using this $('#elementId).html();
@tejasbanga
Saber I.
@icybears
Sep 10 2017 18:09
@just1witness that's not JS that's jquery :worried:
just1witness
@just1witness
Sep 10 2017 18:10
What's wrong with using jquery for the random quote project?
var myVar = document.getElementById("elementId").innerHTML;
There, vanilla javscript way, but jquery is easier imo
With this method you have to use regex to get rid of the tags
@icybears
Saber I.
@icybears
Sep 10 2017 18:16
I agree with you @just1witness
but you refered to a jQuery syntax as javascript
hence my remark
just1witness
@just1witness
Sep 10 2017 18:16
my bad :)
Saber I.
@icybears
Sep 10 2017 18:17
:+1:
Joseph
@revisualize
Sep 10 2017 18:32
@0verk1ll ummm... You know this is a help for freeCodeCamp challenges. I don't think freeCodeCamp covers ACLs
Eric Miller
@ericmiller777
Sep 10 2017 19:12
Hey guys
just1witness
@just1witness
Sep 10 2017 19:14
hi
Darren
@DarrenfJ
Sep 10 2017 19:34
hello fCC
:wave: @ericmiller777 @just1witness @revisualize seems quiet today
just1witness
@just1witness
Sep 10 2017 19:35
hi
yep
watcha working on today
?
Darren
@DarrenfJ
Sep 10 2017 19:37
I wanna check out the new vid on tic tac toe.. fCC vid
what about you?
Eric Miller
@ericmiller777
Sep 10 2017 19:37
$("#7").on("click", function () {
$("textBox").html("it worked");
});
that should work
right?
Naveen B
@naveen62
Sep 10 2017 19:37
How to do DOM manipulation in nodejs
Darren
@DarrenfJ
Sep 10 2017 19:37
it's by beaucarnes.. have liked his stuff so far...
@ericmiller777 what's that for?
just1witness
@just1witness
Sep 10 2017 19:38
@DarrenfJ Working on my Pomodoro clock sorta. Did you finish your twitch app?
Darren
@DarrenfJ
Sep 10 2017 19:38
@just1witness i.have.not.. not yet anyway...
Eric Miller
@ericmiller777
Sep 10 2017 19:38
@DarrenfJ adding text to a text box
Darren
@DarrenfJ
Sep 10 2017 19:38
taking a break from it
just1witness
@just1witness
Sep 10 2017 19:39
To replace the html element? @ericmiller777
Darren
@DarrenfJ
Sep 10 2017 19:39
@ericmiller777 oh i meant on which project...
Eric Miller
@ericmiller777
Sep 10 2017 19:39
i see this is probably why its not working, i tryed val too
caculator :P
Darren
@DarrenfJ
Sep 10 2017 19:39
@naveen62 what are you trying to do?
you'de do DOM manipulation in js (however you normally would od it, JQuery, um, something else like react or something) via a node module you called up for some reason... something like that, but @naveen62 that's a super broad question
Naveen B
@naveen62
Sep 10 2017 19:41
I am working on a full stack project when I render ejs a file javascript Dom does not working
just1witness
@just1witness
Sep 10 2017 19:41
@ericmiller777 Try .text instead of .html
@ericmiller777 Wait are you accessing it using an id?
If so you're missing the #
Eric Miller
@ericmiller777
Sep 10 2017 19:42
yes
Amit Patel
@AmitP88
Sep 10 2017 19:42
hey guys, just wanted a quick opinion on something. When making a game, is it better to use an existing engine off a tutorial site and build off of it? or is it better to build your own engine and then modify it with your additional features?
just1witness
@just1witness
Sep 10 2017 19:42
Add a # before the name
Eric Miller
@ericmiller777
Sep 10 2017 19:42
@just1witness there we go
@just1witness thanks
CamperBot
@camperbot
Sep 10 2017 19:42
:cookie: 334 | @just1witness |http://www.freecodecamp.com/just1witness
ericmiller777 sends brownie points to @just1witness :sparkles: :thumbsup: :sparkles:
just1witness
@just1witness
Sep 10 2017 19:42
No problem
Darren
@DarrenfJ
Sep 10 2017 19:44
@AmitP88 haven't built enough games, sorry brutha... but typically when people ask about using en existing something to build off of the usual answer is 'it's good to start with if you have limited knowledge but over time you will need to know the fundamentals of pure/vanilla code to really do what you want with it"
if that helps...
just1witness
@just1witness
Sep 10 2017 19:45
I use a purchased engine personally. @AmitP88
Amit Patel
@AmitP88
Sep 10 2017 19:45
@DarrenfJ ah I see. Yeah, I was thinking that too, which is why I'm studying how every bit of the engine works before I start building additional features off of it.
@just1witness this is the engine I'm using actually: http://rembound.com/articles/how-to-make-a-match3-game-with-html5-canvas
just1witness
@just1witness
Sep 10 2017 19:46
I actually started learning JS so I could write plugins for it.
Amit Patel
@AmitP88
Sep 10 2017 19:46
@just1witness I see
Darren
@DarrenfJ
Sep 10 2017 19:46
although with game engines I've always thought the physics/logic of the engine would be of a massive benefit
I htink P1xt made a list of material to get good at game design.. lemme look for links
Amit Patel
@AmitP88
Sep 10 2017 19:47
I figure it would be a good idea since in dev jobs i'd have to get used to working with other people's code anyways
just1witness
@just1witness
Sep 10 2017 19:47
@AmitP88 That's cool. The one I use is monumentally more complicated. I couldn't imagine making it from scratch, but modifying individual aspects... that can be done. :)
Darren
@DarrenfJ
Sep 10 2017 19:47
@AmitP88 here's her guides; https://github.com/P1xt/p1xt-guides
Amit Patel
@AmitP88
Sep 10 2017 19:48
@just1witness I tried making mine from scratch, but I hit a wall and it was costing too much time (I'm planning on getting a demo of my game concept done by oct 1st)
Darren
@DarrenfJ
Sep 10 2017 19:48
@AmitP88 and this is the video game stream: https://github.com/P1xt/p1xt-guides/blob/master/game-programming.md
she was a part of the fCC forum for a while but now mostly exists in the Chingu cohorts..
just1witness
@just1witness
Sep 10 2017 19:48
Yikes. Here's the first thing I learned in game development. Don't reinvent the wheel.
@AmitP88
Amit Patel
@AmitP88
Sep 10 2017 19:49
@DarrenfJ thanks for the awesome resources Darren! :) I've bookmarked them atm, I'll take a look later
CamperBot
@camperbot
Sep 10 2017 19:49
amitp88 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2015 | @darrenfj |http://www.freecodecamp.com/darrenfj
Amit Patel
@AmitP88
Sep 10 2017 19:49
@just1witness yeah, that's something else I didn't want to do lol
just1witness
@just1witness
Sep 10 2017 19:49
It really doesn't pay off, in the end. :)
Amit Patel
@AmitP88
Sep 10 2017 19:49
@just1witness especially since my game will be a merge between two different game types
just1witness
@just1witness
Sep 10 2017 19:50
Oh? What types?
Amit Patel
@AmitP88
Sep 10 2017 19:50
classic rpg dungeon crawlers and 3 match puzzle games like candy crush
the only game I found the most similar to what I have in mind is a game called Cavemania, but even that game is pretty basic compared to what I want to implement in my version
Eric Miller
@ericmiller777
Sep 10 2017 19:51
cool
just1witness
@just1witness
Sep 10 2017 19:51
I love it! Have you looked at rpg Maker? They are developing a 3d dungeon crawl feature right now, but it's open source and highly modifiable.
@AmitP88
Eric Miller
@ericmiller777
Sep 10 2017 19:51
if your good with javascript you can easily switch to unity C#
just1witness
@just1witness
Sep 10 2017 19:52
That too
Amit Patel
@AmitP88
Sep 10 2017 19:52
@just1witness I've heard of it, but I haven't looked into it. haven't they been around for a while? I know there was one to make games for like snes
@ericmiller777 well, the thing is, I understand a lot of the JS concepts, but when it comes to writing JS, I tend to get writers' block a lot
Darren
@DarrenfJ
Sep 10 2017 19:52
@AmitP88 if you get started on the Cavemania, come back with links so we can see how it's progressing.. I'de be excited to see how its developing..
Eric Miller
@ericmiller777
Sep 10 2017 19:52
i do too
Amit Patel
@AmitP88
Sep 10 2017 19:52
@ericmiller777 but yeah, I was looking into unity engine as well
Darren
@DarrenfJ
Sep 10 2017 19:52
@just1witness sounds like you come from the gaming side of things?
Eric Miller
@ericmiller777
Sep 10 2017 19:53
unity tho, you can make it do whatever you want, not much linitation
Garrus Napp
@GarrusNapp
Sep 10 2017 19:53
I'm writing an html5 canvas game and I want to separate JS into two files, so I have global variables in different place than functions for the code to be more readable. How could I go about it? Is requireJS a right tool for such thing?
Amit Patel
@AmitP88
Sep 10 2017 19:53
@DarrenfJ for sure Darren, hopefully I have a working demo of the first level by the end of the month
@ericmiller777 yeah, that's what I've heard too. as well as a lot of commercial games use it
just1witness
@just1witness
Sep 10 2017 19:54
@AmitP88 It's for pc, mac and android. There's a very active community that contributes free plugin scripts, art, music and pretty much anything else you would need. Plugins are all in javascript for the latest engine MV
@DarrenfJ Yes. I don't really play them anymore though, I like making them more.
Amit Patel
@AmitP88
Sep 10 2017 19:55
@just1witness hmmmm, in that case, I'll have to check it out again. Getting the graphics, animations, music, and sounds were the other things I was concerned with once I get the modded engine running
just1witness
@just1witness
Sep 10 2017 19:55
If your deadline is that tight, unity will be tough, it has quite the learning curve
@AmitP88
Amit Patel
@AmitP88
Sep 10 2017 19:56
@just1witness yeah, I think unity will have to be used at a much later time lol
just1witness
@just1witness
Sep 10 2017 19:56
RPG Maker is easy to hit the ground running with, I would highly suggest you do. @AmitP88
Amit Patel
@AmitP88
Sep 10 2017 19:56
@just1witness main reason why I want to get done by oct 1st is because a friend of mine thinks he can get me a job with his company, so he was telling me to work on my JS and React skills and in a month or two, he'll give me a chance at it
@just1witness I'll definitely look into it. thanks :)
CamperBot
@camperbot
Sep 10 2017 19:57
amitp88 sends brownie points to @just1witness :sparkles: :thumbsup: :sparkles:
:cookie: 335 | @just1witness |http://www.freecodecamp.com/just1witness
just1witness
@just1witness
Sep 10 2017 19:57
No problem :)
The forum on the site that sells it is where you get all the resources btw. I'm on it with the same handle as here.
@AmitP88
Darren
@DarrenfJ
Sep 10 2017 19:58

@just1witness cool!

Yes. I don't really play them anymore though, I like making them more.

Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 19:58
can anyone tell me why when i apply position:fixed the text disappears
in css line 59
just1witness
@just1witness
Sep 10 2017 19:58
@DarrenfJ How about you?
Darren
@DarrenfJ
Sep 10 2017 19:59
just a player for now
any links to anything gamewise you've built?
Amit Patel
@AmitP88
Sep 10 2017 19:59
@just1witness ahhh I see. I'll google it right now :)
Darren
@DarrenfJ
Sep 10 2017 20:00
if you don't count the word based RPG dungeon games of the 80's using basic snicker when i was a kid.. now those I could program
Garrus Napp
@GarrusNapp
Sep 10 2017 20:00
@imyashbhardwaj because in position fixed stuff is positioned in referance to the browser window, hence your images go over your text
piteto
@piteto
Sep 10 2017 20:02

@imyashbhardwaj Try this and you'll see where your text has gone:

#mp{
  font-size:40px;
  position:fixed;
  z-index: 1;
}

Why are you attempting to apply position:fixed? Maybe there's a better way to do it that we can help with.

Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 20:02
@GarrusNapp but i used bootstrap grid to prevent image overlapping
Darren
@DarrenfJ
Sep 10 2017 20:02
brb :coffee: , then :dog: 's need attention
just1witness
@just1witness
Sep 10 2017 20:02
@imyashbhardwaj Put it in #my instead of #mp
Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 20:04
@just1witness still the text disappers
just1witness
@just1witness
Sep 10 2017 20:07
There!
Garrus Napp
@GarrusNapp
Sep 10 2017 20:07
@imyashbhardwaj what are you trying to do? You want the text to become fixed there as you start scrolling into the projects section, and disappear after you finish scrolling there?
just1witness
@just1witness
Sep 10 2017 20:07
@DarrenfJ It's a long running project, this is just a clip showing an unusual way to do sprite animations ^
@imyashbhardwaj Sorry, I must have been looking at the wrong text, I thought it hadn't
Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 20:09
@just1witness i want the text to be there as i scroll through all the images
Eric Miller
@ericmiller777
Sep 10 2017 20:09
$("#7").on("click", function () {
    $("#textBox").text("it works");
    console.log("you suck");
});
cant figure out why this isnt working
<div>
<input id="textBox" type="text" maxlength="10">
</div>
piteto
@piteto
Sep 10 2017 20:10
@ericmiller777 $("#textBox").val("it works")
.val() is for input elements
just1witness
@just1witness
Sep 10 2017 20:10
@DarrenfJ Here's another one showing some fancy eventing tricks, someone wanted an icegun that could freeze any body of water
Why are my link thingies being stupid....
Eric Miller
@ericmiller777
Sep 10 2017 20:11
@piteto thanks, i did try that but at forst i forgot my #
CamperBot
@camperbot
Sep 10 2017 20:11
ericmiller777 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 83 | @piteto |http://www.freecodecamp.com/piteto
Garrus Napp
@GarrusNapp
Sep 10 2017 20:12
@imyashbhardwaj
piteto
@piteto
Sep 10 2017 20:12
jQuery can make development faster, but it can also confuse things even more :) I don't know why they use .val() instead of .value like in vanilla js
Garrus Napp
@GarrusNapp
Sep 10 2017 20:13
@imyashbhardwaj now I've seen that the text is there, but your values for margin moves it outside the browser window
Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 20:15
@GarrusNapp yaa got it thanks bro
CamperBot
@camperbot
Sep 10 2017 20:15
:cookie: 844 | @garrusnapp |http://www.freecodecamp.com/garrusnapp
imyashbhardwaj sends brownie points to @garrusnapp :sparkles: :thumbsup: :sparkles:
piteto
@piteto
Sep 10 2017 20:16
@imyashbhardwaj don't forget to put quotes around all of your attribute values. class="class1 class2 etc". And use margins instead of <br> elements. If you want two lines of text, use <p> elements. The <br> tag is not meant for creating vertical space
Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 20:17
@piteto yup will take care of that
piteto
@piteto
Sep 10 2017 20:17
Bootstrap has very helpful classes for margins, like mt for margin-top, followed by a number: mt-1, mt-4, etc: https://getbootstrap.com/docs/4.0/utilities/spacing/ @imyashbhardwaj
Yash Bhardwaj
@imyashbhardwaj
Sep 10 2017 20:18
@piteto will certainly not repeat next time
Joseph
@revisualize
Sep 10 2017 20:56
@DarrenfJ The freeCodeCamp Gitter Chat has been quiet since they removed the link from the website.
just1witness
@just1witness
Sep 10 2017 21:08
@revisualize It's too bad they did that. I came in just under the wire, they removed the button like a cpl weeks after I joined, or I wouldn't even know these chat rooms existed...
Joseph
@revisualize
Sep 10 2017 21:12
@just1witness Yeah, it is pretty messed up.
just1witness
@just1witness
Sep 10 2017 21:17
:/
LydaTech
@lydatech
Sep 10 2017 21:25
anyone using bootstrap 4-beta?
just1witness
@just1witness
Sep 10 2017 21:26
no suh
Giovanni Panasiti
@giovapanasiti
Sep 10 2017 21:38
@admins is it mandatory to use Glitch for backend projects?
@lydatech me, on production projects
LydaTech
@lydatech
Sep 10 2017 21:40
@giovapanasiti In the beta they Killed off the offset classes and the recommendation is to use the margin utilities. If I wanted a single left column offset what would I use? The row isnt filling all 12 columns so auto will push it to far, no?
@giovapanasiti no it isnt mandatory
Giovanni Panasiti
@giovapanasiti
Sep 10 2017 21:43
@lydatech they should still support offset like "offset-md-3"
dont they?
LydaTech
@lydatech
Sep 10 2017 21:43
@giovapanasiti no
Giovanni Panasiti
@giovapanasiti
Sep 10 2017 21:43
@giovapanasiti no it isnt mandatory
Oh yes this is a very good news
LydaTech
@lydatech
Sep 10 2017 21:44
@giovapanasiti they do need to be able to see all your code though
Giovanni Panasiti
@giovapanasiti
Sep 10 2017 21:44
Well I still would use github public projects
LydaTech
@lydatech
Sep 10 2017 21:45
offsets and push/pull are gone
Giovanni Panasiti
@giovapanasiti
Sep 10 2017 21:49
@lydatech maybe try this:
LydaTech
@lydatech
Sep 10 2017 21:50
@giovapanasiti no that isnt what I was asking. thanks though
CamperBot
@camperbot
Sep 10 2017 21:50
lydatech sends brownie points to @giovapanasiti :sparkles: :thumbsup: :sparkles:
:cookie: 93 | @giovapanasiti |http://www.freecodecamp.com/giovapanasiti
Giovanni Panasiti
@giovapanasiti
Sep 10 2017 21:51
ok maybe try to draw what you would like to accomplish and I'm sure we'll find a way through
@lydatech twbs/bootstrap#19966
LydaTech
@lydatech
Sep 10 2017 21:54
I need to push the content over by exactly 1 column. Old bootstrap classes used offset to do this. Bootstrap 4-beta does away with the offset classes. ml-auto works but its not exact and depends on other column widths so if i have a col-auto in the 3rd column with a fixed column in column 2 what is the offset replacement
@giovapanasiti neither of those work anymore. He just didnt read the docs
Eric Miller
@ericmiller777
Sep 10 2017 21:55
Hey guys
How can i do
$("#equal").on("click", function () {
    value = " = ";
    Calc.Input.value = eval(Cal.Input.Value);
    return false;
});
it still just submits
everything else works
well
LydaTech
@lydatech
Sep 10 2017 21:57
ml-auto works just have to be careful of column numbers
Eric Miller
@ericmiller777
Sep 10 2017 21:57
typos was the issue
Eric Miller
@ericmiller777
Sep 10 2017 22:05
so this works fine in a form
$("#addition").on("click", function () {
    value = "  +  ";
    Calc.Input.value += " + ";
    return false;
});
but trying to do it like that
as form type="button" breaks a lot of stuff....
Eric Miller
@ericmiller777
Sep 10 2017 22:22
I think i got it btw
anyone wanna try it?
i know theres some issues :)
Gersho
@Gersho
Sep 10 2017 22:55
0.05-0.04
Eric Miller
@ericmiller777
Sep 10 2017 22:56
@Gersho ?
Gersho
@Gersho
Sep 10 2017 22:56
try it
Eric Miller
@ericmiller777
Sep 10 2017 22:56
yea
@Gersho whats a good way to make the text get smaller so that it will always fix in the box?
thats mostly for mobile, because im probably going to add a char limit and ill try and remove the 0s
Gersho
@Gersho
Sep 10 2017 23:00
char limit is the good idea, no matter how small, it will always go out of window if you have enougth numbers
and you could add something like "if display.length > 20" then show it in scientific notation
Eric Miller
@ericmiller777
Sep 10 2017 23:01
i see ty
piteto
@piteto
Sep 10 2017 23:02
I think @Gersho is speaking from experience ;) https://codepen.io/Gersho/pen/RZJPrZ
Eric Miller
@ericmiller777
Sep 10 2017 23:02
@Gersho thank you
CamperBot
@camperbot
Sep 10 2017 23:02
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 408 | @gersho |http://www.freecodecamp.com/gersho
Gersho
@Gersho
Sep 10 2017 23:02
it does it already when you go over ~ 10^26
piteto
@piteto
Sep 10 2017 23:02
lots of ways to approach floating point issues - calculator is next on my list of projects now... need to think about that one
@ericmiller777 Try doing 3 - -3 (3 minus negative 3)
Great work though - lots of improvement since yesterday
Gersho
@Gersho
Sep 10 2017 23:04
oh, i was spamming random buttons and got it to display "infinity"
Eric Miller
@ericmiller777
Sep 10 2017 23:04
@Gersho on mine lol?
Gersho
@Gersho
Sep 10 2017 23:04
(and if you wonder why i press random buttons, i call that "5years old benchmarking"
Eric Miller
@ericmiller777
Sep 10 2017 23:04
@piteto thank you for looking at it
CamperBot
@camperbot
Sep 10 2017 23:04
ericmiller777 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 86 | @piteto |http://www.freecodecamp.com/piteto
Gersho
@Gersho
Sep 10 2017 23:04
yes Eric
when you get an answer in eXX, you can press numbers and they input next to it
Eric Miller
@ericmiller777
Sep 10 2017 23:07
yea
Gustavo Azevedo
@gustavoaz7
Sep 10 2017 23:22
Hey guys
https://jsbin.com/xurakijuvi/edit?css,output
Could you help me understanding why radial-gradient is considering 70% as the full circle ?
just1witness
@just1witness
Sep 10 2017 23:23
@piteto My calc only does positive integers too. I'll fix it someday...
Gersho
@Gersho
Sep 10 2017 23:24
@just1witness what happens if you do 3-5 ?
just1witness
@just1witness
Sep 10 2017 23:24
it subtracts
Gersho
@Gersho
Sep 10 2017 23:25
nothing wrong then ?
just1witness
@just1witness
Sep 10 2017 23:25
I just cant do -2 + 3, or 2 --3 and such
Gersho
@Gersho
Sep 10 2017 23:25
the (-) is not a standard
it's like my double 0, you can put it or not
just1witness
@just1witness
Sep 10 2017 23:25
I know. I turned it in, the whole neg int thing is just a thought for the future
Gersho
@Gersho
Sep 10 2017 23:26
if i add something to mine, it would be some fancy animation to have a fake roll of paper print your result
but since i hate css, it's not likely to happen
just1witness
@just1witness
Sep 10 2017 23:27
That would be cool. Lol. I'm making a krazy pomodor clock and actually have an idea for a potentially hilarious one. The crazy one will be done for sure, the other one... ehhh
css, is a pain
Gersho
@Gersho
Sep 10 2017 23:28
for my early version pomodoro, it had a big text display "GET BACK TO WORK" when the pause was finished
just1witness
@just1witness
Sep 10 2017 23:30
Mine is inspired by my oldest. She used to do videos saying she was an ugly potato, so I have sound clips of her saying that, and beep beep, and a little jingle about there being 5 minutes left. So when I was seeing a lot of tomato timers, I decided to go with a potato instead, and when the timer is up, it will be her singing about being an ugly potato.
I hope I can get the potato to jump around too, when the timer goes of. I already turned it into a timer
Gersho
@Gersho
Sep 10 2017 23:30
oh kinda like those japanese alarm clock where you can record your own message
just1witness
@just1witness
Sep 10 2017 23:31
Yeah, sorta. I'm going to surprise her when I'm done, maybe record her reaction
Would you like to see it so far?
Gersho
@Gersho
Sep 10 2017 23:31
sure
just1witness
@just1witness
Sep 10 2017 23:31
It's far from finished
Gersho
@Gersho
Sep 10 2017 23:32
i was about to use the term "early stages"
just1witness
@just1witness
Sep 10 2017 23:32
yes, very, lol
Tassie-Tom
@Tassie-Tom
Sep 10 2017 23:33
@Tassie-Tom
Hey all, a newbie coder here. What is the purpose of the space at the end of the tag? <a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. "></a>
just before the "
just1witness
@just1witness
Sep 10 2017 23:33
Just getting the potato and second hand lined up and moving right took all day yesterday. I haven't done much today.
Gersho
@Gersho
Sep 10 2017 23:34
@Tassie-Tom that space will be included in the display, helping better visibility
Tassie-Tom
@Tassie-Tom
Sep 10 2017 23:35
@Gersho is it white space though?
Gersho
@Gersho
Sep 10 2017 23:36
i'm not sure i understand what you mean, but it is a relevant space, since there is a difference in result depending if it is there or not
Tassie-Tom
@Tassie-Tom
Sep 10 2017 23:37
ah i see. Thanks for that :)
Gersho
@Gersho
Sep 10 2017 23:38
but it is not a mandatory space, it would work without it too, but the display would be a bit different