These are chat archives for FreeCodeCamp/HelpFrontEnd

24th
Feb 2017
Tom
@moT01
Feb 24 2017 00:01
@Androbat what are you trying to change, the text color or background color
Manuel Reyes
@Androbat
Feb 24 2017 00:01
@moT01 Look at the page. My nav box should appear when someone puts the mouse on it. But All my nav list appears colored.
Paul DiLoreto
@paulmichaelxd
Feb 24 2017 00:01
@nathabonfim59 why are you trying to not use bootstrap? I guess it’s good to learn more CSS, but assuming you already know CSS you would still want to be using bootstrap as it accounts for more cross browser differences than you possibly could unless you were an expert in cross browser design & CSS
Tom
@moT01
Feb 24 2017 00:03
what, when i load the page theres the menu showing in the top right, with 4 labels/buttons
you want something to transition there right?
some color or something
Manuel Reyes
@Androbat
Feb 24 2017 00:06
@moT01 Yeah, you got it. Blog, portafolio and contact should´ve transition.
@moT01 But it doesn´t working. I don´t know why. What did I do wrong?
Tom
@moT01
Feb 24 2017 00:07
i think something is overriding your style, ...the color isnt working at all
Matthew Bailin
@mdbailin
Feb 24 2017 00:08
Hey I'm trying to use jQuery but my browser says that $ isn't a recognized symbol
Tom
@moT01
Feb 24 2017 00:08
i know this by trying color: #505961 !important;
that gives that thing priority
meaning something else is taking priority from it so nothing is applying
i think anyway
that thing at the bottom i think
is setting a color for all those selectors
is that making any sense?
Vincent D'Onofrio
@donofriov
Feb 24 2017 00:12
@moT01 you’re 100% correct
Manuel Reyes
@Androbat
Feb 24 2017 00:12
@moT01 Yeah, I think something is overiding my css transition.
@donofriov Did you tried?
@donofriov Did you try?*
Vincent D'Onofrio
@donofriov
Feb 24 2017 00:13
@Androbat you have .cabecera .Menu ul li a selector is taking priority
So when you hover over your nav, what do you want to happen?
Do you want the text color to change to something else? Right now you have a:hover{#505961} which would make the “Home” text the same color as the background
Tom
@moT01
Feb 24 2017 00:16
it worked for me when i commented all the other stuff out
so the transition works, its all just getting overridden
Manuel Reyes
@Androbat
Feb 24 2017 00:16
@moT01 What did you comment out?
Vincent D'Onofrio
@donofriov
Feb 24 2017 00:17
Commenting out does verify that this has to do with specificity
Tom
@moT01
Feb 24 2017 00:17
everything after a:hover
Vincent D'Onofrio
@donofriov
Feb 24 2017 00:17
but it won’t solve what you are trying to do :)
Tom
@moT01
Feb 24 2017 00:17
it helps find the problem
Vincent D'Onofrio
@donofriov
Feb 24 2017 00:18
exactly but we did identify the problem, actually !important is the fastest way to see if there is a specificity issue like you mentioned
.cabecera .Menu ul li a is the most specific selector and takes the highest precedence
Matthew Bailin
@mdbailin
Feb 24 2017 00:19
Does anyone know how to make something happen when you click a button in jQuery?
Vincent D'Onofrio
@donofriov
Feb 24 2017 00:19
so try adding a hover to that and then your styles and see what happens
Manuel Reyes
@Androbat
Feb 24 2017 00:20
@donofriov What I want is, make a css transition to blog, protafolio and contact. Got it.
@donofriov Ok, let me try.
Vincent D'Onofrio
@donofriov
Feb 24 2017 00:29
@Androbat any luck?
Manuel Reyes
@Androbat
Feb 24 2017 00:44
@donofriov No luck, bro.
Vincent D'Onofrio
@donofriov
Feb 24 2017 00:47
so I was trying to avoid giving you the answer because that makes it kinda crappy for learning but specificity is pretty tough
since .cabecera .Menu ul li a is the highest right now, try .cabecera .Menu ul li a:hover
so something like
Manuel Reyes
@Androbat
Feb 24 2017 01:04
@donofriov @moT01 I finally solved. You guys were right. That was the problem. Thanks so so so much. My transition was working, the problem was where you guys told me at.
CamperBot
@camperbot
Feb 24 2017 01:04
androbat sends brownie points to @donofriov and @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 295 | @donofriov |http://www.freecodecamp.com/donofriov
:cookie: 529 | @mot01 |http://www.freecodecamp.com/mot01
Vincent D'Onofrio
@donofriov
Feb 24 2017 01:04
:thumbsup: nice! no problem :)
Albert L. C.
@sirus3020
Feb 24 2017 01:07
umm. can anybody help xD
Vincent D'Onofrio
@donofriov
Feb 24 2017 01:08
sure! What’s up?
Tom
@moT01
Feb 24 2017 01:08
@Androbat cha ching
not sure why its repeating
Manuel Reyes
@Androbat
Feb 24 2017 01:09
Tom
@moT01
Feb 24 2017 01:11
@sirus3020 i think i know the problem, ...not something ive dealt with a whole lot
but like your for loop runs through so fast its done before the api call comes back
Albert L. C.
@sirus3020
Feb 24 2017 01:11
@moT01 sure. an idea to start would be great XD
Tom
@moT01
Feb 24 2017 01:11
i think anyway
something like that
Albert L. C.
@sirus3020
Feb 24 2017 01:12
hmm..
so i need to put some sort of delay?
Tom
@moT01
Feb 24 2017 01:13
no
that might work but its not the way you want to go
Albert L. C.
@sirus3020
Feb 24 2017 01:13
what would you recommend I do?
Tom
@moT01
Feb 24 2017 01:14
look into an each or a forEach()
pretty sure that's what you need to use and it will work
Albert L. C.
@sirus3020
Feb 24 2017 01:14
alright. will do. @moT01 thanks.
CamperBot
@camperbot
Feb 24 2017 01:14
sirus3020 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 530 | @mot01 |http://www.freecodecamp.com/mot01
Tom
@moT01
Feb 24 2017 01:14
i outta look into that
@Androbat what am i looking at
its not working
save it?
Albert L. C.
@sirus3020
Feb 24 2017 01:18
what was not working? the .each?
Tom
@moT01
Feb 24 2017 01:19
@sirus3020 i used the jquery forEach()
im gonna take a closer look at your code and see if i still think that will solve it, whats the number on the right, viewers?
Albert L. C.
@sirus3020
Feb 24 2017 01:20
yep.
Manuel Reyes
@Androbat
Feb 24 2017 01:20
@moT01 My transition is working. Did you see it?
Tom
@moT01
Feb 24 2017 01:21
i think thats just javascript actually, ...i bet either one would work
this is what happens when i dont read the docs
@Androbat its still not workin for me
Vincent D'Onofrio
@donofriov
Feb 24 2017 01:29
Actually I don’t think it’s going through the loop too quickly, it’s the fact that it goes through loop all the times and hits the correct urls. you can see stremers[i] working there. The issue is that when you go to use currentStreamer it’s always referencing the last loop and gives you ESL_CSGO
so everytime you are calling current streamer it’s always going to be the last item in your array (ESL_CSGO) because the loop is done
Oleksandr Malakhov
@Alexever17
Feb 24 2017 01:32
hy i am looking for some help :)
does anyone know how to align this properly:
http://codepen.io/alexever17/pen/EWxRjj
Tom
@moT01
Feb 24 2017 01:32
you may be right, ...but everything else is in the loop too
Vincent D'Onofrio
@donofriov
Feb 24 2017 01:34
right but currentStreamer isn’t used until the loops is over. streamers is used to make the call in each iteration of the loop
Karan Nandha
@karann7
Feb 24 2017 01:38
who wants to pair program with me on cloud9 and google hangouts
i am making a nodejs and mongodb app
Vincent D'Onofrio
@donofriov
Feb 24 2017 01:39
@sirus3020 one way to aproach that would be to grab the streamer name from the data
it’s part of _links.self
Tom
@moT01
Feb 24 2017 01:39
yea that seems to be working
Aftab Parvez
@aftabparvez
Feb 24 2017 01:40
@Alexever17 What do you want to align?
Vincent D'Onofrio
@donofriov
Feb 24 2017 01:40
Tom
@moT01
Feb 24 2017 01:40
i may have sent him on a goose chase
@sirus3020 you around?
nathabonfim59
@nathabonfim59
Feb 24 2017 01:41
@paulmichaelxd of course, but I just wanted to try to do something from scratch and train my new skills
Oleksandr Malakhov
@Alexever17
Feb 24 2017 01:41
@aftabparvez The div element and the ul list inside the nav
So that it is next to each other inside the nav
Albert L. C.
@sirus3020
Feb 24 2017 01:53
@moT01 hey. yeah. yep was trying to find also the streamer names. xD
@donofriov @moT01 thanks to both of you! :smile:
CamperBot
@camperbot
Feb 24 2017 01:55
:warning: sirus3020 already gave mot01 points
sirus3020 sends brownie points to @donofriov and @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 296 | @donofriov |http://www.freecodecamp.com/donofriov
Vincent D'Onofrio
@donofriov
Feb 24 2017 01:56
no problem!
Aftab Parvez
@aftabparvez
Feb 24 2017 01:57

Try puttint this in the CSS: html body {
margin: 0px;
padding: 0px;
font-family: 'Libre Franklin', sans-serif;
}

a{
text-decoration: none;
color: white;
font-size: 3.5vh;
}

ul {
list-style-type: none;
padding: 0px;
display: flex;
width: 200px;
justify-content: space-around;
align-items: center;
position: relative;
left: -40px;
}

li {
padding:0 10px;
}

nav {
width: 100vw;
height: 6vh;
background-color: #8a0e0e;
display: flex;
justify-content: space-between;
}

logo {

display: inline-block;
font-family: 'Rubik', sans-serif;
margin-top: 0.5vh;
margin-left: 15vw;
color: #8a0e0e;
background-color: white;
text-align: center;
font-size: 5vh;
font-weight: bold;;
line-height: 4.3vh;
letter-spacing: -1.1vh;
text-indent: -1.1vh;
border-radius: 50%;
height: 5vh;
width: 5vh;
}

@Alexever17
Freelatech
@Freelatech
Feb 24 2017 02:04
<div class="row">
<div class="col-md-6 offset-md-3" id="test">
<p>test</p>
</div>
</div>
Why this doesn't offset?
Vincent D'Onofrio
@donofriov
Feb 24 2017 02:05
@Freelatech are you using codepen? or from a file?
offset-md-3 is bootstrap 4, so you have to make sure you are including that
Freelatech
@Freelatech
Feb 24 2017 02:07
Codepen
Vincent D'Onofrio
@donofriov
Feb 24 2017 02:08
make sure your CSS settings look like this
for th external CSS
CSS Base can stay at NEITHER if that’s what you currently have checked
Freelatech
@Freelatech
Feb 24 2017 02:09
@donofriov It worked, thank you
CamperBot
@camperbot
Feb 24 2017 02:09
freelatech sends brownie points to @donofriov :sparkles: :thumbsup: :sparkles:
:cookie: 298 | @donofriov |http://www.freecodecamp.com/donofriov
Vincent D'Onofrio
@donofriov
Feb 24 2017 02:09
no problem!
Anthony Contreras
@AmazeCPK
Feb 24 2017 02:40
Can someone help me figure out how to do image display as shown on this site? http://karltaylorportfolio.com/overview/
Where the height can vary, but width is the same, and they dynamically fit together
Vincent D'Onofrio
@donofriov
Feb 24 2017 02:44
THis library is pretty cool to do that with: http://masonry.desandro.com/
@AmazeCPK
Anthony Contreras
@AmazeCPK
Feb 24 2017 02:45
@donofriov Am I able to do this with out jquery?
Vincent D'Onofrio
@donofriov
Feb 24 2017 02:45
yeah it’s just a library
if you look at this page
the second example is in vanilla javascript, or just regular javascript
you can even just do it in HTML too
just depends on how you want to add it
their docs are really well written so it’s not too difficult to implement
Anthony Contreras
@AmazeCPK
Feb 24 2017 02:47
awesome, thank you very much
thanks @donofriov
CamperBot
@camperbot
Feb 24 2017 02:47
amazecpk sends brownie points to @donofriov :sparkles: :thumbsup: :sparkles:
Vincent D'Onofrio
@donofriov
Feb 24 2017 02:47
no problem :)
CamperBot
@camperbot
Feb 24 2017 02:47
:cookie: 301 | @donofriov |http://www.freecodecamp.com/donofriov
Sam Griffen
@ssgriffen
Feb 24 2017 02:49
Why arent my tabs working on this? http://codepen.io/ssgriffen/pen/NdEXGj
Vincent D'Onofrio
@donofriov
Feb 24 2017 02:54
you are trying to select a span for your on.click event
but your html doesn’t have any spans, so it doesn’t know wha to select
if you are trying to get the console to spit out “hello” when you double click on one of the links, then you can change (“#tabs a span”) to just (“#tabs a”)
Gulsvi
@gulsvi
Feb 24 2017 02:57
Wow I didn't even think of a double click event. That's pretty cool
Larry Hawkins
@HawkinsLJ
Feb 24 2017 02:57
hey all, just started on assignment #2; personal portfolio page. I'm using Code Pen. I hate it but oh well.
Vincent D'Onofrio
@donofriov
Feb 24 2017 02:57
yea it is :)
Larry Hawkins
@HawkinsLJ
Feb 24 2017 02:58
For some reason my bootstrap isn't working in code pen despite my settings seeming correct
Vincent D'Onofrio
@donofriov
Feb 24 2017 02:58
@HawkinsLJ can you send the link to your pen, I can take a look for you
I literally just inserted the nav bar but it does not render in browser
Vincent D'Onofrio
@donofriov
Feb 24 2017 03:01
So it won’t actually appear until you put something your nav
Larry Hawkins
@HawkinsLJ
Feb 24 2017 03:02
hmmm ok. interesting because in sublime it does. Must be a codepen thing
thanks for checking
Vincent D'Onofrio
@donofriov
Feb 24 2017 03:03
oh weird, yeah not sure about that
Gulsvi
@gulsvi
Feb 24 2017 03:03
@HawkinsLJ You might be using Bootstrap 3 in your sublime environment: https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css
Your codepen is using a pre-alpha release of bootstrap 4 that is not ready for production yet.
But, that's what they're adding with "Quick Add" now for some reason
curiousNoob
@curiousNoob
Feb 24 2017 03:05
Could someone please explain:
```
Could someone please explain:
```
main >*:not(.scroll-top){max-width:1024px;margin:0 auto;box-shadow:0px 0px 2px 1px rgba(0, 0, 0, 0.2);
}
Could someone please explain:
main >*:not(.scroll-top){max-width:1024px;margin:0 auto;box-shadow:0px 0px 2px 1px rgba(0, 0, 0, 0.2);
}
the last one
Vincent D'Onofrio
@donofriov
Feb 24 2017 03:06
the rgba portion?
or the entire thing?
That is a pretty crazy selector :)
curiousNoob
@curiousNoob
Feb 24 2017 03:10
I got the answer, feel free to ask :D
xemexpress
@xemexpress
Feb 24 2017 03:10
hi guys, I am making a canvas and wondering why CanvasRenderingContext2D.textAlign is kind of "working reversely" so to speak. Setting it "right" is just like putting it to the left, sort of things
Vincent D'Onofrio
@donofriov
Feb 24 2017 03:11
It’s those styles to everything that is an immediate child of main and everything that is not part of the class scroll-top
curiousNoob
@curiousNoob
Feb 24 2017 03:11
yep
thanks
Vincent D'Onofrio
@donofriov
Feb 24 2017 03:12
you’re welcome!
curiousNoob
@curiousNoob
Feb 24 2017 03:13
I was looking through example project -Build a Personal Portfolio Webpage
Vincent D'Onofrio
@donofriov
Feb 24 2017 03:13
@xemexpress According to https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textAlign it’s not supposed to be “reverse”
curiousNoob
@curiousNoob
Feb 24 2017 03:13
too lazy to build my own
Vincent D'Onofrio
@donofriov
Feb 24 2017 03:14
welp you aren’t really going to learn then, just copying and pasting someones project so you can complete a task misses the point of FreeCodeCamp
I’m not trying to be mean, but if you really want to benefit from the course I would really suggest doing all the projects on your own
xemexpress
@xemexpress
Feb 24 2017 03:18
@donofriov yes that's the problem. Please take a look http://codepen.io/xemexpress/pen/MJMWNM
change the value to right
and you will see nothing, coz it's moved to the left
if you change the textAlign to middle, you will only world, coz it's moved 50% width based on position x
to the left
Vincent D'Onofrio
@donofriov
Feb 24 2017 03:22
woah
that’s really weird
oh i guess thats the last sentence in the docs
but why would it behave like that
sorry can’t help, don’t have a lot of experience with canvas, just thought that was interesting
xemexpress
@xemexpress
Feb 24 2017 03:28
@donofriov thank you for your attention:)
CamperBot
@camperbot
Feb 24 2017 03:28
xemexpress sends brownie points to @donofriov :sparkles: :thumbsup: :sparkles:
:cookie: 302 | @donofriov |http://www.freecodecamp.com/donofriov
xemexpress
@xemexpress
Feb 24 2017 03:28
@donofriov oh btw, how can I make the Calculator interface??
purely by CSS?
Vincent D'Onofrio
@donofriov
Feb 24 2017 03:29
yeah you can do it all with html / css
then the functionality would come with JS
i’m actually not quite there yet https://cl.ly/190m2O2q3V3b
xemexpress
@xemexpress
Feb 24 2017 03:31
o thanks, I'll give it a try after done with canvas :) btw, canvas is so fun
Vincent D'Onofrio
@donofriov
Feb 24 2017 03:31
yeah it looks awesome, i’ve actually never have seen it so thanks @xemexpress for the intro!
CamperBot
@camperbot
Feb 24 2017 03:31
donofriov sends brownie points to @xemexpress :sparkles: :thumbsup: :sparkles:
:cookie: 336 | @xemexpress |http://www.freecodecamp.com/xemexpress
xemexpress
@xemexpress
Feb 24 2017 03:32
:) good luck
J Tesoro
@geodeph
Feb 24 2017 03:32
CodePen signup page isnt working. Can someone try?
Vincent D'Onofrio
@donofriov
Feb 24 2017 03:34
yeah looks like it’s down right now :(
Paul DiLoreto
@paulmichaelxd
Feb 24 2017 03:45
@nathabonfim59 of course, that makes sense. Just saying that for your eventual “final product" portfolio, you might wanna switch to bootstrap or at least a CSS preprocessor for the sake of having it look good under any circumstance
Finagl3
@Finagl3
Feb 24 2017 03:49
So I'm new with using editors. I've been trying atom, and like it so far. I've been using the markdowns preview to get a look at my practice pages, but it doesn't show the css. And I can't tell if that's because I have the css page linked to the html wrong, or if the orecieenjust doesn't support css styling in the preview.
cisco m.
@mkklos
Feb 24 2017 04:05
I'm trying to place an image on the left of my website and then have text to the right of it, the thing is I don't know how to make the text go right next to it.
I already have the image placed on the left perfectly just getting the text to go next to it is what I don't know how to do
should I share the pen on codepen or what
Johnny
@jtan3
Feb 24 2017 04:09
share it
cisco m.
@mkklos
Feb 24 2017 04:10
how though :sweat_smile:
@jtan3
just paste the link?
Johnny
@jtan3
Feb 24 2017 04:10
yeah
making a tribute page.
@jtan3
Johnny
@jtan3
Feb 24 2017 04:15
trying
@mkklos you can try on the h4{}
to push the margin-left:
cisco m.
@mkklos
Feb 24 2017 04:19
mhm but then the text will be messed up
Johnny
@jtan3
Feb 24 2017 04:21
there's easier ways but you just want pure hmtl/css?
cisco m.
@mkklos
Feb 24 2017 04:22
is there something with bootstrap?
Johnny
@jtan3
Feb 24 2017 04:22
yeah
you can make 2 columns one for the img and one for text
WVKING20
@WVKING20
Feb 24 2017 04:26
Can somebody help me understand something about a codepen.io project?
Tom
@moT01
Feb 24 2017 04:28
@WVKING20 whats up
WVKING20
@WVKING20
Feb 24 2017 04:30
@moT01 I'm examining different projects to try and learn more about how javascript is introduced to HTML/CSS projects and this one is simple but uses anime.js? What is this and how do i find things like this?
Tom
@moT01
Feb 24 2017 04:31
its a javascript library
theres tons of em
cisco m.
@mkklos
Feb 24 2017 04:32
I figured out a way @jtan3
Karan Nandha
@karann7
Feb 24 2017 04:32
who wants to make a nodejs app on cloud 9
WVKING20
@WVKING20
Feb 24 2017 04:33
@moT01 Okay so what is the best way to learn commands and what all that library can do?
Johnny
@jtan3
Feb 24 2017 04:33
@mkklos cool
Tom
@moT01
Feb 24 2017 04:35
some of the libraries have good documentation some don't
search that site for anime
looks like its for animation, ...makes sense
theres a website, that links to their github page, ...probly some docs on there
WVKING20
@WVKING20
Feb 24 2017 04:36
https://codepen.io/tamashi/pen/aJoKay How did he know to use targets, elasticity, .loader, etc?
Tom
@moT01
Feb 24 2017 04:37
well i suppose he learned how to use the library
watched some youtube vids maybe, ...read the docs on github
WVKING20
@WVKING20
Feb 24 2017 04:38
Thanks @moT01 I get it now, so basically
CamperBot
@camperbot
Feb 24 2017 04:38
wvking20 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 531 | @mot01 |http://www.freecodecamp.com/mot01
WVKING20
@WVKING20
Feb 24 2017 04:38
find out what you want to accomplish
CamperBot
@camperbot
Feb 24 2017 04:38
find out what you want to accomplish
nothing found
WVKING20
@WVKING20
Feb 24 2017 04:38
find a library that can do that
CamperBot
@camperbot
Feb 24 2017 04:38
find a library that can do that
nothing found
Tom
@moT01
Feb 24 2017 04:39
if you havent used javascript or any other library you may want to start out with some of the challenges on here
WVKING20
@WVKING20
Feb 24 2017 04:40
ive learned basic javascript but implementing it and javascript libraries into html and css docs is what I'm having trouble with
Im learning react right now and its making a little more sense with the whole RenderDOM thing
Tom
@moT01
Feb 24 2017 04:41
codepen has an easy add for libraries
click the settings, and at the bottom somewhere
it says quickadd i think
WVKING20
@WVKING20
Feb 24 2017 04:42
So if i added react and then added React then i could use RenderDOM to make things appear in the pen?
i didn't mean to say it twice I'm tired lol
Tom
@moT01
Feb 24 2017 04:42
yea
WVKING20
@WVKING20
Feb 24 2017 04:43
@moT01 Thanks i understand now
CamperBot
@camperbot
Feb 24 2017 04:43
wvking20 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:warning: wvking20 already gave mot01 points
Tom
@moT01
Feb 24 2017 04:43
you would need to link it somehow in your html if you were making it locally, but codepen will do that for you in the background kinda
WVKING20
@WVKING20
Feb 24 2017 04:43
I'll mess around with it this weekend
Tom
@moT01
Feb 24 2017 04:44
look at examples
WVKING20
@WVKING20
Feb 24 2017 04:44
@moT01 Alright Thanks
CamperBot
@camperbot
Feb 24 2017 04:44
wvking20 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:warning: wvking20 already gave mot01 points
Kevin-Mok
@Kevin-Mok
Feb 24 2017 05:06
Can someone help me out figure why my button doesn't seem to do anything on click?
$(document).ready(function() {
    $("#generate").on("click", function() {
        $("#quote").innerHTML("Changed.");
        //document.getElementById("quote").innerHTML = "Changed.";
        document.getElementsByTagName("body")[0].style.backgroundColor = "#FFFFFF";
    });
});
Kevin-Mok
@Kevin-Mok
Feb 24 2017 05:18
Nvm, got help.
F22rapt
@F22rapt
Feb 24 2017 05:19
I'm stuck tryna figure out how to layout my tribute page uhm, are there good sources for references? I'm looking thorugh codepen but most of those are unfinished
or extremely simple xD
Sewwandi Dharmapriya
@SewwandiD
Feb 24 2017 05:42
Hi in my tribute page I have put a n image. but it's not displaying. But the alt tag works properly. How can I make my image visible?
<h1><u>Sir Arthur C. Clarke's predictions</u></h1>
<img src="clarke4.jpg" alt="pic" class="image">
<div>
F22rapt
@F22rapt
Feb 24 2017 05:46
take out the class=image
also make sure the image itself, is actually usable in whatever state it may be
Sewwandi Dharmapriya
@SewwandiD
Feb 24 2017 05:50
@F22rapt Hi, you are asking me to remove the image class right? I've tried in that way also.. but it doesn't work..
F22rapt
@F22rapt
Feb 24 2017 05:50
are you doing this in codepen? have a link to it?
Sewwandi Dharmapriya
@SewwandiD
Feb 24 2017 05:53
@F22rapt link in the sense.. I don't understand..
F22rapt
@F22rapt
Feb 24 2017 05:54
i meant a link to your codepen project. also i think its probably the .jpg image
if the photo is from your computer you probably need to use something like imugr to upload it and use the link in your src
Sewwandi Dharmapriya
@SewwandiD
Feb 24 2017 05:57
How it should be corrected? <img src="clarke4.jpg" alt="pic" class="image">
Oops!!
h1tag
@h1tag
Feb 24 2017 06:01
@SewwandiD what are you writing the code on?
which editor
Sewwandi Dharmapriya
@SewwandiD
Feb 24 2017 06:02
@fortMaximus Using code pen here.In my tribute page I have put a n image. but it's not displaying. But the alt tag works properly. How can I make my image visible?
h1tag
@h1tag
Feb 24 2017 06:03
@SewwandiD are you using Codepen pro?
Sewwandi Dharmapriya
@SewwandiD
Feb 24 2017 06:04
no..not pro
h1tag
@h1tag
Feb 24 2017 06:05
ok, you can't just type the image name like this in src becasue it's not located locally with the project files
you have to upload it to an image hosting site and get the image link from there
Sewwandi Dharmapriya
@SewwandiD
Feb 24 2017 06:07
@fortMaximus okay.. now I understand.. But how can I upload the image ?
h1tag
@h1tag
Feb 24 2017 06:09
@SewwandiD you can use this website postimg to upload the image and then get the "Direct link" from there
Sewwandi Dharmapriya
@SewwandiD
Feb 24 2017 06:11
Okay.. I will try and let you know..BTW.. Thanks a lot!! @fortMaximus
CamperBot
@camperbot
Feb 24 2017 06:11
sewwandid sends brownie points to @fortmaximus :sparkles: :thumbsup: :sparkles:
:cookie: 443 | @fortmaximus |http://www.freecodecamp.com/fortmaximus
Sewwandi Dharmapriya
@SewwandiD
Feb 24 2017 06:13
@fortMaximus Wowow.. it works!!.. Thank you soooo much! You are brilliant..
CamperBot
@camperbot
Feb 24 2017 06:13
sewwandid sends brownie points to @fortmaximus :sparkles: :thumbsup: :sparkles:
:warning: sewwandid already gave fortmaximus points
artjia
@artjia
Feb 24 2017 06:18
anyone can check my code, I wonder why the console.log are executed 3 times wheh I click the blue panel http://codepen.io/artjia/pen/vxBwJR
$(document).ready(function(){
  $('.clickable').hover(function(){
    $(this).on('click', function(){
      var pressed = $(this).attr('id');
      checkPressed(pressed);
    })
  })
?
artjia
@artjia
Feb 24 2017 06:35
hello anyone in here?
is that something wrong on those jquery, why it executed checkPressed multiple times when the button is clicked?
Ehsan Shadmehri
@ehsansh
Feb 24 2017 06:55
@artjia Because click event should not be inside the hover function.
artjia
@artjia
Feb 24 2017 06:57
@ehsansh hmm so the hover are should be empty with click event chaining to it?
Ehsan Shadmehri
@ehsansh
Feb 24 2017 06:59
@artjia What is your desired effect? You can use css for hover effect instead of jquery
artjia
@artjia
Feb 24 2017 07:03
@ehsansh thanks I manage to change it
CamperBot
@camperbot
Feb 24 2017 07:03
artjia sends brownie points to @ehsansh :sparkles: :thumbsup: :sparkles:
:cookie: 82 | @ehsansh |http://www.freecodecamp.com/ehsansh
Spyrantis Theodoros
@thodorisanta
Feb 24 2017 07:03
Here is my calculator project. Can i have some feedback on it :) rate 0-10 the interface and the JS
(Also what i should have done different/better etc)
https://codepen.io/oshikurou/pen/jyKLyg?editors=0111
artjia
@artjia
Feb 24 2017 07:04
@ehsansh I just want to make hover only available when its within running state :)
Ehsan Shadmehri
@ehsansh
Feb 24 2017 07:09
@artjia There are a lot of ways to do that. You can add a class by jquery while it is running for example. nowRunning. Then you can write hover effect for this class like: .nowRunning:hover{/whatever you want to do/}
artjia
@artjia
Feb 24 2017 07:13
@ehsansh Hmm interesting. I’ll try to implement it Ehsan
Sorin Ruse
@sorinr
Feb 24 2017 07:19
@thodorisanta try to calculate 5*5=+5 and see the result
Lalith Kishore
@dantetheshadeslayer
Feb 24 2017 07:43
hey guuyths
why are people getting banned?
@thodorisanta keep the input numbers and operands at the top left of the calc screen so we know what we entered in the first place
badalsaibo
@heyDante
Feb 24 2017 07:44
@dantetheshadeslayer admins doing their job instead.
Lalith Kishore
@dantetheshadeslayer
Feb 24 2017 07:45
and make the calculator design better, giving it a more antique feel by shading and adding some marks and scratches on the sides
@heyDante lol no, I meant what did the people do to get themselves banned
Sorin Ruse
@sorinr
Feb 24 2017 07:53
@thodorisanta you should also think of a way to let you deal with negative numbers. ex -5*5=-25. think you also need a +/- btn
@thodorisanta if your first input should be -5 you can transform the example above by making the calculation like 0-5*5=
René
@RenevandenHeuvel
Feb 24 2017 08:24
What isn't the image uploading with this code? " <img src="Buteyko.jpg" alt="dr Buteyko"> I just started with codepen on the challenge to build a tribute page
Why isn't the image uploading with this code? " <img src="Buteyko.jpg" alt="dr Buteyko"> I just started with codepen on the challenge to build a tribute page
Matthew
@Krimsonmedic
Feb 24 2017 08:30
did you upload that picture as an asset? otherwise you'd probably need to host it somewhere and use a direct URL
kirbyedy
@kirbyedy
Feb 24 2017 08:32
@RenevandenHeuvel codepen can`t access files which are locally stored on your computer
they have to be publicly accesible
René
@RenevandenHeuvel
Feb 24 2017 08:33
Yes I was doing that now. I had to google search first before asking :) Thx @Krimsonmedic @kirbyedy
CamperBot
@camperbot
Feb 24 2017 08:33
renevandenheuvel sends brownie points to @krimsonmedic and @kirbyedy :sparkles: :thumbsup: :sparkles:
:cookie: 267 | @krimsonmedic |http://www.freecodecamp.com/krimsonmedic
:star2: 1846 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
René
@RenevandenHeuvel
Feb 24 2017 08:44
Does an image have to come from a photo library, such as shutterstock in the example tribute page? Because when I google on image I get these long image images without an .jpg extension.
I mean I get these long links without an .jpg extension.
Alban MARIETTE
@AlbanMariette
Feb 24 2017 08:53
@RenevandenHeuvel you can try to right click on it and get the link
René
@RenevandenHeuvel
Feb 24 2017 09:02
@AlbanMariette copy adress image, i see thx
CamperBot
@camperbot
Feb 24 2017 09:02
renevandenheuvel sends brownie points to @albanmariette :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @albanmariette |http://www.freecodecamp.com/albanmariette
Alban MARIETTE
@AlbanMariette
Feb 24 2017 09:06
You are welcome @RenevandenHeuvel
Oleksandr Malakhov
@Alexever17
Feb 24 2017 09:23
@aftabparvez thank you! I will try it out
CamperBot
@camperbot
Feb 24 2017 09:23
alexever17 sends brownie points to @aftabparvez :sparkles: :thumbsup: :sparkles:
:cookie: 115 | @aftabparvez |http://www.freecodecamp.com/aftabparvez
Craig Faulmann
@burpi
Feb 24 2017 09:46
hi guys
iḿ doing a coding challenge for a job interview
and i have to recreate a website
iḿ having som trouble with getting a diamond shape border around a image
anyone have some tips ?
René
@RenevandenHeuvel
Feb 24 2017 09:57
Can anyone tell me how to center my header image? http://codepen.io/FccRene/pen/EWxMZb
kirbyedy
@kirbyedy
Feb 24 2017 10:03
@RenevandenHeuvel did you try with text-center ?
sorry not that
you are using bootstrap 4 which is still in the alpha phase, so be careful, you might face problems
Vladimír Macháček
@Machy8
Feb 24 2017 10:11

I have modified like your example

http://codepen.io/anon/pen/MpWxvp?editors=1100#0

Marat
@Marat89bluolyu
Feb 24 2017 10:33
Hello, I can't get json. What's wrong with my code?
http://codepen.io/marat89/pen/YZzRBo
Kevin Janada Roy Ardian
@kevinjanada
Feb 24 2017 10:49

Hey guys, can i get some help with this challenge?

It should return objects in the first argument that contains the same set of key value pairs of the second argument.

My code returns the objects if it has one same key value pair.

I need to remove the ones that does not have all of the key value pairs.

I hope my question make sense.

function whatIsInAName(collection, source) {
  // What's in a name?
  var arr               = [],
      ref               = Object.keys(source),
      currentCollection;
  // Only change code below this line
  for(var i=0; i<collection.length; i++){
    currentCollection = collection[i];
    for(var k=0; k<ref.length; k++){
      if(currentCollection.hasOwnProperty(ref[k]) && currentCollection[ref[k+1]] === (source[ref[k]]) && 
         arr[0] != currentCollection){
        arr.unshift(currentCollection);
      }

    }
  }

  return arr;
}

whatIsInAName([{ "a": 1, "b": 2 }, { "a": 1 }, { "a": 1, "b": 2, "c": 2 }], { "a": 1, "b": 2 });
René
@RenevandenHeuvel
Feb 24 2017 10:51
@kirbyedy yes, i tried that, but later I saw that I did many things wrong. So I started over after taking a peek at the example tribal page code.
kirbyedy
@kirbyedy
Feb 24 2017 10:52
well you can try with this one if you prefer
or maybe even flexbox
h1tag
@h1tag
Feb 24 2017 10:52
@Marat89bluolyu why you are you using this URL to get your JSON for the quote app? It seems it's not allowed to be accessed on Codepen
Marat
@Marat89bluolyu
Feb 24 2017 11:00
@fortMaximus i just want to see how JSON is working...could i need to create are JSON on codepen?
h1tag
@h1tag
Feb 24 2017 11:01
no, not necessary
try this API v4.0 - Quotes on Design @Marat89bluolyu
Marat
@Marat89bluolyu
Feb 24 2017 11:05
@fortMaximus thanks
CamperBot
@camperbot
Feb 24 2017 11:05
marat89bluolyu sends brownie points to @fortmaximus :sparkles: :thumbsup: :sparkles:
:cookie: 451 | @fortmaximus |http://www.freecodecamp.com/fortmaximus
pani7
@pani7
Feb 24 2017 11:07
Hi, i am making navbar and copy/paste exact code from bootstrap and my navbar menus are stacked one above other instead on the same line, why is this happening?
Moisés Man
@moigithub
Feb 24 2017 11:27
@pani7 make sure u using the same bootstrap library version the example uses
on codepen quick add button add v.4
probably u coping a v3 example ?
pani7
@pani7
Feb 24 2017 11:32
i didn't understand good, what exactly should i write in quick add?
Ah yes, i am coping bootstrap3 example. THX
Lidia Wisniewska
@lidiawisniewska
Feb 24 2017 12:08
@SkyCoder01 thanks - I was considering forEach at some point, i'll have to think about it again
CamperBot
@camperbot
Feb 24 2017 12:08
lidiawisniewska sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 312 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Sorin Ruse
@sorinr
Feb 24 2017 12:08
@RenevandenHeuvel here an example of doing it with some css only. didn't wanted to change your html structure
Lidia Wisniewska
@lidiawisniewska
Feb 24 2017 12:13
does anyone know how do i access data for offline users in twitch tv app
René
@RenevandenHeuvel
Feb 24 2017 12:38
@sorinr, thx, that's helpfull. So flexbox and bootstrap can be mixed, I had the impression that was not best practice.
CamperBot
@camperbot
Feb 24 2017 12:38
renevandenheuvel sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1181 | @sorinr |http://www.freecodecamp.com/sorinr
WiseKodama
@WiseKodama
Feb 24 2017 12:39
@lidiawisniewska
brunofin does not work at the moment
you can only check for comster404
oh nvm
you said offline
if data.stream === null means either offline or deactivated
after that you need to check if data.game === undefined means that those are deactivated channels
Lidia Wisniewska
@lidiawisniewska
Feb 24 2017 12:40
yeah, i know that bit, but then my call is https://wind-bow.gomix.me/twitch-api/streams/" + username
WiseKodama
@WiseKodama
Feb 24 2017 12:40
streams doesnt work
if they are offline you need to grab them with channels
WiseKodama
@WiseKodama
Feb 24 2017 12:46
@lidiawisniewska did you get it working?
Andro Castor
@AndroCastor
Feb 24 2017 12:46
Hi guys, do you happen to know of a web-tool that quick and easy can show the difference between how a page i show on mobile and desktop?
is shown*
WiseKodama
@WiseKodama
Feb 24 2017 12:47
@AndroCastor I wish, if you find one please let me know!
Andro Castor
@AndroCastor
Feb 24 2017 12:47
Ye, I thought so .. :-/
heroiczero
@heroiczero
Feb 24 2017 12:48
@AndroCastor try using inspect element for chrome webpage
WiseKodama
@WiseKodama
Feb 24 2017 12:48
@lidiawisniewska first cycle through your array using streams + username, but make sure to check if data.stream === null < those are offline
then do another json call using channels + username
if data.game === undefined < deactivated account
Andro Castor
@AndroCastor
Feb 24 2017 12:49
@heroiczero Well, that shows me the code of the page I'm currently viewing, not how it would look in mobile. But thanks anyway!
CamperBot
@camperbot
Feb 24 2017 12:49
androcastor sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:cookie: 874 | @heroiczero |http://www.freecodecamp.com/heroiczero
Andro Castor
@AndroCastor
Feb 24 2017 12:50
Firefox also has that, by the way
Lidia Wisniewska
@lidiawisniewska
Feb 24 2017 12:50
@WiseKodama no, still cant get offline users
WiseKodama
@WiseKodama
Feb 24 2017 12:51
did you do an if statement : if(data.stream === null){offline users, then do another json call and another if statement:if(data.game === undefined{deactivated users}}
heroiczero
@heroiczero
Feb 24 2017 12:51
@AndroCastor there is a button on the top-left on the white box in the left your inspect element box
Andro Castor
@AndroCastor
Feb 24 2017 12:52
Oooh, thats not present in firefox..! Very nice!
heroiczero
@heroiczero
Feb 24 2017 13:00
it should be Ctrl+shift+m if you cant find it
WiseKodama
@WiseKodama
Feb 24 2017 13:01
or F12
I think :)
Geekomatic
@Geekomatic
Feb 24 2017 13:03
Hey guys, anyone here managed to make ip-api work for the weather app ? I can't seem to, despite going as far as copypasting the example in the docs.
Manuel Reyes
@Androbat
Feb 24 2017 13:04
Whats up!
h1tag
@h1tag
Feb 24 2017 13:11
@Geekomatic can u show ur pen
Geekomatic
@Geekomatic
Feb 24 2017 13:12
http://codepen.io/Geekomatic/pen/MJxQjX?editors=0011
(bit messy, commented my previously working code using .getCurrentLocation() as it didn't work on chrome)
Lidia Wisniewska
@lidiawisniewska
Feb 24 2017 13:13
can someone have a look at my twitch tv app
h1tag
@h1tag
Feb 24 2017 13:13
@Geekomatic and what's not working?
Lidia Wisniewska
@lidiawisniewska
Feb 24 2017 13:13
can't get it working
Geekomatic
@Geekomatic
Feb 24 2017 13:16
@fortMaximus the console.log doesn't show. Also, I tried below to use a .fail(error) method to diagnose, and got an error message that I can't make sense of.
As in, it's just (minified ?) js code.
h1tag
@h1tag
Feb 24 2017 13:17
@Geekomatic do you know where the result of console.log is displayed?
Geekomatic
@Geekomatic
Feb 24 2017 13:17
yeah, bottom right of the codepen panel, or the console panel on the navigator itself.
Is it working for you ?
h1tag
@h1tag
Feb 24 2017 13:17
yup
Geekomatic
@Geekomatic
Feb 24 2017 13:17
dayum. Must be me then.
h1tag
@h1tag
Feb 24 2017 13:18
on chrome and firefox too
Geekomatic
@Geekomatic
Feb 24 2017 13:19
Doesn't work on firefox....
h1tag
@h1tag
Feb 24 2017 13:20
no, it works on both for me
FL8Liew
@FL8Liew
Feb 24 2017 13:20
hey guys
how do i even start with javascript part for wikipedia viewer
?
Geekomatic
@Geekomatic
Feb 24 2017 13:20
@fortMaximus works on chrome for me, not firefox.
Geekomatic
@Geekomatic
Feb 24 2017 13:25
Alright, note to self : adblock blocks ip-api. Good to know. Thanks @fortMaximus
CamperBot
@camperbot
Feb 24 2017 13:25
geekomatic sends brownie points to @fortmaximus :sparkles: :thumbsup: :sparkles:
:cookie: 457 | @fortmaximus |http://www.freecodecamp.com/fortmaximus
h1tag
@h1tag
Feb 24 2017 13:26
@Geekomatic weird, I'm using adblock
@FL8Liew by reading the API documentation and using what you learned about getJSON
h1tag
@h1tag
Feb 24 2017 13:32
@lidiawisniewska maybe json is a reserved keyword when using ajax(). For example, try changing the variable name for the response you get to response
like this: success: function checkStream (response)
and changing the properties access in the code accordingly:
var gamerName = response._links.channel.split('/').pop();
and so on ...
Lidia Wisniewska
@lidiawisniewska
Feb 24 2017 13:37
@fortMaximus did that and nothing changes
h1tag
@h1tag
Feb 24 2017 13:39
Untitled.png
before you made this change I was getting an error in the console can't access json, I think
and there were no results on the page
but now the error is gone and it shows result, as you can see in the picture
Lidia Wisniewska
@lidiawisniewska
Feb 24 2017 13:42
maybe there was some delay or something; whats the best way to loop through offline users? i was told that for loop cant be used
René
@RenevandenHeuvel
Feb 24 2017 13:42
For the Build a Tribute Page I am copying and pasting text from another site. Would that mess up the SEO of that particular site? I don't want to do that.
rodrigode
@rodrigode
Feb 24 2017 13:44
hello, i'm seeking some advice,
i've completed the first project and found some trouble to even start the Personal Portfolio Webpage
felt that maybe studying some more css would help me and started with the Mozilla guide - which made me get more confused and lost
and I pretty much don't know what to do
Jasmin Parent
@charlesdarkwind
Feb 24 2017 13:50
@rodrigode maybe start with some <div> and make sections, you can read on bootstrap in their css and components sections, id start learning the grid system
Andrew Nichols
@frenata
Feb 24 2017 13:53
Personally I'd start without any css at all. Just get focus on writing pure html with correct content. @rodrigode
kirbyedy
@kirbyedy
Feb 24 2017 13:54
@RenevandenHeuvel not sure if I understand the question
rodrigode
@rodrigode
Feb 24 2017 13:57
@frenata i actually feel i got the html part and regarding the freecodecamp content just didn't got so much the div part but maybe i'll just go backwards... i guess
Andrew Nichols
@frenata
Feb 24 2017 13:58
<div>s are still html, they are just, errm, meaningless html
rodrigode
@rodrigode
Feb 24 2017 14:02
@frenata by what i wrote and your answer i guess i should go back to html
thanks (:
CamperBot
@camperbot
Feb 24 2017 14:02
rodrigode sends brownie points to @frenata :sparkles: :thumbsup: :sparkles:
:cookie: 382 | @frenata |http://www.freecodecamp.com/frenata
A bit stuck atm with my API pulling random quotes, nothing seems to be coming up. Any idea what's wrong?
Been stuck here for about an hour
Andrew Nichols
@frenata
Feb 24 2017 14:03
I don't think you can really understand CSS until you understand HTML. But if something specific is tripping you up, I can see if I can help. @rodrigode
h1tag
@h1tag
Feb 24 2017 14:03
@lidiawisniewska IDK what's the best practice to loop through an object, but you can use for loops
Andrew Nichols
@frenata
Feb 24 2017 14:04
@bwongcodes Check your console.
Gulsvi
@gulsvi
Feb 24 2017 14:04

@lidiawisniewska If you want to use .forEach() it will help.

var arr = [1,2,3];
arr.forEach(function(number) {
  console.log(number)
}

Also, I don't see where you're calling the getOfflineStreamers() function in your code.

bwongcodes
@bwongcodes
Feb 24 2017 14:04
@frenata Console is empty :/
René
@RenevandenHeuvel
Feb 24 2017 14:04
@kirbyedy In this codepen http://codepen.io/FccRene/pen/EWxMZb you will see some years with text behind it. I have copy pasted this text from another site. Would this influence the SEO of the other site in any negative way? If so I would have to adjust the text a bit.
Gulsvi
@gulsvi
Feb 24 2017 14:05
Hello @fortMaximus
kirbyedy
@kirbyedy
Feb 24 2017 14:05
not really @RenevandenHeuvel
h1tag
@h1tag
Feb 24 2017 14:05
@SkyCoder01 Hi! :)
Gulsvi
@gulsvi
Feb 24 2017 14:06

@lidiawisniewska This is an outline of how I did it:

users.forEach(function(user) {
  var channelsUrl = 'https://wind-bow.gomix.me/twitch-api/channels/' + user,
      streamsUrl = 'https://wind-bow.gomix.me/twitch-api/streams/' + user;

  $.getJSON(channelsUrl, function(channelData) {
    $.getJSON(streamsUrl, function(streamData) {
      if (/* Test for Closed Account */) {
          // process closed accounts
          } else if (/* Test for Offline Accounts */) {
        // process offline accounts
      } else {
        // process online accounts
      }
    });
  });

Hope it helps!

rodrigode
@rodrigode
Feb 24 2017 14:06
@frenata i guess i got somehow lost in the flow. i'm better at learning by doing and feel i was going kind of well by following the map until stuck on the portfolio project and left to seek help (and distraction) on other css tutorials...
one week after it feels like "where am i?"
Andrew Nichols
@frenata
Feb 24 2017 14:06
@bwongcodes I'm definitely getting a console error on your pen:
Mixed Content: The page at 'https://codepen.io/bwongcodes/pen/NpWVyo' was loaded over HTTPS, but requested an insecure script 'http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=jQuery31108011240447886354_1487945030495&_=1487945030496'. This request has been blocked; the content must be served over HTTPS.
CSS is a wild and wooly world.
Lidia Wisniewska
@lidiawisniewska
Feb 24 2017 14:08
@SkyCoder01 not sure if my syntax is right
Lascu Gratian
@gratianl
Feb 24 2017 14:09
Hello guys! Can you help me please with this: What’s the difference between an AJAX call and a normal HTTP one?
Gulsvi
@gulsvi
Feb 24 2017 14:09
@lidiawisniewska Your for loop is still there - the .forEach is for going through each user in the array
bwongcodes
@bwongcodes
Feb 24 2017 14:10
@bwongcodes still doesn't seem to be working :( Also how weird, nothing comes up in my console...
Andrew Nichols
@frenata
Feb 24 2017 14:10
It's not always that simple with APIs
h1tag
@h1tag
Feb 24 2017 14:10
@SkyCoder01 so forEach is better than forfor objects? If yes, why?
Andrew Nichols
@frenata
Feb 24 2017 14:11
Often they want $$$ for HTTPS access, I don't know about that one.
Lidia Wisniewska
@lidiawisniewska
Feb 24 2017 14:11
@SkyCoder01 makes sense thanks!
CamperBot
@camperbot
Feb 24 2017 14:11
lidiawisniewska sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 313 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 24 2017 14:12
@fortMaximus For loop can't be used when making asynchronous calls because there is no callback. With .forEach(), .map(), .filter(), etc. there is a callback. Here is some info that helped me when I hit this problem with my Twitch App: http://stackoverflow.com/questions/13343340/calling-an-asynchronous-function-within-a-for-loop-in-javascript
Andrew Nichols
@frenata
Feb 24 2017 14:12
@bwongcodes I can get it to work if I load the codepen with HTTP only, and pulling from the API via HTTP also
bwongcodes
@bwongcodes
Feb 24 2017 14:12
@frenata I FIXED IT!!!
@frenata that's exactly what I just did also
@frenata thanks!
CamperBot
@camperbot
Feb 24 2017 14:13
bwongcodes sends brownie points to @frenata :sparkles: :thumbsup: :sparkles:
:cookie: 383 | @frenata |http://www.freecodecamp.com/frenata
Andrew Nichols
@frenata
Feb 24 2017 14:13
You'll get those kinds of error if you mix HTTP and HTTPS
Geekomatic
@Geekomatic
Feb 24 2017 14:14
@bwongcodes Remove the "s" in http both in your adress bar and your api call. Then go to settings and remove bootstrap and jquery, and put jquery and bootstrap back (in that order)
bwongcodes
@bwongcodes
Feb 24 2017 14:14
@Geekomatic got it, thanks!
CamperBot
@camperbot
Feb 24 2017 14:14
bwongcodes sends brownie points to @geekomatic :sparkles: :thumbsup: :sparkles:
:cookie: 330 | @geekomatic |http://www.freecodecamp.com/geekomatic
Gulsvi
@gulsvi
Feb 24 2017 14:17
@Geekomatic https://ipinfo.io/json is not blocked by adblock in case you want to try a different location API
Geekomatic
@Geekomatic
Feb 24 2017 14:17
@SkyCoder01 Nah seems to work now, but thank you, I might still switch.
CamperBot
@camperbot
Feb 24 2017 14:17
geekomatic sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 314 | @skycoder01 |http://www.freecodecamp.com/skycoder01
h1tag
@h1tag
Feb 24 2017 14:18
@SkyCoder01 this is only true with ajax but not getJson(), right?
Gulsvi
@gulsvi
Feb 24 2017 14:19
@fortMaximus $.getJSON is $.ajax, just a shorthand version. It is basically the same as:
$.ajax({
  dataType: "json",
  url: url,
  data: data,
  success: success
});
Matthew
@Krimsonmedic
Feb 24 2017 14:23
ok... stuck again
the twitch api
h1tag
@h1tag
Feb 24 2017 14:23
@SkyCoder01 I thought thatgetJSON() is synchronous, because I haven't read otherwise before
Pieter Stokkink
@forkerino
Feb 24 2017 14:24
Does anyone have a (un)favorable opinion about this course: https://www.udemy.com/react-redux ? It is on sale now and I thought about getting it, but wanted to get an idea about the quality.
h1tag
@h1tag
Feb 24 2017 14:24
@SkyCoder01 but I used for in my twitch project and it worked just fine
Gulsvi
@gulsvi
Feb 24 2017 14:24
@fortMaximus I think you can set up either one to be synchronous with async: false or some setting like that, but I've read it's not a good practice.
Anything that goes out to a website, gets some data, and then comes back is asynchronous
Matthew
@Krimsonmedic
Feb 24 2017 14:25
@fortMaximus have you figured out how to tell what they are streaming
/streams/:stream ...but I don't know what to replace the :stream with
Gulsvi
@gulsvi
Feb 24 2017 14:26

Try these two pieces of code:

var arr = [1,2,3,4,5];

for (var i = 0; i < arr.length; i++) {
  setTimeout(function() {
    console.log(i)
  },100);
}
// output is 5, 5, 5, 5, 5

And now try with:

var arr = [1,2,3,4,5];

arr.forEach(function(number) {
  setTimeout(function() {
    console.log(number)
  },100);
});
// output is 1,2,3,4,5
Matthew
@Krimsonmedic
Feb 24 2017 14:26
channels/freecodecamp doesn't pull anything that says what they are streaming or have a "null" in it's place
René
@RenevandenHeuvel
Feb 24 2017 14:27
@kirbyedy Do you mean that it would affect the SEO of the other site?
Gulsvi
@gulsvi
Feb 24 2017 14:28
Actually, those samples were wrong - edited...
René
@RenevandenHeuvel
Feb 24 2017 14:28
@kirbyedy Sorry I make a lot of spelling errors today. My question was if you meant that my codepen wouldn't affect the SEO of the other site?
h1tag
@h1tag
Feb 24 2017 14:29
@SkyCoder01 still haven't tried them but this this really intresting
Gulsvi
@gulsvi
Feb 24 2017 14:30
@fortMaximus I want to see your Twitch. I could not get mine to work with for() loop, and lost a couple of days on it lol
This is just what I learned, so I may have some details mixed up
h1tag
@h1tag
Feb 24 2017 14:33
@SkyCoder01 oh, wait, does it matter if you use a hand/hard coded object?
Andrew Nichols
@frenata
Feb 24 2017 14:33
@SkyCoder01 The issue with the first is that i is being hoisted out of the for loop
Use let
Gulsvi
@gulsvi
Feb 24 2017 14:34
@fortMaximus Yes, that makes a big difference - there is no delay, so it isn't asynchronous.
Matthew
@Krimsonmedic
Feb 24 2017 14:34
that worked @SkyCoder01 I luff you
@SkyCoder01 ty
CamperBot
@camperbot
Feb 24 2017 14:34
krimsonmedic sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 315 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 24 2017 14:35
:heart_eyes: LOL
@frenata Yes, let changes things, but does it make it so you can do async functions in a for loop? I'm still learning...
I thought we needed a callback to do async
Andrew Nichols
@frenata
Feb 24 2017 14:36
Nothing to do with async, let just ensures that each value of i is passed instead of the final value 5 times.
Gulsvi
@gulsvi
Feb 24 2017 14:37
Hmmm, I wonder if there's a better way to show what's going on with Twitch when people do ajax calls in a for loop and it doesn't work.
Andrew Nichols
@frenata
Feb 24 2017 14:38
With var all the async calls are referiing back to the enclosed i, now set to 5. let rebinds i on each iteration so each async call has it's own version of i
Gulsvi
@gulsvi
Feb 24 2017 14:41
@frenata So we could use ajax in a for() loop if we use let instead of var?
Sorry, I'm confused :/
if I sound dumb
Pieter Stokkink
@forkerino
Feb 24 2017 14:42
@SkyCoder01 you can also use a forEach if the usernames are in an array.
Andrew Nichols
@frenata
Feb 24 2017 14:42
YDKJS covers this in great detail
Gulsvi
@gulsvi
Feb 24 2017 14:42
@forkerino Yeah, that fact is established for sure :) .map(), .forEach(), .filter() but then @frenata brought up the let keyword with a for loop
h1tag
@h1tag
Feb 24 2017 14:43
and I'm not getting any of this :laughing:
Andrew Nichols
@frenata
Feb 24 2017 14:43
var arr = [1,2,3,4,5];

for (let i = 0; i < arr.length; i++) {
  setTimeout(function() {
    console.log(i)
  },100);
} // prints 0,1,2,3,4
Pieter Stokkink
@forkerino
Feb 24 2017 14:43
@SkyCoder01 Yes, that works too. haven't followed the whole exchange.
Andrew Nichols
@frenata
Feb 24 2017 14:44
That said, I'd generally go with the functional tools anyway.
Gulsvi
@gulsvi
Feb 24 2017 14:45
I'll check out YDKJS, Eloquent JavaScript doesn't get into let and const, I just kind of started using const everywhere and let if the variable changes without thinking much more
So much to learn, but I should stop using things I don't understand fully
h1tag
@h1tag
Feb 24 2017 14:47
the problem is when you're using something you think you understand, but you're actually not
Gulsvi
@gulsvi
Feb 24 2017 14:47
Yeah, you don't know what you don't know :laughing:
Thank you @frenata for helping me know a bit more
CamperBot
@camperbot
Feb 24 2017 14:47
skycoder01 sends brownie points to @frenata :sparkles: :thumbsup: :sparkles:
:cookie: 388 | @frenata |http://www.freecodecamp.com/frenata
Andrew Nichols
@frenata
Feb 24 2017 14:47
The two concepts in play there are hoisting and closure.
h1tag
@h1tag
Feb 24 2017 14:48
@SkyCoder01 thank you too for the new info
CamperBot
@camperbot
Feb 24 2017 14:48
fortmaximus sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 316 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Geekomatic
@Geekomatic
Feb 24 2017 14:48
DOST THOU EVEN HOIST ?
h1tag
@h1tag
Feb 24 2017 14:49
?!
Geekomatic
@Geekomatic
Feb 24 2017 14:49
pay no mind.
Gulsvi
@gulsvi
Feb 24 2017 14:50
:)
h1tag
@h1tag
Feb 24 2017 14:50
:+1:
google
René
@RenevandenHeuvel
Feb 24 2017 14:58
@kirbyedy thx
CamperBot
@camperbot
Feb 24 2017 14:58
renevandenheuvel sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1854 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
tonytrap
@tonytrap
Feb 24 2017 15:13
can someone please tell me why this code is not working in JS, on codepen.io....i set the settings to Jquery in the drop down menu like your supposed to do and checked my html and this code is still not working:
can someone please tell me why this code is not working in JS, on codepen.io....i set the settings to Jquery in the drop down menu like your supposed to do and checked my html and this code is still not working:$(document).ready(){
setBindings();
});
function setBindings() {
$("nav a").click(function(e){
alert('hit');
}
}
Geekomatic
@Geekomatic
Feb 24 2017 15:14
@tonytrap forgot a parenthesis I think
emamadordev
@emamadordev
Feb 24 2017 15:15

I wanted to practice coding websites and get better with design, so I started making websites on my own time. I pick a category and start designing a website for a hypothetical company. After I finish I continue making another website for a different category. I'm trying to make this a routine.

Anyway, here is the first site I built. Here is the design:
http://emamadordev.deviantart.com/art/Lush-Salon-Web-Design-664364792

And here is the live website: http://www.emmanuelamador.com/lush/

Any constructive criticism is welcomed.

h1tag
@h1tag
Feb 24 2017 15:15
@tonytrap the syntax is wrong
tonytrap
@tonytrap
Feb 24 2017 15:15
$(document).ready(){
setBindings();
});
function setBindings() {
$("nav a").click(function(e){
alert('hit');
})
}
(THIS BETTER??><??)
h1tag
@h1tag
Feb 24 2017 15:15
$(document).ready(function(){
    //your code here
});
tonytrap
@tonytrap
Feb 24 2017 15:16
AHHHHHHH I SEE! thanks will try this
Geekomatic
@Geekomatic
Feb 24 2017 15:16
@tonytrap forgot a ";" after the parenthesis
tonytrap
@tonytrap
Feb 24 2017 15:18
i keep getting unexpected token
Farhad
@fhdhsni
Feb 24 2017 15:18
@emamador sounds good. But aspect ratio of some photos doesn't seem to be preserved.
Gulsvi
@gulsvi
Feb 24 2017 15:19
@tonytrap Can you share your codepen? I don't see any issues with your code if you added function to your document.ready:
$(document).ready(function() {
  setBindings();
});

function setBindings() {
  $("nav a").click(function(e) {
    alert('hit');
  });
}
tonytrap
@tonytrap
Feb 24 2017 15:20
error message reading "unexpected end of input"
Geekomatic
@Geekomatic
Feb 24 2017 15:21
@tonytrap got jquery ?
Gulsvi
@gulsvi
Feb 24 2017 15:21
That could mean a bracket is missing or parentheses
tonytrap
@tonytrap
Feb 24 2017 15:22
this is my exact code:

$(document).ready(function(){
function setBindings() {
$("nav a").click(function(e){
alert('hit');

//your code here

});

says unexpected end of input
Geekomatic
@Geekomatic
Feb 24 2017 15:22
@tonytrap missing "});"
Gulsvi
@gulsvi
Feb 24 2017 15:23
Missing brackets :)
And not calling the function setBindings()
Geekomatic
@Geekomatic
Feb 24 2017 15:24
also, put the entire function block out of the js $(document).ready(function(){ and replace by "setBindings();"
h1tag
@h1tag
Feb 24 2017 15:24
one bracket and two curly brackets
Jakumozo
@Jakumozo
Feb 24 2017 15:26
Could someone help? I am trying to use bootstrap icons, but it does not work? WHat's the problem? http://codepen.io/Kromel/pen/dvydvR
Jerzz
@2cool4school
Feb 24 2017 15:27
Hey what's up guys? Has anyone here ever used the Twitter API?
Chris
@bestintown23
Feb 24 2017 15:27
what do i have to do to make my pictures smaller on my site here? https://codepen.io/bestintown23/pen/woPMBV
Geekomatic
@Geekomatic
Feb 24 2017 15:28
@2cool4school Didn't quite use the "API", more like tinkered with an url.
tonytrap
@tonytrap
Feb 24 2017 15:28
function setBindings()
$("nav a").click(function(e){
alert('hit');
}});
Jerzz
@2cool4school
Feb 24 2017 15:29
@Geekomatic Ah. What do you mean by tinkering with an url?
tonytrap
@tonytrap
Feb 24 2017 15:29
now saying unexpected identifier :(
Ehsan Shadmehri
@ehsansh
Feb 24 2017 15:29
@bestintown23 Use width attribute in your image tag.
Geekomatic
@Geekomatic
Feb 24 2017 15:29
@2cool4school https://twitter.com/intent/ look into this url online
Gulsvi
@gulsvi
Feb 24 2017 15:29
@Jakumozo You're using Bootstrap 4 in your pen and they dropped the glyphicons icon font. Switch to Bootstrap 3 or read here on how to migrate: https://v4-alpha.getbootstrap.com/migration/#components
Geekomatic
@Geekomatic
Feb 24 2017 15:30
@tonytrap forgot a { after setBindings()
Jasmin Parent
@charlesdarkwind
Feb 24 2017 15:30
Hi, any idea why this if condition wont work?
$(".navBut1, .navBut2, .navBut3").hover(function(){
    $(this).stop(true, false).animate({ width: "70px" });
  }, function() {
    $(this).stop(true, false).animate({ width: "19px" });
  });

  if ($('.navBut1').width() > 35) {
    console.log('hi');
    $('.navBut1').text("Hi");
  }
the animate works at enlarging the width but the if wont see it
tonytrap
@tonytrap
Feb 24 2017 15:32
yes i do that and then the error reads " unexpected token }"
Jakumozo
@Jakumozo
Feb 24 2017 15:32
@SkyCoder01 hi! :) thank you, as always helpful
CamperBot
@camperbot
Feb 24 2017 15:32
jakumozo sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 317 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Geekomatic
@Geekomatic
Feb 24 2017 15:33
@tonytrap Are you on codepen ?
Gulsvi
@gulsvi
Feb 24 2017 15:33
Hi @Jakumozo just stopping in between JS challenges :) glad I could help
tonytrap
@tonytrap
Feb 24 2017 15:34
yes @Geekomatic
Gulsvi
@gulsvi
Feb 24 2017 15:34
@charlesdarkwind What code triggers your if statement?
Geekomatic
@Geekomatic
Feb 24 2017 15:34
Give me the link and I'll see what's wrong @tonytrap
Jasmin Parent
@charlesdarkwind
Feb 24 2017 15:35
@SkyCoder01 if width > 35 px
emamadordev
@emamadordev
Feb 24 2017 15:36
@fhdhsni I know that the design is going to be an approximation and not exactly but you're right. like the top image in the first section doesn't scale the way I want it to for some reason.
Gulsvi
@gulsvi
Feb 24 2017 15:36
@charlesdarkwind I mean, when does your if(width > 35) run? Try adding an else to see what's going on in there.
  if ($('.navBut1').width() > 35) {
    console.log('hi');
    $('.navBut1').text("Hi");
  } else {
    console.log('less than 35')
  }
Jasmin Parent
@charlesdarkwind
Feb 24 2017 15:37
@SkyCoder01 ok, they are both right in the document ready func
Geekomatic
@Geekomatic
Feb 24 2017 15:37
@tonytrap line 4 : });};. Remember to reread your code and close the parenthesis and brackets in the right order.
Gulsvi
@gulsvi
Feb 24 2017 15:38
@charlesdarkwind Okay, so it runs when the document is loaded once. If the element is less than 35px, it doesn't log the word "hi"
M Mohsin Raza Danish
@mohsinrazadanish
Feb 24 2017 15:38
Hello
Hello people
Jasmin Parent
@charlesdarkwind
Feb 24 2017 15:39
@SkyCoder01 yea its 19px at the start
Geekomatic
@Geekomatic
Feb 24 2017 15:40
@tonytrap and then to make it work just call your function either after or before.
tonytrap
@tonytrap
Feb 24 2017 15:41
@Geekomatic thanks so much this was very frustrating i felt like i had tried every combination will read more diligently thanks again
CamperBot
@camperbot
Feb 24 2017 15:41
tonytrap sends brownie points to @geekomatic :sparkles: :thumbsup: :sparkles:
:cookie: 333 | @geekomatic |http://www.freecodecamp.com/geekomatic
Farhad
@fhdhsni
Feb 24 2017 15:41
@emamador not relevant but I think it would be better if you put your stuff on github.
@emamador not a guru, but let me know if you need any help
Gulsvi
@gulsvi
Feb 24 2017 15:42
@charlesdarkwind I think this is kind of what you're trying to do?
  $(".navBut1, .navBut2, .navBut3").hover(function() {
    $(this).stop(true, false).animate({width: "70px"}, function() {
      console.log('hi');
      $(this).text('Hi');
    });
  }, function() {
    $(this).stop(true, false).animate({width: "19px"});
  });
Add a comma after your .animate to run more code when the animation is complete
Jasmin Parent
@charlesdarkwind
Feb 24 2017 15:44
@SkyCoder01 my man! thanks, i think jquery cant see new elements/sizes etc
CamperBot
@camperbot
Feb 24 2017 15:44
charlesdarkwind sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 318 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 24 2017 15:44
:) I love .animate() had so much fun with it in my wikipedia project lol
Jasmin Parent
@charlesdarkwind
Feb 24 2017 15:45
hehe yea im starting to get the grip
emamadordev
@emamadordev
Feb 24 2017 15:45
@fhdhsni as in host it on github? or just upload the files on github? I need to learn to use it. I always forget. I should do that today.
Farhad
@fhdhsni
Feb 24 2017 15:49
@emamador I mean the code so future employers can read them. I think it doesn't matter where do you host it.
emamadordev
@emamadordev
Feb 24 2017 15:50
@fhdhsni oh.
@fhdhsni oh ok. I will upload it to github then. thanks
CamperBot
@camperbot
Feb 24 2017 15:51
emamador sends brownie points to @fhdhsni :sparkles: :thumbsup: :sparkles:
:cookie: 316 | @fhdhsni |http://www.freecodecamp.com/fhdhsni
Tricia Johnson
@triciajohnson
Feb 24 2017 16:09
hi all - how can i center an image using bootstrap?
Ben Carp
@carpben
Feb 24 2017 16:12

Hi, I would like some help with the wikipedia Viewer task. I'm trying to build the Request to the wikipedia API. Using the WIKI API Sandbox I build this url, for instance for the topic 'basketball'- https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=basketball&limit=10&profile=normal
. this url opens in the browser perfectly, but when I send a request, for example:

$.getJSON(url, function(data){

          console.log(data)
        })

I get an error (See following image). I thought this might have to do with the Origin parameter. I tried adding https://codepen.io/ as origin but it failed. Any suggestions?

blob
Nirjhar Oberoi
@nirjharoberoi
Feb 24 2017 16:19
Hello
Can anyone tell me what is a user story? I am doing the Tribute Page Challenge
h1tag
@h1tag
Feb 24 2017 16:25
@carpben can you provide the link to your pen?
@nirjharoberoi a user story is a requirement
Andrew Nichols
@frenata
Feb 24 2017 17:11
Yeah, it's just Agile lingo for "requirement"
Gulsvi
@gulsvi
Feb 24 2017 17:17
@carpben Stack Overflow to the rescue :) http://stackoverflow.com/a/38921370
@triciajohnson This codepen shows how depending on the version of bootstrap you have: http://s.codepen.io/skycoder/pen/xqbGor
Manuel Reyes
@Androbat
Feb 24 2017 17:20
@carpben Try cutting your route. I used to have this kind of errors.
Ken Haduch
@khaduch
Feb 24 2017 17:26
@nirjharoberoi - another way to think about it, besides "requirement" is that it is a description of something that a user of your site would want or need to do. It is a very general description of the activity, and you, as developer of the site, would best determine the way that they could accomplish it.
Kmakks
@Kmakks
Feb 24 2017 17:30
hii
can someone critice my design and help me reflect on it ?
Tom
@moT01
Feb 24 2017 17:42
@Kmakks lets see it
Kmakks
@Kmakks
Feb 24 2017 17:42
@moT01 1 min i need to upload it online
Mercy Manrique
@mers89
Feb 24 2017 17:48
Hello. Is someone familiar with hosting on github. Ive been having an issue with my javascript external link linking to my html. From what I have read chrome does not allow external js to being loaded to prevent things just incase there's maleware. Is this correct?
Gulsvi
@gulsvi
Feb 24 2017 17:58
@mers89 It should work fine, I've seen other people put their portfolios on github here with external links to jQuery and even their own .js files
Ken Haduch
@khaduch
Feb 24 2017 17:58
@mers89 -Hello - it could be that you are loading the top-level page with https:// and the script with http://? Or maybe not - there are definitely problems with doing that. Are you getting an error in your console that describes what is going on? I mean, we're always loading jquery and bootstrap.js from other sites - so it must be allowed in some cases?
Gulsvi
@gulsvi
Feb 24 2017 17:59
Can you share the github.io page to investigate?
Ben
@BenQ77
Feb 24 2017 18:06
hi
Ken Haduch
@khaduch
Feb 24 2017 18:18
@mers89 - it looks like you are loading some CSS and JS multiple times? Not sure if that might be a source of problems with the page? Although it looks pretty close to the CodePen version?
@mers89 - well, I see that the footer looks quite a bit different.
Mercy Manrique
@mers89
Feb 24 2017 18:21
yes, the actual links should load seperately. the portfolio should have a hover effect
Ken Haduch
@khaduch
Feb 24 2017 18:21
@mers89 - on your github version, your <style> section is after the end of </head> - that's not correct. If you load your page in FireFox, and then right click and "View Page Source", you'll see a lot of things highlighted in RED - they show things that are not valid - quite a few things are being flagged.
Mercy Manrique
@mers89
Feb 24 2017 18:21
meaning the portfolio, about me, and contact
what do you mean loading css and js multiple times. I have 10 libraries
ok let me try the firefox "view page source"
Ken Haduch
@khaduch
Feb 24 2017 18:24

@mers89 - there are problems with unclosed elements, illegal HTML constructs.

I see in the developers console that it looks like it is loading things over and over, unless I did something wrong - this is the list from the console:

GET 
https://mers89.github.io/portfolioM/ [HTTP/1.1 200 OK 35ms]
GET 
https://mers89.github.io/portfolioM/index.js [HTTP/1.1 200 OK 34ms]
GET 
https://fonts.googleapis.com/css [HTTP/2.0 200 OK 130ms]
GET 
https://fonts.googleapis.com/css [HTTP/2.0 200 OK 129ms]
GET 
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css [HTTP/2.0 200 OK 26ms]
GET 
https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.2/css/font-awesome.min.css [HTTP/2.0 200 OK 122ms]
GET 
https://cdnjs.cloudflare.com/ajax/libs/foundation/5.2.2/css/foundation.css [HTTP/2.0 200 OK 126ms]
GET 
https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js [HTTP/2.0 200 OK 120ms]
GET 
https://cdnjs.cloudflare.com/ajax/libs/jquery-smooth-scroll/1.7.2/jquery.smooth-scroll.min.js [HTTP/2.0 200 OK 120ms]
GET 
https://cdnjs.cloudflare.com/ajax/libs/foundation/5.3.0/js/foundation.min.js [HTTP/2.0 200 OK 119ms]
GET 
https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js [HTTP/2.0 200 OK 97ms]
GET 
https://cdnjs.cloudflare.com/ajax/libs/foundation/5.2.2/css/foundation.css [HTTP/2.0 200 OK 41ms]
GET 
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css [HTTP/2.0 200 OK 26ms]
Gulsvi
@gulsvi
Feb 24 2017 18:25
@mers89 Create a 'gh-pages' branch so you can load it and debug it better. I notice your <script> tags are all in <head> but should be at the end of <body> before the closing </body> tag.
Also, you have an error accessing bootstrap.min.js because of a spelling error:
https://maxcdn.bootstrapcdn.com/boostrap/3.3.6/js/bootstrap.min.js (boostrap instead of bootstrap)
Ken Haduch
@khaduch
Feb 24 2017 18:27
@mers89 - although some of those multiples could just be the way that they are displayed, but you definitely have jquery.min.js in there twice.
Gulsvi
@gulsvi
Feb 24 2017 18:27
The biggest issue is loading index.js before any of the other scripts
index.js requires those other scripts
Take all your <script>s and move them to the end before your closing </body> tag, in this order @mers89
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/boostrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-smooth-scroll/1.7.2/jquery.smooth-scroll.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.3.0/js/foundation.min.js"></script>
<script type="text/javascript" src="index.js"></script>
Ken Haduch
@khaduch
Feb 24 2017 18:30

@mers89 - the problem with the <style> section might be that you have the <style> section declared in your CodePen HTML panel - that's a no-no. (For CodePen, that is.) It might just be a cut-and-paste thing, but you also have the <head> tag, also a no-no in CodePen. Many illegal things like <p><p></p></p> - again, may be cut and paste issues on some things? But I don't know if you can get a valid comparison between what you're getting out of CodePen's rendering of your page and what you are getting out of your github page.

Definitely a lot of cleanup is needed!

Gulsvi
@gulsvi
Feb 24 2017 18:33
Agreed :) ^^ All of your code in codepen is wrapped <head> that's not what the <head> tag is for :/
Mercy Manrique
@mers89
Feb 24 2017 18:37
thanks so much @khaduch and @SkyCoder01 . Appreciate the suggestions. Definately I have to clean it up.
CamperBot
@camperbot
Feb 24 2017 18:37
mers89 sends brownie points to @khaduch and @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 322 | @skycoder01 |http://www.freecodecamp.com/skycoder01
:star2: 2535 | @khaduch |http://www.freecodecamp.com/khaduch
Mercy Manrique
@mers89
Feb 24 2017 18:38
I didnt know if it was something I had coded or if it was a chrome thing.
The Great Cthulhu
@Ghoststorm34
Feb 24 2017 18:38
Hey guys, I'm working on a personal project and I need some help seperating the first text with a <hr> tag, but the <hr> tag makes a ugly line. I need a way to either hide the line while keeping the seperation or a new way to seperate them. Here's my project: http://codepen.io/Ghoststorm34/pen/pRVjdm
Gulsvi
@gulsvi
Feb 24 2017 18:38
I always assume it's me lol :)
Ken Haduch
@khaduch
Feb 24 2017 18:41
@mers89 - the funny thing is that sometimes browser adjust for errors, so that can fool you into thinking that things are right, but then sometimes they are close, other times things are just plain broken. The other thing to check out is the html validator - that is a handy tool to use. https://validator.w3.org/ - you should check that out...
Gulsvi
@gulsvi
Feb 24 2017 18:44
@Ghoststorm34 instead of <hr> use border in your CSS
Mercy Manrique
@mers89
Feb 24 2017 18:45
@khaduch that is a real handy tool
famousmighodaro
@famousmighodaro
Feb 24 2017 18:45

@Ghoststorm34 you can use this code to work on it hr{
margin-top:10px;
margin-bottom:50px;
border: 0;
height: 1px;
background: #333;

opacity:0.1;

}

The Great Cthulhu
@Ghoststorm34
Feb 24 2017 18:46
Thanks that's perfect
@camperbot How do I give cookies?
famousmighodaro
@famousmighodaro
Feb 24 2017 18:48
Hello Guys i am working on my personal portfolio webpage now and i want to use the bootstrap scrolspy but i can find were to add element inside my open body tag on codepen
Larry Hawkins
@HawkinsLJ
Feb 24 2017 18:49
Hi all, working with codepen but my bootstrap navbar code is not rendering. Checked the code and it is legit, can someone take a look at my codepen settings? I think that is where the issue is
The Great Cthulhu
@Ghoststorm34
Feb 24 2017 18:50
@HawkinsLJ Have you turned quick-added Bootstrap to codepen?
Larry Hawkins
@HawkinsLJ
Feb 24 2017 18:51
yes I have added Boostrap.css and also jQuery.js and Bootstrap.min.js as well
Larry Hawkins
@HawkinsLJ
Feb 24 2017 18:51
oh man
that is it
so what's with the 4.0.0 release not rendering?
Is it a bug or is there something new we need to learn in order to render?
Johnny
@jtan3
Feb 24 2017 18:52
it has different terms used
if you want to learn version 4 you should look it up
Larry Hawkins
@HawkinsLJ
Feb 24 2017 18:56
looks like my toggle button is not working when i resize the screen to less than 768 px
will i need to change the bootstrap.js file to an older one as well?
famousmighodaro
@famousmighodaro
Feb 24 2017 19:04
Hello Guys how can i use bootstrap scrollspy on codePen?
Gulsvi
@gulsvi
Feb 24 2017 19:04
@HawkinsLJ Yes, 4.0 is a completely new version. Here are the Bootstrap 3 files: https://www.bootstrapcdn.com/
Larry Hawkins
@HawkinsLJ
Feb 24 2017 19:05
@SkyCoder01 Thanks
CamperBot
@camperbot
Feb 24 2017 19:05
hawkinslj sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 323 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 24 2017 19:05
@famousmighodaro I made an example the other day: http://s.codepen.io/skycoder/pen/KaYQoQ
If you're having trouble, feel free to share your pen. Maybe we can spot something.
famousmighodaro
@famousmighodaro
Feb 24 2017 19:07
@SkyCoder01 thanks this your code is a life saver, i have spot my mistake.
CamperBot
@camperbot
Feb 24 2017 19:07
famousmighodaro sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 324 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Marek Jedliński
@marekjedlinski
Feb 24 2017 19:09
Hi all! For the "tribute page" (or any other challenge) is it OK to use content licensed under a Creative Commons license, with attribution? I have the page all coded and ready, but re-writing in my own words what's already been written a hundred times by other people seems rather pointless...
Manuel Almeida
@netstudenton
Feb 24 2017 19:16

Why am I getting this message:
Uncaught Error: Bootstrap tooltips require Tether (http://tether.io/)

https://codepen.io/netstudent/pen/LWEGKp?editors=1111

iso
@iso1048
Feb 24 2017 19:18
Ho do I horizontally centre a font awesome icon?
Gulsvi
@gulsvi
Feb 24 2017 19:20
@netstudenton Because you don't have Tether set up. Add it before bootstrap.min.js in your codepen settings: https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js
@gothamknight use text-align: center on the parent container
Manuel Almeida
@netstudenton
Feb 24 2017 19:24
@SkyCoder01 Thank you my friend
CamperBot
@camperbot
Feb 24 2017 19:24
netstudenton sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 325 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 24 2017 19:25
You're welcome!
iso
@iso1048
Feb 24 2017 19:25
Thanks @SkyCoder01
CamperBot
@camperbot
Feb 24 2017 19:25
gothamknight sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 326 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 24 2017 19:25
No problem!
Manuel Almeida
@netstudenton
Feb 24 2017 19:25
@SkyCoder01 My well is not working can you say me why ?
iso
@iso1048
Feb 24 2017 19:25
Out of interest, why can you not add the class to the <i> element?
Gulsvi
@gulsvi
Feb 24 2017 19:26
Sure, I'll take a look @netstudenton
I'm not sure @gothamknight, I should try to figure that out though...maybe because <i> is inline? like <img>
@netstudenton You are using Bootstrap 4, and in Bootstrap 4, they don't have a well class. That's only in bootstrap 3. Here are the bootstrap 3 files (which don't require tether!): https://www.bootstrapcdn.com/
@netstudenton It looks like this is how they do wells in Bootstrap 4: https://v4-alpha.getbootstrap.com/components/card/
Manuel Almeida
@netstudenton
Feb 24 2017 19:29
@SkyCoder01 thank you again god bless you
CamperBot
@camperbot
Feb 24 2017 19:29
netstudenton sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: netstudenton already gave skycoder01 points
Gulsvi
@gulsvi
Feb 24 2017 19:31
@gothamknight It looks like you could do this too if you don't want a parent container with text-align: center, for example with the free code camp icon:
.fa-free-code-camp {
  display: block;
  text-align: center;
}
Christopher
@bradley1492
Feb 24 2017 19:41
Hello, I am just doing the local weather app and trying to exchange the default icons from the openweathermap with the ones from erik flowers. Now in the instruction on how to use his weather icons, it says to place his css file in your own css folder. Then one also has to place the font file in a font directory. So I understand the principle about this but how can i create a font directory when using codepen?
René
@RenevandenHeuvel
Feb 24 2017 19:51

Hi everyone:

Challenge: "Build a Personal Portfolio Webpage"

  1. Objective: Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/FreeCodeCamp/full/YqLyXB/.

Question: What appears after going to the link provided above look like a webpage. Why is it called an app?

Gulsvi
@gulsvi
Feb 24 2017 20:03
@bradley1492 You can't create your own folder unless you become a pro member and pay money, but you can reference those icons here it looks like: https://cdnjs.com/libraries/weather-icons
Just add the URL to your CSS settings in codepen, the same as Font Awesome or Bootstrap.css
@RenevandenHeuvel I think if a web page uses javascript, it can be called an application. Lots of websites are called "Single Page Applications" or SPAs
René
@RenevandenHeuvel
Feb 24 2017 20:07
@SkyCoder01 Hmm, ok. thx
CamperBot
@camperbot
Feb 24 2017 20:07
renevandenheuvel sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 327 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Manuel Reyes
@Androbat
Feb 24 2017 20:09
@RenevandenHeuvel Is that a free code camp challenge?
@RenevandenHeuvel I mean the portafolio.
Ajay Tanwar
@ajayt365
Feb 24 2017 20:21
hey why people use vue and react nowadays ? what's the problem with html/css/js/jquery ?
alpox
@alpox
Feb 24 2017 20:23
@ajayt365 These are totally different things. They fulfill different purposes.
Vue and react give you a way to create web components means components which render as html and have a redraw cycle.
jQuery is only a framework which makes access to the DOM easier - it gives you utility functions.
Ajay Tanwar
@ajayt365
Feb 24 2017 20:25
redraw cycle @alpox ?
alpox
@alpox
Feb 24 2017 20:26
@ajayt365 If you use only html/css/js/jqueryas you say, you don't have a structured way to handle stateful applications unless you build up a good application wide logic for it yourself.
It fits usually only for webpages with not too much functionality.
If you build business applications/apps with a lot of communication and data handling, jquery doesn't help you much.
@ajayt365 With redraw cycle i mean that as example react defines the html in javascript - and the html output depends on the given state - an object which holds the current state of your application.
As soon as the state object alters through any modification, the component redraws itself
Ajay Tanwar
@ajayt365
Feb 24 2017 20:28
stateful applications ? @alpox
@alpox state object ? do u mean that an object which holds data for the view layer ?
alpox
@alpox
Feb 24 2017 20:29
@ajayt365 Exactly. A state defines how the view is drawn
Its just an object with values
Ajay Tanwar
@ajayt365
Feb 24 2017 20:31
how the view will depend on css . by state it's just what will be shown in the view. isn't it ?
alpox
@alpox
Feb 24 2017 20:31
If you use as example jQuery, you make direct changes on the DOM - on the view through selecting elements and alter them. This leads to the fact that its really hard to track changes and the state of the application. It makes error tracking complicated.
The css defines only styles of the view. The view itself the html.

When you have as example a webpage where you can toggle that a background image is shown or not, with jquery you would just change the background through setting a class or removing it - or insert an img tag or whatever.
With react, you have state. So there is an object holding a variable which indicates if the background should be shown or not:

this.setState({
    showBackground: true
});

and the html you express in javascript too as:

<div className={this.state.showBackground ? "with-background" : ""}></div>
alpox
@alpox
Feb 24 2017 20:38
@ajayt365 This structure helps to keep track of the current state of your application, easily track all changes on the app etc. You can be sure about the state of your app at all times.
Franco Javier Danussi
@francodanussi
Feb 24 2017 20:45
Hello there. I've just finished my calculator in Javascript. I would be glad to have some feedback about JS part and the functions I used. Maybe get some suggestions on how to improve the project, etc.
https://codepen.io/francodanussi/pen/JEgVYo
Manuel Almeida
@netstudenton
Feb 24 2017 20:58
@francodanussi it's working here !
Franco Javier Danussi
@francodanussi
Feb 24 2017 21:00
@netstudenton I know! I posted the pen hoping someone to give me a code review or smth like that
Tom
@moT01
Feb 24 2017 21:07
@francodanussi looks pretty good
i didn't go through it all but it seems pretty functional with not a whole lot of code
which is good
all those ins# functions could probly combined into one as well to make it even less
if you find yourself writing the same or very similar code more than two or three times there's probly a way to make it better
Annetta Ives
@IvesNoIdea
Feb 24 2017 21:10

Hi all, I've finally got my Wikipedia Viewer to a point where it satisfies the user stories for the challenge.

But there's one thing about it that is bugging me: when I search for something that has less that 10 results (try 'Lancashire hotpot' if you want to see what I mean), I get the returned results, plus a few leftover 'Read more' links.

Is there any way I can stop the dead links from appearing when there is no associated content?

Tom
@moT01
Feb 24 2017 21:11
@francodanussi also, try working with some decimals
Tom
@moT01
Feb 24 2017 21:18
cause your html is already filled with that content @IvesNoIdea
Annetta Ives
@IvesNoIdea
Feb 24 2017 21:21
@moT01 Is there a way to only fill the HTML if there is associated content? I considered leaving the <a> </a> empty and putting $("#url01").text("Read more..."); in the script for each entry, but I figured that would just put it in every entry anyway, and I'd be back to square one.
Gulsvi
@gulsvi
Feb 24 2017 21:22
@IvesNoIdea You have a bunch of static HTML that needs to be deleted when the json length is not long enough to fill it. Or you could dynamically create all those result divs with something like:
      for (var i = 0; i < json[1].length; i++) {
        $('.results-panel').append(
          `<div class="result" id="result0${i}">
            <h2 id="title0${i}">${json[1][i]}</h2>
            <p id="snippet0${i}">${json[2][i]}</p>
            <p><a href="${json[3][i]}" id="url0${i}">Read More...</a></p>
          </div>`
        );
DanielGroenewegen
@DanielGroenewegen
Feb 24 2017 21:22
Hey chaps, can anyone help with making a block quote?
Gulsvi
@gulsvi
Feb 24 2017 21:22
That way you don't need anything between <div class="results-panel"></div> All the JS populates it for you.
We can try @DanielGroenewegen :)
@IvesNoIdea Similarly with your background switch statement, you could reduce that to a couple of lines by choosing a random number from 1-10 and then do $("body").addClass("bkg0" + randomNumber)
Tom
@moT01
Feb 24 2017 21:25
@IvesNoIdea yea, i would go with something like what @SkyCoder01 said
start out with an emtpy div in your html
and populate it from there
Annetta Ives
@IvesNoIdea
Feb 24 2017 21:25
@SkyCoder01 So instead of setting up all the result divs in the HTML ahead of time, they only come into existence when there is content to go in them, right?
How does that bit with the title0${i} work? Does it mean 'replace this $ with the value of i to select the element with that id'?
Gulsvi
@gulsvi
Feb 24 2017 21:26
@IvesNoIdea It means replace ${i} with the value of i in the for loop. It's a variable placeholder of sorts (I don't know the official name).
Annetta Ives
@IvesNoIdea
Feb 24 2017 21:27
@SkyCoder01 Cool, thanks. I'll give it a go!
CamperBot
@camperbot
Feb 24 2017 21:27
ivesnoidea sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 329 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 24 2017 21:28
@DanielGroenewegen Did you have a question about making a blockquote?
Franco Javier Danussi
@francodanussi
Feb 24 2017 21:31
@moT01 Yeah, I thougth exactly as you about that ins functions. I'm going to find another way to code that. Btw, thanks for the review.
CamperBot
@camperbot
Feb 24 2017 21:31
francodanussi sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 532 | @mot01 |http://www.freecodecamp.com/mot01
Franco Javier Danussi
@francodanussi
Feb 24 2017 21:36
In fact, I just did it! I passed the number as an argument in the hmtl. That way I was able to delete 50 lines of code.
Gulsvi
@gulsvi
Feb 24 2017 21:37
@francodanussi Your calculator doesn't seem to work all the time. I can't subtract decimals and it lets me add multiple decimals in a row.
I mean, I can subtract decimals, but the answer is wrong

You might also want to add this CSS:

.btn:focus {
  outline: none;
}

I see a blue box around the buttons when I click them unless I add that CSS

Also, if I double-click a +,-,x,/ button it doesn't calculate, but that's me just getting into mischief perhaps :)
Franco Javier Danussi
@francodanussi
Feb 24 2017 21:40
@SkyCoder01 Are you sure? I tried several combinatios. I've just made some changes. If you wish you can check to substract decimals now. Works for me!
Gulsvi
@gulsvi
Feb 24 2017 21:40
Okay, I'll reload the pen and try
@francodanussi .9-.8 gives me 0.09999999999999998
I can also enter numbers in the screen with my keyboard but they don't seem to work for calculating
Franco Javier Danussi
@francodanussi
Feb 24 2017 21:44
@SkyCoder01 Thanks, I have some things to improve now,
CamperBot
@camperbot
Feb 24 2017 21:44
francodanussi sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 331 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 24 2017 21:44
No problem, I'll write those down for when I finally get to that project. Only about 12 more algorithms to go I think
Franco Javier Danussi
@francodanussi
Feb 24 2017 21:44
You were right about decimals, weird stuff..
Gulsvi
@gulsvi
Feb 24 2017 21:45
Yeah, different numbers give different results too - really close, but not quite the right answer
Franco Javier Danussi
@francodanussi
Feb 24 2017 21:46
Yeah, smoke gets in my eyes when I deal with decimals in javascript..
Gulsvi
@gulsvi
Feb 24 2017 21:57
@francodanussi I was curious... it looks like something called floating point precision. They explain it here: https://www.w3schools.com/js/js_numbers.asp
The fix is to multiply the decimal by a number that makes it an integer, do the math, then divide back again to get the final answer. Sounds like a pain :(
Franco Javier Danussi
@francodanussi
Feb 24 2017 22:00
Jej, @SkyCoder01 , I saw that before, now I remember it. It's a good practice in JS, must be the most extended way to avoid this kind of problems. Thanks for sharing
CamperBot
@camperbot
Feb 24 2017 22:00
francodanussi sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: francodanussi already gave skycoder01 points
Lalith Kishore
@dantetheshadeslayer
Feb 24 2017 22:01
guys
I need help
designing a site for the first time
but I'm not able to stack bootstrap elements on the same line
and when I want them one below the other I don't know how to get them to do that
Can someone help?
Lalith Kishore
@dantetheshadeslayer
Feb 24 2017 22:02
Is that for me
Franco Javier Danussi
@francodanussi
Feb 24 2017 22:06
@dantetheshadeslayer Yes, try that approach to stack or relocate elements, might be your cup of tea if you give that a try
Lalith Kishore
@dantetheshadeslayer
Feb 24 2017 22:09
Thanks!
Do you suggest I use span or col tags on bootstrap?
Im checking out flex-bit rn
flex-box* sorry
Ben Carp
@carpben
Feb 24 2017 22:11
@skycoder THANKS
CamperBot
@camperbot
Feb 24 2017 22:11
carpben sends brownie points to @skycoder :sparkles: :thumbsup: :sparkles:
:warning: @skycoder's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
Manuel Almeida
@netstudenton
Feb 24 2017 22:30
Why Am I getting undefined id from attr('id') (line 14)
http://codepen.io/netstudent/pen/LWEGKp?editors=1011
Justin Jones
@koreanjones
Feb 24 2017 22:40
hello people, i am starting with the build a random quote machine now i am a bit intimidated by this should i start just by using the layout of the webpage first with html and css then add in javascript?
Johnny
@jtan3
Feb 24 2017 22:42
@koreanjones that's a good start
Chris
@bestintown23
Feb 24 2017 23:20
how can i make the enter site page have the fade in effect when it comes on the screen instead of popping up? https://codepen.io/bestintown23/full/VpZGyK/
Ben Carp
@carpben
Feb 24 2017 23:22

hi everyone, take a look at this html

<main>
  <a src="https://developer.mozilla.org/en-US/"><div><p>Mozilla</p></div></a>
</main>

In this pen: https://codepen.io/bencarp/pen/NdQNJr
For some reason it does not show. Any idea?

Finagl3
@Finagl3
Feb 24 2017 23:26
I would like assistance with the counting card challenge. for some reason 7, 8, 9 isn't passing, and I can't figure out why...
Johnny
@jtan3
Feb 24 2017 23:27
@carpben the word mozilla is there its just hidden
@carpben make the color white for you p tag
@carpben and its <a href> not <a src=>
Johnny
@jtan3
Feb 24 2017 23:41
@carpben instead of <main> <a src="https://developer.mozilla.org/en-US/"><div><p>Mozilla</p></div></a> </main>

@carpben ```

<div class="main> stuff</div>

Spyrantis Theodoros
@thodorisanta
Feb 24 2017 23:45

I need help with my calculator.. so when i press those buttons "5+3=-2" meaning add 5 and 3 and substract 2 from the result. the result should have been 6 since "5+3=8 and 8-2=6" but instead i have 9:/
can you please take a look in my code? I tried to do some changes but then when i tried to do "5+3-2*2" that didnt gave me a correct result. So i wanna make both options work.

https://codepen.io/oshikurou/pen/jyKLyg?editors=0011