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
Faddah Wolf
@faddah
Hello, I need help with JavaScript/jQuery on my second FCC Portfolio project, with touch screens. my jQuery code works great for my Nav buttons with a mouse click or touchpad on a desktop or laptop. but on mobile screens — iPad, iPhone, Android or Windows tablets or phones — the top three .navbar buttons, .about-btn, .portfolio-btn, and .contact-btn do not work, but the three .top-btn’s lower down on the page do, but they don’t run the jQuery .animate() function. any hel with this, please? here is the codepen — http://codepen.io/faddah/pen/egVyrM .
Tom
@moT01
so what is your result supposed to look like @ssgriffen
for your example
Sam Griffen
@ssgriffen
it should look like this [ "(" , ")" , "(" ] @moT01
or ["()("] @moT01
@moT01 actually I may have a better idea for this nvm
Tom
@moT01
glad i could help
Sam Griffen
@ssgriffen
@moT01 lol
Tyler Moeller
@TylerMoeller
@faddah Not sure if ES6 features like const and arrow functions are supported in the mobile browser you're using, but one thing you can do to help with compatibility is to use babel as your preprocessor - looks like you have Typescript enabled now.
Also, you can attach the same code to multiple selectors by separating them with a comma:
$('.about-btn, .portfolio-btn, .contact-btn').click(function(e)
or just give all those elements the same class name like animated-scroll to avoid code duplication
Faddah Wolf
@faddah
@TylerMoeller ok, thank you for the DRY suggestion. and i’ll check out using Babel, but I thought Typescript is fine with ES6 coding?
CamperBot
@camperbot
faddah sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1478 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
I think they're both similar @faddah but I know for sure that babel does a good job. Maybe a mac vs pc philosophy in the end - I've just stuck with what works for me :)
Faddah Wolf
@faddah
@TylerMoeller btw, i can’t quite do your DRY suggestion yet, as i need to have the class button clicked (example: .about-btn) grab the corresponding id of the section to which it is scrolling (example:#about). in any case, i switched it to babel for the JavaScript pre-processor, saved the pen, refreshed the screen. still not working on touch screens.
@TylerMoeller also, the funny thing is: the functions seemed to be being accessed, as my callback console.log() statement shows up down in the JavaScript console, but the animation never works, and the top buttons do not scroll, no matter what.
Tyler Moeller
@TylerMoeller
@faddah I'll fork it and see if I can play around with it on my mobile. Will let you know if I come up with anything
Faddah Wolf
@faddah
@TylerMoeller much appreciate, thank you!
CamperBot
@camperbot
faddah sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: faddah already gave tylermoeller points
mono
@monoblack21
hello, how do i make a button that can stop a function already running
Tyler Moeller
@TylerMoeller
@faddah I think this is a codepen iframe issue - try it in debug view on your mobile device
Doesn't work for me in "full" view, but works in "debug"
Ahmed Osman
@Noby707
Hi, I can not insert images for some reason in codepen. Need help please. <a href="#"><img alt="Sharingan" src="https://s-media-cache-ak0.pinimg.com/236x/52/74/0f/52740f7a75720a4576d1bd0613e3a3a1.jpg"></a>
The same code works well when I run it in one of the free code camp challenges
<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back. " src="https://s-media-cache-ak0.pinimg.com/236x/52/74/0f/52740f7a75720a4576d1bd0613e3a3a1.jpg"></a>
Tyler Moeller
@TylerMoeller
@Noby707 Can you link to your codepen?
Osania
@san00
Hi all, currently doing the twitch project and need a little help please. I'm unable to get any info from the api. code below.
function streaming(){
  var users = ["freecodecamp","OgamingSC2", "cretetion", " ESL_SC2", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"];

  for(var i=0; i<users.length; i++){
    var apiResult = "https://wind-bow.gomix.me/twitch-api/channels" + users;
  }
$.ajax({
url:apiResult,
type:"GET",
dataType:"jsonp",
success:function(info){
  console.log(info);
  }
})
}
Tyler Moeller
@TylerMoeller
@Noby707 Codepen doesn't like the </tilte> tag, change it to </title> (line 10):
<title><!--Web Page Title --></title>
Ahmed Osman
@Noby707
Thank you @TylerMoeller
CamperBot
@camperbot
noby707 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1479 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Ahmed Osman
@Noby707
It worked ^_^
Brandon
@bd1887
@san00 Do you have a Twitch API key?
Or is that url a workaround?
Osania
@san00
hiya @bd1887, It's the workaround as given on Fcc
Faddah Wolf
@faddah
@TylerMoeller yeah, i see that. so is there anything to do to fix that?
@TylerMoeller maybe: .preventDefault()?
Tyler Moeller
@TylerMoeller
@faddah you could maybe detect if /full/ is in the url with window.location and prompt an error to the user, but some of my pens don't scroll down either in full mode. I haven't taken the time to see why since I just host them all on github when they're done anyway.
Osania
@san00
@bd1887 it says I don't need a key?
Faddah Wolf
@faddah
@TylerMoeller yeah, maybe something i report to codepen.io support?? i also need to re-do my GitHub to be GitHub.io and host projects there also. but i find their docs to do that quite — uh, cumbersome. like never explain directly what i want to work on or fix.
Tyler Moeller
@TylerMoeller
I'm sure they'll tell you to pay for debug views that never expire :)
Faddah Wolf
@faddah
@TylerMoeller but why should my users have to know to change it to “debug” view to make it work correctly? it should work just fine in any view.
Tyler Moeller
@TylerMoeller
@faddah Because codepen is meant for staging, not as a hosting environment I believe. If you want to use it for hosting, you have to pay. Github pages are fairly easy once you get your first one going. It's just a matter of getting the directory structure right, and then setting up a gh-pages branch - and it's 100% free :)
Brandon
@bd1887

@san00 In your for loop, you aren't iterating through the users array. Code should be:

for(var i=0; i<users.length; i++){
    var apiResult = "https://wind-bow.gomix.me/twitch-api/channels" + users[i];
  }

But also that variable only exists inside that function

Faddah Wolf
@faddah
@TylerMoeller - also, now the contact button at the top is not working and its code is the same as the other buttons, and i have no idea why.
Brandon
@bd1887
@san00 Can you post the codepen link?
Tyler Moeller
@TylerMoeller
I think I saw you add a 'touch' event to that button?