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
CallMeOrange
@EgnaroDev
You know? One click suddenly change pages
@Zalmez Nice
Gulsvi
@gulsvi
Yeah, like tabs. Click it and the content below changes - no scrolling.
CallMeOrange
@EgnaroDev
Yeah I guess
Do you know how?
Gulsvi
@gulsvi
Ignore Link 2, was using that show someone something, but click links 1,3,4: https://codepen.io/skycoder/pen/XMoJyj
CallMeOrange
@EgnaroDev
Ok I will check it out
Do I need JS code?
this
$('[data-toggle="tab"]').click(function(e) {
  e.preventDefault();
  $(this).tab('show');
});
Yeah
Gulsvi
@gulsvi
Yeah, you need that
CallMeOrange
@EgnaroDev
That isn't what Im looking for but these are good idea
Gulsvi
@gulsvi
But that's bootstrap 4
CallMeOrange
@EgnaroDev
What happen if I have it on tribute page?
Gulsvi
@gulsvi
Is it like the links on the bootstrap site? http://getbootstrap.com/getting-started/
Click "CSS", "Components", "JavaScript", etc..
CallMeOrange
@EgnaroDev
Yeah
Hold on There is something I want to show you
about @jtlscout
CamperBot
@camperbot
:cookie: 412 | @jtlscout |http://www.freecodecamp.com/jtlscout
CallMeOrange
@EgnaroDev
Hm He changed the tribute page
Never mind then
@SkyC0der Do I need anything in css?
Gulsvi
@gulsvi
Yes, always need CSS unless you just want blue links :)
Or gray buttons
CallMeOrange
@EgnaroDev
Not that but whatever :/
I think its hard to add it to my tribute page...
I guess my page is good enough
Gulsvi
@gulsvi
Your page is great - go back and update it as you learn more
You could make a 3D carousel :)
CallMeOrange
@EgnaroDev
3D carousel?
Googling it
wow Its amazing
Curtis Turner
@curtis-turner
Can anyone offer any help on the Build a Random Quote Machine challenge?
Gulsvi
@gulsvi
@curtis-turner Sure, what's the question?
B
@B-keen
hey everyone does anyone know how to shorten the position.coords output i tried to convert it to a string doesn't work need to shorten it to 10 characters because the yahoo api doesn't like it
if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function(position) {
            latti = position.coords.latitude;
            lonni = position.coords.longitude;
      //latt = latti.substring(0,10);
      //lonn = latti.slice(0,10);
            console.log(latti + "- " + lonni);
CallMeOrange
@EgnaroDev
@B-keen why do you need if statement?
Curtis Turner
@curtis-turner
so first i am just creating an array full of random quotes from my favorite tv show. then i use the random function to get a random index to get the quote i want to display. my question is how do i get my quote to display in the html
Gulsvi
@gulsvi
@B-keen Use .toFixed() method
  navigator.geolocation.getCurrentPosition(function(position) {
    var latti = position.coords.latitude.toFixed(2);
    var lonni = position.coords.longitude.toFixed(2);
    console.log(latti + "- " + lonni);
  });
@curtis-turner With jQuery, you use the .html() method. With regular JavaScript, you use .innerHTML
https://www.w3schools.com/jquery/html_html.asp
CallMeOrange
@EgnaroDev
@B-keen sorry I meant I dont think you need if statement to get its location
Gulsvi
@gulsvi
@MCTwoDigitZero That checks if the browser supports navigator.geolocation
CallMeOrange
@EgnaroDev
oh I see
Gulsvi
@gulsvi
not really needed though unless you need to support really old browsers
Curtis Turner
@curtis-turner
@SkyC0der alright but like inside the script tag do i call my javascript fucntions?? like so when i do the on("click", function(){ .... and i do the .html() what do i put inside there so that i pulls from my javscript file and uses my function to return the string i want?
Gulsvi
@gulsvi
@curtis-turner Once you are able to select a random quote from your array, you can define a variable for that quote, like randomQuote and then do $('#myQuoteDiv').html(randomQuote) - if that makes sense
var randomQuote = myQuoteArray[randomIndex];
$('#myQuoteDiv').html(randomQuote)
Curtis Turner
@curtis-turner
@SkyC0der yeah that makes a lot of sense thanks i will try that out and see what if i can get it working
CamperBot
@camperbot
:star2: 1759 | @skyc0der |http://www.freecodecamp.com/skyc0der