by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 14 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 22:38
    @bjorno43 banned @real-action
  • Feb 01 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
NathanMcSparran
@NathanMcSparran
you're welcome
ADIL KARMOUZI
@mradil16

Hi everyone . I don't know why jQuery doesn't work when I resize the browser, but it works fine, If I refresh the page.

$(window).bind("resize", listenWidth);

     function listenWidth( e ) {
        if ($(window).width() <= 992) {  

              $(".features > .col-md-2, .features > .col-md-10").addClass("center-block");

       }

        if ($(window).width() >= 1200) {  

              $("#section3 > .col-lg-6:nth-child(1)").css("text-align" , "right");
              $("#section3 hr").css("margin-right" , "0");

       }

       if ($(window).width() <= 1200) {  

              $("#section3 > .col-lg-6:nth-child(1)").css("text-align" , "center");
              $("#section hr").removeAttr("style").addClass("center-block");

       }
    }

    listenWidth();

especially this part of code :

 if ($(window).width() <= 1200) {  

              $("#section3 > .col-lg-6:nth-child(1)").css("text-align" , "center");
              $("#section hr").removeAttr("style").addClass("center-block");

       }

when I resize the browser, the <hr> stay aligned to the right instead of being centered

runnerbill75
@runnerbill75
i have another question about using images in codepen, can i upload image stored on my own pc? I read it is good practice to resize image first then use in html as opposed to adjusting size in html...
Yevhen Diachenko
@EugeneDyachenko
Hi all, please can check out my weather project. You see your local weather?
https://codepen.io/EugeneDyachenko/full/JEeGVG/
NathanMcSparran
@NathanMcSparran
@EugeneDyachenko Sure do
runnerbill75
@runnerbill75
Hi @NathanMcSparran did you see my other question?
Gulsvi
@gulsvi
You can upload images to your github profile and access them from there. Create a repository with the name yourusername.github.io and click the "upload file" button. Then you can get them from https://yourusername.github.io/filename
NathanMcSparran
@NathanMcSparran
@runnerbill75 Sorry, I missed it. I believe CodePen does let you store images on their server, but that's a paid feature.
I think @SkyCoder01 has a better solution though.
runnerbill75
@runnerbill75
Thank you for your help @SkyCoder01
CamperBot
@camperbot
runnerbill75 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 174 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
@runnerbill75
  1. go to https://github.com/new
  2. name it yourusername.github.io
  3. Select "Initialize this repository with a README"
  4. Click "Create repository"
  5. Go to your new repository and click "Upload Files"
    Access your files at https://yourusername.github.io/filename
Fabricio Leal
@pharaohlxvi
Hey, guys, I'm doing the "quote machine" project but I can't figure out why my background color is not changing when the quote changes. Any ideas? https://codepen.io/pharaohlxvi/pen/jyvexW
By the way, I'm trying to use only vanilla JS.
runnerbill75
@runnerbill75
Ok @SkyCoder01 I created new repository, however I do not see "initialize this repository with a README"
Gulsvi
@gulsvi
@runnerbill75 You should see that before you click the "create repository" button
runnerbill75
@runnerbill75
oh ok thanks
Gulsvi
@gulsvi
You can delete it and start over again by clicking settings. I had to do that a few times :) didn't want to use the command line
@pharaohlxvi I think your syntax is wrong, check out this: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_backgroundcolor
Fabricio Leal
@pharaohlxvi
Thanks, @SkyCoder01! That seems to work! I'm intrigued though as to why can't I use this: https://developer.mozilla.org/en/docs/Web/API/Element/setAttribute
CamperBot
@camperbot
pharaohlxvi sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 175 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
@pharaohlxvi That sets an attribute and "background-color" isn't an attribute. Try it: <body background-color="red">
runnerbill75
@runnerbill75
Ok got it uploaded to github. Here is my html: <img src="https://github.com/runnerbill75/Zamperini1.jpg"/>
image not showing up on web page...
Gulsvi
@gulsvi
@runnerbill75 It looks like you created a repository named runnerbill.io not runnerbill75.github.io -- read those instructions again :)
runnerbill75
@runnerbill75
Yep, you are exactly right, can you tell I'm new at this ?haha
Gulsvi
@gulsvi
Lol, it took me three tries today
runnerbill75
@runnerbill75
Ok glad I am not only one struggling with it lol
Fabricio Leal
@pharaohlxvi
Hmmm, I see. backgroundColor is a CSS property, not an attribute. Confusing, but i'll have to accept it for now. :smile: .
Gulsvi
@gulsvi
  1. go to https://github.com/new
  2. repository name: runnerbill75.github.io
  3. Select "Initialize this repository with a README"
  4. Click "Create repository"
  5. Go to your new repository at https://github.com/runnerbill75/runnerbill75.github.io
  6. Click "Upload Files"
  7. Access your files at https://runnerbill75.github.io/filename
@runnerbill75 It may take a few minutes for the site to be created after the above steps
jamesjd54
@jamesjd54
do I need to enable anything specific on codepen to get fontawesome for buttons?
i tried enabling bootstrap but it didn't affect anything
runnerbill75
@runnerbill75
ok
Gulsvi
@gulsvi
@jamesjd54 Yes, this challenge will show you what to do: https://www.freecodecamp.com/challenges/add-font-awesome-icons-to-our-buttons
jamesjd54
@jamesjd54
sweet thanks
@skycoder01 thanks
CamperBot
@camperbot
jamesjd54 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 176 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
I don't have the link to font awesome in my history so it's easier to give that
runnerbill75
@runnerbill75
it worked, hooray!!
jamesjd54
@jamesjd54
its cool that got me right to it, issue solved
Gulsvi
@gulsvi
@runnerbill75 :clap: congrats I see the file now at: https://runnerbill75.github.io/Zamperini1.jpg
runnerbill75
@runnerbill75
awesome! I really appreciate your help.
jamesjd54
@jamesjd54
can someone link me to something that explains api's better than the freecodecamp tutorials on it?? i went throught he json and ajax stuff and am now building the quote machine but really feel i have no understands of what I'm actually doing
ive formatted my page so far and have it so my button returns something different, but i now need to actually add the api
Daniel Byun
@danielbyun
hey guys, my website is loading fine on firefox but not loading on chrome?!
works in incognito mode
Thomas Mullen
@t-mullen
@danielbyun Link to the site?