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
CamperBot
@camperbot
jeremyroe sends brownie points to @wordyallen :sparkles: :thumbsup: :sparkles:
Greg Duncan
@GregatGit
@karpimpski
for (var i = 0; i < yourArr.length; i++) {
    setTimeout(yourFucntion, 750 * i);
  }
CamperBot
@camperbot
:star: 413 | @wordyallen | http://www.freecodecamp.com/wordyallen
Jeremy Roe
@jeremyroe
http://codepen.io/jeremyroe/pen/zqGRvO?editors=0010 it’s in the StreamerBox component Line 72
Joe Narvaez
@wordyallen
@karpimpski
    setTimeout(() => {
      yourFunct();
    }, 1000)
Jeremy Roe
@jeremyroe
@wordyallen I get a undefined.state.hoverActive = true; which makes me think this isn’t bound correctly or I’m not working in the correct scope
Joe Narvaez
@wordyallen
woah dude
Michael Karpinski
@karpimpski
@wordyallen @GregatGit both of those still give me the same error where my buttons animate at the same time
Joe Narvaez
@wordyallen
this.setState({hoverActive: true}) @jeremyroe
Jeremy Roe
@jeremyroe
Ah thanks @wordyallen I’ll give that a shot
CamperBot
@camperbot
jeremyroe sends brownie points to @wordyallen :sparkles: :thumbsup: :sparkles:
:warning: jeremyroe already gave wordyallen points
Joe Narvaez
@wordyallen
you never bind state props
Greg Duncan
@GregatGit
@karpimpski don't have it start on document ready
Michael Karpinski
@karpimpski
@GregatGit I took the call out of document ready, but my error's still here
Greg Duncan
@GregatGit
@karpimpski setTimout should only be in the loop
Joe Narvaez
@wordyallen
can someone help with my portfolio?
I'm thinking of adding a physics engine
Michael Karpinski
@karpimpski
@GregatGit it is, or at least I thought. how should I set my setTimeout?
Greg Duncan
@GregatGit
@karpimpski for now comment out out your math random and switch. Make up an array to test
so put a bunch of numbers in used
Jeremy Roe
@jeremyroe
I think a physics engine is probably beyond my abilities @wordyallen but I’m happy to give a hand if I’m able
Joe Narvaez
@wordyallen
@jeremyroe how'd it go?
with setState
Michael Karpinski
@karpimpski
@GregatGit just put red blue and yellow, all toggline continuously
Jeremy Roe
@jeremyroe
tinkering with a syntax error that arose after the change but I’m pretty sure that’s the right track @wordyallen
Joe Narvaez
@wordyallen
Greg Duncan
@GregatGit
@karpimpski something simply like var used = [0, 1, 2, 3, 2, 3, 1, 2, 0];
Michael Karpinski
@karpimpski
@GregatGit that wouldn't work because used has to contain colors, not numbers
@GregatGit the numbers are generated, that var is turned into a color, then pushed to the array
Jeremy Roe
@jeremyroe
very nice @wordyallen
Greg Duncan
@GregatGit
okay just put the colours in var used
Joe Narvaez
@wordyallen
super simple dude
Michael Karpinski
@karpimpski
@GregatGit yeah, that's what I did
Greg Duncan
@GregatGit
@karpimpski now you loop through the array with setTimeout calling your function that makes the fade but the pause multiplied by the index (pause should be 500 or 750)
Michael Karpinski
@karpimpski
@GregatGit I'm not sure how to do that with my code
@GregatGit I used your example, but none of them are animating now
Greg Duncan
@GregatGit
make a function that takes in a color that does your fade - then setTimeout calls it
Michael Karpinski
@karpimpski
@GregatGit yeah, I did that
for (var i = 0; i < used.length; i++) {
    setTimeout(animate, 750 * i);
  }
}

function animate(){
  $(used[i]).fadeToggle(500);
  $(used[i]).fadeToggle(500);
}
Protsac
@Protsac
hello again :smile:
I'm in need of some help with bootstrap
Michael Karpinski
@karpimpski
@GregatGit now I did this:
 for (var i = 0; i < used.length; i++) {
    setTimeout(animate(used[i]), 750 * i);
  }
}

function animate(current){
  $(current).fadeToggle(500);
  $(current).fadeToggle(500);
}
and I'm getting the same error
Protsac
@Protsac
yeah that's better if you open the whole thing. So, my problem is I can't put the right column to show up as nicely as the left one does. And they're practically the same. what am I doing wrong?
Greg Duncan
@GregatGit
@karpimpski I have to go out now but I will check it out when i get home - you will get it
Michael Karpinski
@karpimpski
@GregatGit thanks for the help sir
CamperBot
@camperbot
karpimpski sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:star: 428 | @gregatgit | http://www.freecodecamp.com/gregatgit