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
:star2: 9092 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Ghost
@ghost~5a4a80acd73408ce4f859755
@Edy1988 :+1:
Nate Mallison
@NJM8
hey can someone help me with my wikipedia viewer? If you click on the tabs I want to boxes to all be at the top. I'm sure I'm blanking on something simple to do that. https://www.natethedev.com/FreeCodeCampFrontEndProjects/wikipediaViewer/
I know this can be done with flex box to make a carousel, if I can't get this to work I'll do that but I don't want to rewrite it all
Marianissimus
@Marianissimus
@NJM8 try to remove the height property from the divs (height: 200px). no, that's not it, keep looking
Frosty427
@Frosty427
image.png
can someone help me?
im trying to get those links at the bottom to move to the center
Dardan Demiri
@dardandemiri
@Frosty427
Frosty427
@Frosty427
yes?
Dardan Demiri
@dardandemiri
Try adding to the ul class :smile:
justify-content-center
Frosty427
@Frosty427
ok thanks ill try @dardandemiri
CamperBot
@camperbot
frosty427 sends brownie points to @dardandemiri :sparkles: :thumbsup: :sparkles:
:cookie: 429 | @dardandemiri |http://www.freecodecamp.org/dardandemiri
Dardan Demiri
@dardandemiri
;)
Connor
@cresharper
Anyone here good at regex?
Dardan Demiri
@dardandmr
@cresharper We will try
;)
how can we help you ?
Connor
@cresharper
Nevermind, I figured it out but thanks!
Calat
@latimercaleb
Hello all, the prodigal son returns
Ken Haduch
@khaduch
@latimercaleb welcome back!
Calat
@latimercaleb
I left off with the random quote machine project. So I'll be building that out since I'm in between tickets at work. How is everyone else doing?
Daniel Watson
@itsdanwatson
Going through my Blackjack Card Counting function. I've gone through a switch statement, and now need to create an if statement to decide what to do with the results of the switch
Darren
@DarrenfJ
@coderNewby hey got your PM sorry.. was off sick the last day or so.. looks good though.. go check it out
coderNewby
@coderNewby
@DarrenfJ thanks! no worries.. I'm busy in the middle of the bootstrap...thanks again for the help
CamperBot
@camperbot
codernewby sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2422 | @darrenfj |http://www.freecodecamp.org/darrenfj
NikolaNbgd
@NikolaNbgd
Hi folks! I have a big API call on the bottom of the website, so I want to display data only when user scroll to that section. I made it, but my API is called each time around when user scroll in that area. I tried 'one' jquery function, that solution doesn't work for me. Any help? Advice? Many thanks!
Dardan Demiri
@dardandmr
@NikolaNbgd you can try using a setTimeout()
when the user arrives in that area, it starts onece
never again
NikolaNbgd
@NikolaNbgd
@dardandmr how that can help me?
Dardan Demiri
@dardandmr
right now you have made the code run every time the user scrolls down right ?
NikolaNbgd
@NikolaNbgd
yep, but only when user sroll to that section
I can send you that piece of code
Dardan Demiri
@dardandmr
Great idea
NikolaNbgd
@NikolaNbgd
$(document).ready(function () {
$(window).on('scroll', function () {
var hT = $('.forks_me').offset().top,
hH = $('.forks_me').outerHeight(),
wH = $(window).height(),
wS = $(this).scrollTop();
if (wS > (hT + hH - wH) && window.location.pathname == '/') {
getApi();
console.log('works')
}
})
});
Dardan Demiri
@dardandmr
window.addEventListener('scroll', function(){
  var place = document.body.scrollTop;
  var alertOn = document.getElementById('anotherElement').offsetTop;
  if(place > alertOn){
    alert('Function execute here');
    this.removeEventListener('scroll', arguments.callee, false);
  }
});


anotherElement is the ID of the section you want to execute
window.addEventListener('scroll', function(){
  var place = document.body.scrollTop;
  var alertOn = document.getElementById('anotherElement').offsetTop;
  if(place > alertOn){
    getApi();
    console.log('works')
    this.removeEventListener('scroll', arguments.callee, false);
  }
});
This should work as you asked for
Calat
@latimercaleb
Crap, how do you format code in here again ? It's been so long.
Dardan Demiri
@dardandmr
with three ```
Dardan Demiri
@dardandmr
then the code under
Calat
@latimercaleb
Ahhh thanks guys
Dardan Demiri
@dardandmr
;)

@latimercaleb Whenever you want to see this image sent by @gulsvi

Just pres Ctrl+Shift+M

Gulsvi
@gulsvi
@NikolaNbgd can you check if an element has been populated with API data and conditionally call getApi() based on that?
if(!$("#myElement").text().trim().length) getApi();