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
Joshua McKenzie
@mckenzieja
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
  var lat = position.coords.latitude;
  var lon = position.coords.longitude;
  loadWeather(lat,lon);
  });

 } else {
   document.getElementbyId("city").innerHTML = "Either you did not allow your browser to ping your location or this browser is not supported.";
    }
var loadWeather = function(lat,lon){
var api = "&APPID=5074a9ca80f555b1f11ec89d51897dab";
var apiurl = "http://api.openweathermap.org/data/2.5/weather&lat="+lat+"&lon="+lon+api;
  $.ajax({
    type: 'GET',
    url: apiurl,
    dataType: 'jsonp',
    success: function(json){
        $("#city").text(json.name);
    };
});
};
Submitted for your review.
Joshua McKenzie
@mckenzieja
For some reason it's not displaying the city name from the API.
Joshua McKenzie
@mckenzieja
api url was off by one character
took me 2 hours.
Heather Kusmierz
@HKuz
Anyone want to quickly test my Twitch app - I think I got it working properly. I know it looks a lot like the example, the creative juices were not flowing on this one... http://codepen.io/HKuz/pen/WwNdKY
Dan Stockham
@DanStockham
Here I am thinking I am finished with this, and it's more broke then ever :(
A draw comes out when it is supposed to be a win and it's giving out the wrong winner.
Lanitta
@DivaWeb
@DanStockham I tried playing and did not come up with issues
Dan Stockham
@DanStockham
Try going into a forced draw and it will start screwing up.
Lanitta
@DivaWeb
@DanStockham yeah I see what your saying the principle is wright so it looks like it needs some tweeking
Dan Stockham
@DanStockham
It's weird. When there is one space left, the computer player will take it, I return a draw in the console, and the other player is claimed the winner.
Lane Anderson
@LaneAnderson
I'm having a difficult time getting this to work:
$("button").click(function() {
$('html, body').animate({
scrollTop: $("footer").offset().top
}, 2000);
});
I have a simple button with the id "button", and a div with the id "footer". when I click the button, nothing happens at all.
missing "#"s........ never mind, sorry! Got it to work.
Dustin
@Key-Banger
@LaneAnderson was typing that. You got there first :smile:
I had that same issue before. jQuery I think is a little different with selectors.
Nico Vancamp
@NiVanc
Hello everyone. I’m working on the "Build a Personal Portfolio Webpage” assigment. I’m wireframing everything out but I have a white spacing between my sections and I can’t find the cause. Could anyone take a loot at it and help me out? It would be much appretiated. http://codepen.io/NiVanc/full/vGYQwN/
Dustin
@Key-Banger
Would someone mind look at my javascript. I'm having a hard time getting to the JSON I want. http://codepen.io/Key-Banger/pen/RrzqKK?editors=1010
@NiVanc you can do margin-bottom: -20px; that will pull everything up.
Lanitta
@DivaWeb
@NiVanc you have to fix the padding between the pages
Nico Vancamp
@NiVanc
But the strange thing is that I can’t see any padding or margin when inspecting it.
Lanitta
@DivaWeb
@Key-Banger I am not a json expert but I did notice that your vars don't have ;
@NiVanc yeah I know but that is what you have to do is add padding to the top
Davide
@DavOnGit
@Key-Banger
i've used this:
$.ajax({
      url: '//en.wikipedia.org/w/api.php?',
      data: { format: 'json', action: 'query', generator:'search', gsrnamespace: 0, gsrlimit: 10, prop: 'pageimages|extracts', piprop: 'thumbnail', pilimit:'10', exsentences: 1, explaintext:true, exintro:true, exlimit:'max', gsrsearch: input, redirects: 'resolve', formatversion: 2, callback:'myCallback' },
      dataType: 'jsonp'
});
Nico Vancamp
@NiVanc
@DivaWeb I’ll try that.
Lanitta
@DivaWeb
@NiVanc just add it in your css I found out about it by doing some research because I had the same problem when I did mine
Dustin
@Key-Banger
@DivaWeb thanks I'll clean those up.
CamperBot
@camperbot
key-banger sends brownie points to @divaweb :sparkles: :thumbsup: :sparkles:
Nico Vancamp
@NiVanc
@DivaWeb Thanks a lot! Is it a bug? Because padding-top: 1px; resolves the issue. Really strange.
CamperBot
@camperbot
:star: 240 | @divaweb | http://www.freecodecamp.com/divaweb
Dustin
@Key-Banger
@DavOnGit thanks, I'll look into ajax. Haven't used it much.
Lanitta
@DivaWeb
@NiVanc no it just needs the padding to bring them together it has something to do with the scrollspy
Nico Vancamp
@NiVanc
@DivaWeb Oh ok.
Mark Lawrence
@ninja-ml
i was wondering while trying to loop through JSON, is forEach the same as .each() ?
Evan Mena
@Hoenn
Can anyone give me some direction as to where to find backgrounds for web pages?
finding a lot of pay content. Is there some good site for backgrounds I'm not finding?
Clarence W.
@leo81202
@Hoenn use google the view images
then just copy the image location

I need help with my wikipedia zipline I keep getting

XMLHttpRequest cannot load https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=butterflies&redirects=resolve. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access.

is there anyway around that, here is a link to my project http://codepen.io/Leo81202/pen/dMywbP?editors=1011

Mark Lawrence
@ninja-ml
@leo81202 try adding &callback=? to the end of your api call
Clarence W.
@leo81202
Thanks @ninja-ml
CamperBot
@camperbot
leo81202 sends brownie points to @ninja-ml :sparkles: :thumbsup: :sparkles:
Clarence W.
@leo81202
that worked
CamperBot
@camperbot
:star: 321 | @ninja-ml | http://www.freecodecamp.com/ninja-ml
Mark Lawrence
@ninja-ml
@leo81202 i've experienced that problem recently too
Travmatth
@Travmatth
I created the magnifying glass animation in wikipedia viewer, but i’m looking for a way to ‘anchor’ the tail of the magnifying glass to the input element itself, such that it stays attached regardless of the screen size http://codepen.io/TravMatth/pen/WwNzdj?editors=1100
Julian Betancourt
@julianbetancourt
hi guys, with jquery, how do i test if an element's children has x class ?
<li class="employee"><span class="out status">OUT</span> Aimee</li>
<li class="employee"><span class="in status">IN</span> Aimee</li>

if ($('.employee').children().hasClass( "in" )) {
  $(this).css('color', 'pink');
}
Aseel
@aseelsky
Hello camper! I have a question. I notice when I first opened the weather app provided by fCC in the Zipline: Show the Local Weather, it didn’t ask for permission to get access to my location, do anyone know why is that?