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
Prakash Shiwakoti
@pshiwakoti1
oh ok
Aftab Parvez
@aftabparvez
You need to remove one “var” @pshiwakoti1
var var remainingURL to var remainingURL
Prakash Shiwakoti
@pshiwakoti1
i got it
Tyler Moeller
@TylerMoeller
no problem, @aftabparvez Have fun :) show us what you come up with
Prakash Shiwakoti
@pshiwakoti1
thanks
@aftabparvez can you tell me if my latitude and longitude variables are set right
Pantamia
@Pantamia
anyone know why that if you change the last 2 letters in a codepen.io link, it brings you to a malware page ? ;o
Prakash Shiwakoti
@pshiwakoti1
hello @aftabparvez
anyone else can u plz let me know if my latitude and longitude variables are set right. is that the way to assign jquery data into a variable?
Tyler Moeller
@TylerMoeller
@pshiwakoti1 with getJSON, you have to do everything inside the callback:
$(document).ready(function() {
  $.getJSON(url, function(json) {
      // the "json" variable can only be used here
    });
  // here the "json" variable is undefined
});
// here the "json" variable is also undefined
Prakash Shiwakoti
@pshiwakoti1
oh i see
i got it
why am i getting error now @TylerMoeller
can u look at my codepen
i moved my urls insde the CallBack
is that what Im supposed to do?
Tyler Moeller
@TylerMoeller
@pshiwakoti1 This is what I see:
$(document).ready(function() {

    var coordinates = $.getJSON("http://ip-api.com/json", function(json) {
        $("p1").html(json.lat);
        $("h1").html(json.lon);
    });

    var url1 = "http://api.openweathermap.org/data/2.5/weather?lat=";
    var latitude = json.lat;
    var url2 = "&lon=";
    var longitude = json.lon;
    var remainingURL = "&appid=34a4cf171b5fa89cd0ea82794d903fdb&units=metric";

});
Prakash Shiwakoti
@pshiwakoti1
ok thanks
what is that two lines do?
Tyler Moeller
@TylerMoeller
Everything has to be done inside your callback
Prakash Shiwakoti
@pshiwakoti1
p1 ad and h1
will it print it on html page?
Tyler Moeller
@TylerMoeller
@pshiwakoti1 It's the jQuery .html() method that we learned here: https://www.freecodecamp.com/challenges/change-text-inside-an-element-using-jquery
Prakash Shiwakoti
@pshiwakoti1
I can define javascript varaibles inside document.ready function right
im finding jquery difficult
Tyler Moeller
@TylerMoeller
jQuery is a library built with javascript in the end :) It never hurts to go through some of the challenges again if you're running into problems.
Prakash Shiwakoti
@pshiwakoti1
so looking at my present codepen can u tell me if my latitude and longtitude variables will get the right values from the api?
will the assignment statements work?
Prakash Shiwakoti
@pshiwakoti1
how do I display my url link to my page? can you please suggest?
hi @TylerMoeller will you plz help
Prakash Shiwakoti
@pshiwakoti1
Access to Font at 'https://production-assets.codepen.io/assets/telefon/bold/af889c53-1ee3-4868…50-3-b7a87e0fbd213943fae0c0ef5985635dd43fa9c24876b2725127a13ccaf4ab6a.woff' from origin 'http://codepen.io' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://codepen.io' that is not equal to the supplied origin. Origin 'http://codepen.io' is therefore not allowed access.
bootstrap.min.js:7 Uncaught Error: Bootstrap tooltips require Tether (http://tether.io/)
bootstrap.min.js:7 Uncaught Error: Bootstrap tooltips require Tether (http://tether.io/)
bootstrap.min.js:7 Uncaught Error: Bootstrap tooltips require Tether (http://tether.io/)
bootstrap.min.js:7 Uncaught Error: Bootstrap tooltips require Tether (http://tether.io/)
bootstrap.min.js:7 Uncaught Error: Bootstrap tooltips require Tether (http://tether.io/)
    at bootstrap.min.js:7
    at bootstrap.min.js:7
    at bootstrap.min.js:7
im getting these errors
Tyler Moeller
@TylerMoeller
@pshiwakoti1 If I understand correctly, you are trying to show the URL you built with $('url').show();?
Prakash Shiwakoti
@pshiwakoti1
yes
why am i getting those errors? looks like its from Bootstap
Tyler Moeller
@TylerMoeller
@pshiwakoti1 I think you need to read the jQuery documentation more :(
Check out the demo here: http://api.jquery.com/show/
@pshiwakoti1 Have you tried searching google for those errors?
Prakash Shiwakoti
@pshiwakoti1
not yet
Tyler Moeller
@TylerMoeller
I am not familiar with the error, personally, but If I look at google, there are several possible answers
Prakash Shiwakoti
@pshiwakoti1
im reading what show() does
can u pls tell me why im getting those errors
i inserted BootStrap in my pincode
from the settings
Is that why?
should I remove it?
Tyler Moeller
@TylerMoeller
@pshiwakoti1 I would have to debug it to find out. I don't have the answer
iso
@iso1048
@SkyCoder01 the bootstrap link