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
Dinesh
@Dinesh9387
i cant think of anything further... all i ended up doing was to get the nav bar buttons on top of the background image
Dinesh
@Dinesh9387
@hiltydiggs cud u elaborate pls??
anyone can help me, please ?
thanks
JD Tadlock
@jdtdesigns
$(document).ready(function() {
  var posLog;
  var posLat;

  var init = function() {
    getLocation();
  };

  var getLocation = function() {
    if (window.chrome) {
      $.getJSON('http://ip-api.com/json', function(json) {
        posLog = json.lon;
        posLat = json.lat;

        getWeather();
      })
    } else {
      if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function(data) {
          posLog = data.coords.longitude;
          posLat = data.coords.latitude;

          getWeather();
        });
      }
    }
  };

  var getWeather = function() {
    $.getJSON(
      "http://api.openweathermap.org/data/2.5/weather?lat=" + posLat + "&lon=" + posLog + "&appid=433719a5f94053c00f278be7e806c268",
      function(data) {
        // Success! Do stuff with data.
        $('#userLatitude').text(posLat);
        $('#userLongitude').text(posLog);
      });
  };

  init();
});
@Nolo900
functions are your friend
Dan Logajan
@hiltydiggs
@Dinesh9387
body {
  background: url("http://wallpaper.pickywallpapers.com/1920x1080/wood-board.jpg");
}
Normally put it on your wrapping div. And remove the <img> from your html.
Hristijan Gjorgjievski
@hristijankiko
Anyone knows why my random quote generator generates only one quote then just shows the same one every time i press the button? http://codepen.io/hristijankiko/pen/VjKmwL
JD Tadlock
@jdtdesigns
@hristijankiko The random quote url doesn't work on quotesondesign. You can return 30 quotes and save them to an array, then use that to get random quotes.
Hristijan Gjorgjievski
@hristijankiko
@jdtdesigns but is it not doable with an API?
JD Tadlock
@jdtdesigns
@hristijankiko You get the 30 quotes from the api, then loop through the returned json and push the quotes to an array. Then use that array to get random quotes.
There are plenty of apis that have working random quote urls though.
Hristijan Gjorgjievski
@hristijankiko
ahh okay
Syahri Ramadhan
@SPMechanic
Erm, got a bit stuck on project "Build a Tribute"
my codepen here
i just confused, how to centered <LI> element..what Bootstrap class that i must utilize? I hack my way to center the DIV element using css (got it from stack-overflow), but it not working for unordered list. :(
Syahri Ramadhan
@SPMechanic
but i did not found any class suitable for my needs, i am just clueless...what did i miss?
andreas2249
@andreas2249
Good morning, Campers. Anyone know how to center an image inside a <figure> element? When my 'Portfolio' is stretched to full width, the images stay pushed to the left -- leaving a large space to the right. I think centering the image is a reasonable fix. Here's my CodePen (click 'Portfolio' link to see it): https://codepen.io/andreas2249/pen/ezdbEe
Daniel Cartín
@Danielcv93
hi, how can I make a button carry out an action of Java Script?**
Sorin Ruse
@sorinr
@jdtdesigns thank's for your yesterday message " @sorinr It's still not clearing each timeout. Each time you type, it starts a new timeout that gets results. This causes a stack of timeouts that fire one after another. You need to clear the timeout each time the user starts typing before creating the timeout to get results. ;)" regarding my wikipedia app. You suggest that on keyup event to "clear" the stack of all previous calls?
CamperBot
@camperbot
sorinr sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 539 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
andreas2249
@andreas2249
@Danielcv93, here's the basic format: <button onclick="myFunction()">Click me</button>
Sorin Ruse
@sorinr
@andreas2249 you mean making the img full page width? take a look here. https://css-tricks.com/perfect-full-page-background-image/
JD Tadlock
@jdtdesigns
@sorinr However the timeout is fired needs to be cleared. clearTimeout(window.delaySearch) would be a typical way to do it
andreas2249
@andreas2249
@sorinr, thank you for your prompt reply. When the entire page is stretched to full page, the image is pushed to the left, leaving a gaping space on the right (looks outta balance). Example
CamperBot
@camperbot
:cookie: 373 | @sorinr |http://www.freecodecamp.com/sorinr
andreas2249 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
andreas2249
@andreas2249
( @sorinr, background image is fine, thanks... It's the images inside the <figure> elements on the 'Portfolio' page that I'd like to center.)
CamperBot
@camperbot
andreas2249 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: andreas2249 already gave sorinr points
how can i get the about tab to the top right corner??
"about" tab
CamperBot
@camperbot
you need to ask about @someone!
Dinesh
@Dinesh9387
@hiltydiggs hey mahn, u still there???
DJ Pelland
@dna113p
@Dinesh9387 do you mean the navigation buttons?
Akhil Kr.
@aj17kr
Hi , can anyone help me understanding how do i implement smooth scrolling in navbar a links ? like in this site :- https://codepen.io/FreeCodeCamp/full/YqLyXB/
Sorin Ruse
@sorinr
@jdtdesigns what will solve this approach? my intention was to make a "live search" from the input data. it is normal to make 100 http calls for 100 keypressed. i have added that debounce="10" attribute to delay between key press time and reactivity time(when function is called)
Dinesh
@Dinesh9387
@dna113p yeah
@dna113p for some reason, style="float:right;" is not putting the about button at the top right corner
Akhil Kr.
@aj17kr
anybody please help regarding smooth scrolling
Matthew Boland
@mattboland
anyone here familiar with react have a moment to help?
andreas2249
@andreas2249
@mattboland, trying to learn react, myself. There is a dedicated room for react here: https://gitter.im/chat-rooms/reactjs