Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 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
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
rdollent
@rdollent
uhhuh for sure
John
@flyboy1565
thanks again
rdollent
@rdollent
also do length === 0 always use strict === not ==
AbrisM
@AbrisM
@AbrisM
Hi everyone
Is there a networking channel available on GITTER?
Ben Hart
@Benjmhart
hey folks, anyone in here have experience with d3 force charts?
Frank Bono
@frankbono
Quick question. Do I need to learn ES6 before learning React?
Tiago Correia
@tiagocorreiaalmeida
would help in quite a few stuff
Stephen James
@sjames1958gm
@frankbono Well, React uses es6 classes and arrow functions are useful
Frank Bono
@frankbono
@sjames1958gm Ok, I'm on it. Thanks man!
CamperBot
@camperbot
frankbono sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9058 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
@frankbono good luck!
Tom
@moT01
@Benjmhart whats the problem - youre best to just say what the problem is
neovks
@neovks
hey, I have an issue since last night can't figure this out... I'm on the portfolio project, and I've set up a clickable thumbnail to access a project but when I try to put it in a row the border suddenly get huge and I don't know why, if someone have an idea (it's the twitch thumbnail at the bottom)... thanks
Gulsvi
@gulsvi
@neovks It's in a row currently and the border doesn't look huge - maybe I'm misunderstanding
neovks
@neovks
aye it's in a row and the border isn't supposed to be that huge width wise, it's back to normal if I delete the row so that's weird
Gulsvi
@gulsvi
@neovks I think you may have more luck using a bootstrap card:
      <div class="row">
        <div class="col-4">
          <a class="btn" href="https://twitch.tv" target="_blank">
            <div class="card bg-dark text-white p-1">
              <img class="card-img-top" src="https://is1-ssl.mzstatic.com/image/thumb/Purple118/v4/6f/49/45/6f494545-6815-ff9b-eaf4-22b0e843070a/TwitchAppIcon-1x_U007emarketing-85-220-0-6.png/246x0w.jpg">
              <h3 class="card-title mt-4">twitch</h3>
            </div>
          </a>
        </div>
      </div>
The reason why it's expanding out like that is because it's in a col-4 which is meant to be 33% the width of the row. You have some additional CSS making it 200px wide by default.
col is meant to get wide/narrow depending on the size of the screen
neovks
@neovks
I see well I'll look into that then, thanks @gulsvi
CamperBot
@camperbot
neovks sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
:star2: 2640 | @gulsvi |http://www.freecodecamp.org/gulsvi
Eric Hasegawa
@EricHasegawa
Can anyone help me with the Simon Game project? Having trouble using the .focus() jQuery method
Ken Haduch
@khaduch
@EricHasegawa - do you have a link to your project, we can take a look...
Eric Hasegawa
@EricHasegawa
The issue is on line 71 of the js
Ken Haduch
@khaduch
@EricHasegawa - I don't know what's wrong with .focus() - but there might be something about the way you are using it. Still looking. IN the meanwhile, changing from.focus() to .click() makes the handler fire.
Eric Hasegawa
@EricHasegawa
@khaduch Yeah I'm working on it, I think I'm getting there
Ken Haduch
@khaduch
@EricHasegawa - yeah, it seems to be working now - at least I uncommented the code and tried the .focus() again and it changes the color... did you have multiple handlers set up, perhaps?
@EricHasegawa - at least it is working once, then something seems to go awry...
Eric Hasegawa
@EricHasegawa
@khaduch Thanks! using a different method
CamperBot
@camperbot
erichasegawa sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3774 | @khaduch |http://www.freecodecamp.org/khaduch
Gulsvi
@gulsvi
@EricHasegawa You may want to blur() the element after it has focus(), and jQuery has a delay() method you can use instead of setTimeout if preferred:
$("#red").focus(function() {
  $("#red")
    .css("box-shadow", "0 0 10px 15px yellow")
    .delay(5000)
    .queue(function() {
      $("#red").css("box-shadow", "none").blur();
    });
});
Ken Haduch
@khaduch

@EricHasegawa - that sounds like a good idea that @gulsvi has. I find that if I use the .focus method, which I set up to alternate colors between red and black, that unless I get the red button "unfocused" (which would be blur) that it will not trigger the focus handler again.

Another good idea with jquery is to cache the various selectors that you are using, jquery goes through a lot of contortions to find things - so you could create variables like this:

var $red = $("#red");
var $blue = $("#blue");

// and use them like this:
$red.css("background-color", "black");

That would mean that instead of jquery going through gobs of code to find the element each time, you would only do that once and then just use the cached information to access it with the various jquery methods.

Gulsvi
@gulsvi
^That's a great suggestion. If you don't expect to call $("#red") anywhere else, you could speed up that method above with:
$("#red").focus(function() {
  var $this = $(this);
  $this
    .css("box-shadow", "0 0 10px 15px yellow")
    .delay(5000)
    .queue(function() {
      $this.css("box-shadow", "none").blur();
    });
});
Ken Haduch
@khaduch
@gulsvi - great tips - I haven't used jquery queue at all - I'll have to remember that, probably will come in handy sometimes - thanks!
CamperBot
@camperbot
khaduch sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
:star2: 2641 | @gulsvi |http://www.freecodecamp.org/gulsvi
Gulsvi
@gulsvi
@khaduch Thank you too! A jQuery Promise also works :)
$("#red").focus(function() {
  var $this = $(this);
  $this
    .css("box-shadow", "0 0 10px 15px yellow")
    .delay(5000)
    .promise()
    .done(function() {
      $this.css("box-shadow", "none").blur();
    });
});
CamperBot
@camperbot
gulsvi sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3775 | @khaduch |http://www.freecodecamp.org/khaduch
Daniel
@DanJP2016
working out the javascript for the tic tac toe challenge. I'm thinking the best approach would be to have a core function keep track of the game state and update the board instead of letting the player clicks fire everything off, but I am at a loss and open to suggestions.
Apollo
@enigmacipher
in mdn's cascade and inheritance page, it says "The only way to win against an ID selector is to use !important", but we can win against ID selectors with inline styles o.O
Is there something I'm missing
Bin Gao
@gaobin1019
"Inline styles added to an element (e.g., style="font-weight:bold") always overwrite any styles in external stylesheets, and thus can be thought of as having the highest specificity."
Apollo
@enigmacipher
Thanks @gaobin1019