Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Jun 19 2020 20:09
    @krisb1220 banned @Gastony
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 2020 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
@Ophellia Oh yeah but it still didn't solve your problem my bad
since screen sizes vary
BERTINI Nickolas
i've nested my 0 button inside a div with class col-6 which take 50% of the width, and then modify the padding inside the div
Tiago Correia
try to avoid this type of things :D I did the same mistake back then
hi everyone i just want to toggle many colors but it's only toggling one color and i dont know what wrong with my code
Abraham Anak Agung
@leet-hacks your code toggle between white and #c...
yeah but i want it to toggle between the two colors
@heroiczero tx
primuscovenant sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 2056 | @heroiczero |http://www.freecodecamp.com/heroiczero
Abraham Anak Agung
@leet-hacks which colors? Than u need if true show colors[i] if false show colors[i+1]
If u want random colors, put your colors in an array and use math.random
var colors = ['white', 'orange', 'blue']; var color = colors[Math.floor(Math.random()*colors.length)]; console.log(color); something like that and u dont need isColor variable
Stephen James
@leet-hacks Your code always selects the last color in the array. Your i variable you don't need a loop but a global idnex variable if you want to select from the array.
Or use the random code as described above
@rajarahull what is the error ?
Thanks @padunk it working fine now
leet-hacks sends brownie points to @padunk :sparkles: :thumbsup: :sparkles:
:cookie: 390 | @padunk |http://www.freecodecamp.com/padunk
but i thought i would loop through the colors and change the background color to the color i looped
@ashwins93 yes that is right
hello guys i need some help with a background route it is driving me crazy
Abraham Anak Agung
@leet-hacks np. u dont need loop for that
Hi all I have just finished the first part of a small project with free API. Any feedback is appreciated https://alessiochiffi.github.io/snapnews/
Seah Eng Chye
Hi all I am doing the random quote machine challenge
but i am not sure how to proceed from here
Abraham Anak Agung
@alessiochiffi nice ui, a link to the news is even better. What news company after financial times? The logo didnt show up
Stephen James
@Seahchye If you have confirm that you are getting the quotes (maybe use console.log in your forEach)
You can then examine the json and determine what string values you want to put into your page.
you can use the browser DOM API or something like jquery to do that
@padunk thanks! I have inserted a placeholder for articles without images
alessiochiffi sends brownie points to @padunk :sparkles: :thumbsup: :sparkles:
:cookie: 391 | @padunk |http://www.freecodecamp.com/padunk
Stephen James
@leet-hacks Each click drives the next color - so you don't need a loop.
Screen Shot 2017-11-13 at 12.45.39.png
can anyone tell me why this route is not working please
Seah Eng Chye
@sjames1958gm How do i confirm? clicking on the button?
Abraham Anak Agung
@RogeMateos is it background-image
Stephen James
@Seahchye Not sure I understand your question.
Assume you have global
var colorIndex = 0;
in your click handler
if (isColor) {
   // set color to white 
} else {
   // color is colors[colorIndex]
  colorIndex = (colorIndex + 1) % color.length
isColor = !isColor;
@RogeMateos src looks like a server side directory - looking at your dist directory there is no src
Seah Eng Chye
@RogeMateos has a file called 'src', the code might be confused here
i also tried ../img/background_vinyl.jpg
Seah Eng Chye
@sjames1958gm I set up the codes through FCC JSON lessons, but I dont get what is colorIndex
Bhoomi Khanderia
Hello! How can I implement scroll triggered animation?
thanks @jtan3
ryan-ed sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 463 | @jtan3 |http://www.freecodecamp.com/jtan3
Stephen James
@Seahchye colorIndex would replace your i in the for loop - a global index into your colors
@Bhoomi-Github Lil bit of jquery :-)