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
JD Tadlock
@jdtdesigns
@Hello911 getting close
you're checking if an object named 'bob' exists though
you should be checking to see if the function argument firstName equals the .firstName prop of any of the objects
Christopher
@bradley1492
Hey guys, I am a little bit stuck on the "build a random quote machine" challenge. I got it to randomly give out quotes, but i can´t figure out how to tweet the exact same quote. Now i thought about updating the href of the twitter link through javascript but I am not sure.. Nay advice from you guys?
JD Tadlock
@jdtdesigns
@bradley1492 You can use the twitter intent url and update the href of the link on each new quote. You're on the right track ;)
MaxLAB
@Max-LAB
@bradley1492 you can simply use window.open and twitter url in it
Christopher
@bradley1492
Thanks guys
JD Tadlock
@jdtdesigns
Christopher
@bradley1492
:)
JD Tadlock
@jdtdesigns
you can just concat the quote on the end
no need for window.open ;)
Christopher
@bradley1492
Cool I´ll give those tips some tries!
MaxLAB
@Max-LAB
@jdtdesigns how can you open url without window.open or openURL in *.js file?
JD Tadlock
@jdtdesigns
easy @Max-LAB
just change the href of the tweet link
and make sure it has target="_blank"
Hello911
@Hello911

@jdtdesigns

 for(var i=0;i<contacts.length;i++){
   if (contacts[i].firstName==firstName){

     if (contacts[i][prop]){
       return contacts[i][prop];
     }else return "No such property";


   }else return "No such contact";
 }

Still, tho, not all the requirements are met.
.

MaxLAB
@Max-LAB
@jdtdesigns .attr("href", "http link"); got it.. nice approach :+1:
JD Tadlock
@jdtdesigns
@Hello911 You don't need the else for no such contact
just place that outside the for
@Max-LAB ;)
Hello911
@Hello911
@jdtdesigns GOT IT. challenged completed. thank you.
CamperBot
@camperbot
hello911 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 876 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
@Hello911 welcome
Chris
@bestintown23
how do i make the footer of my page to be on the bottom? its appearing in the middle.
JD Tadlock
@jdtdesigns
@bestintown23 the page needs to have enough content to push the footer down
if there's not enough content there are tricks you can do to make the footer always stay at the bottom
Baillie O'Grady
@baillieogrady
Chris give it a height and the body/parent a height , I personally use flexbox with a column layout then flex-grow the second to last item
Jennifer
@jchiang7874

I'm working on my random quote machine and it works great UNTIL I double click on the 'New Quote' button. :worried: Instead of clearing previous quotes, it appends to it. Any help is appreciated. Thanks!

https://codepen.io/jchiang7874/pen/YNQNeq

Also, I'm still iffy on APIs, can anyone recommend any tutorials? Thanks.
Tyler Moeller
@TylerMoeller
@jchiang7874 Looks like you fixed it with:
      $(".quote").html("");
      $(".author").html("");
Another way is to use .empty(): https://api.jquery.com/empty/
Ian Lee
@asparism
does anyone know why the promise in this Codepen doesn't work on .then()? http://codepen.io/Asparism/pen/PWPrMK?editors=0011
Mario Galindo
@mariogalindov

Hi there is there a way to make all thumbnails the same height?

http://codepen.io/magv89/pen/xgVoqj?editors=1100

Tyler Moeller
@TylerMoeller
@jchiang7874 I see the problem now...with the double click. Add that .html("") code as the first line of your getJSON function, right before you add the quote and author text.
Tyler Moeller
@TylerMoeller
@mariogalindov It can be a little complicated because the grid controls the width of the images, so if they have different aspect ratios, they get clipped or distorted. Here are a few approaches: https://scotch.io/bar-talk/different-tricks-on-how-to-make-bootstrap-columns-all-the-same-height
I think the easiest way, when dealing with only a handful of images, is to just edit them in a photo editor so they are all the same size.
Ian Lee
@asparism
@mariogalindov you could use max-height, but the slash thumbnail is a different shape than the others, so that particular thumbnail will always be different height or width than the others unless you edit the actual image, or you could put it in a div with a black background, so you would have black bars on either the top/bottom or left/right. if it's possible to make the image bigger without losing quality, you could make the container overflow: hidden;
Jennifer
@jchiang7874
@TylerMoeller Thank you! :+1: It worked but why?
CamperBot
@camperbot
jchiang7874 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1385 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
@jchiang7874 It takes some time to go out to the quotes API server and get the quote (a few hundred milliseconds). All of the code inside your getJSON function runs after the response from the quotes API server is complete. The code outside of it runs immediately. So, you were clearing contents that had already been cleared while waiting to get the updated quote text - if that makes sense ;)
why my navigation bar menu is not changing upon scrolling
Baillie O'Grady
@baillieogrady
Mrs-coder what are you trying to achieve?
mrs-coder
@mrs-coder
trying to change the navigation bar menu change upon scrolling . Like if we scroll till contact me, then Contact menu on the navigation bar becomes active
armynational
@armynational
hey so im trying to put a background image on my personal portfolio and everything looks right but its not working any help\
detour26
@detour26
Hey everyone, I am trying to do the Personal portfolio challenge and I cant figure out how to (1) get the background image to fit the screen and (2) get the website to scroll up and down.....Any suggestions? thanks
armynational
@armynational
theres a tutuorial on youtube that has helped ,me alot the channel is called code tutorials360