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
Moisés Man
@moigithub
first error..means u need to include jquery module on ur codepen
on ur codepen... click on the cogwheel
then goto JS section
below u will find a drop down (quick add) menu
select jquery and save/close
the other error.. tells u have mismatched open/closing brackets
for every open ( u need to have a closing )
same thing for other kind of brackets ([{< >}])
Gulsvi
@gulsvi
@nicksteffen94 Lots of people use https://quotesondesign.com/api-v4-0/
Prakash Shiwakoti
@pshiwakoti1
 s.codepen.io/boomerang/iFrameKey-214cfc15-9019-abec-ec2e-594c5ac66994/index.html?editors=1111:16 Uncaught SyntaxError: Unexpected token }
s.codepen.io/boomerang/iFrameKey-90e21303-62dd-0da7-1af7-7c751e32d33e/index.html?editors=1111:11 Uncaught SyntaxError: Unexpected end of input
s.codepen.io/boomerang/iFrameKey-d19ee11b-935f-676f-3bb0-d4535f8d6af1/index.html?editors=1111:11 Uncaught SyntaxError: Unexpected end of input
s.codepen.io/boomerang/iFrameKey-65feba4a-be89-a3bb-2ff5-2e922c5ff67b/index.html?editors=1111:13 Uncaught SyntaxError: missing ) after argument list
s.codepen.io/boomerang/iFrameKey-d5f4cc65-4f69-67b3-a067-0a6fa245f972/index.html?editors=1111:13 Uncaught SyntaxError: missing ) after argument list
s.codepen.io/boomerang/iFrameKey-1b908a58-c096-3059-e590-8b4a9c2e3217/index.html?editors=1111:13 Uncaught SyntaxError: missing ) after argument list
s.codepen.io/boomerang/iFrameKey-7aa63e46-a972-6d05-20c6-3b8a68daec10/index.html?editors=1111:7 Uncaught ReferenceError: $ is not defined
(anonymous) @ s.codepen.io/boomerang/iFrameKey-7aa63e46-a972-6d05-20c6-3b8a68daec10/index.html?editors=1111:7
index.html:7 Uncaught ReferenceError: $ is not defined
    at index.html:7
index.html?editors=1111:7 Uncaught ReferenceError: $ is not defined
    at index.html?editors=1111:7
(anonymous) @ index.html?editors=1111:7
index.html?editors=1111:14 Uncaught SyntaxError: Unexpected token }
index.html?editors=1111:7 Uncaught ReferenceError: $ is not defined
    at index.html?editors=1111:7
(anonymous) @ index.html?editors=1111:7
these are the erros I am getting right now
i added Jquery like you told me before
Moisés Man
@moigithub
can u share ur codepen link ?
Tony Hudson
@ngohungphuc
put on github or codepen so everyone can help you @pshiwakoti1
@ngohungphuc can you see my code now?
Moisés Man
@moigithub
@pshiwakoti1 ok.. move everything u have inside ur <script> tag
to the script section/panel on codepen
Tony Hudson
@ngohungphuc
@pshiwakoti1 yeah I can see your code
Prakash Shiwakoti
@pshiwakoti1
ok
I moved it
Tony Hudson
@ngohungphuc
Mixed Content: The page at 'https://codepen.io/pshiwakoti1/pen/XpvdYz?editors=1111' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://ip-api.com/json'. This request has been blocked; the content must be served over HTTPS.
here is what I get
Prakash Shiwakoti
@pshiwakoti1
@ngohungphuc what do I do now
Tony Hudson
@ngohungphuc
just a minute
Moisés Man
@moigithub
Mixed content error means.. ur codepen url is HTTPS (secure connections)
but the content u trying to get.. comes from http (unsecure).. so u cant mix that
Prakash Shiwakoti
@pshiwakoti1
what to do now
Moisés Man
@moigithub
(one way) is remove the s from https (on ur browser address bar)
http://codepen.. etc (without s)
Moisés Man
@moigithub
u can remove the <script> tag from the JS section
no needed on codepen
Prakash Shiwakoti
@pshiwakoti1
now Im getting latitude 37.77 on the console
if I wana display on browser what do i have to do
Tony Hudson
@ngohungphuc
easy
just append to some div or text
Prakash Shiwakoti
@pshiwakoti1
ok
thanks
Tony Hudson
@ngohungphuc
$(document).ready(function() {

  var coordinates = $.getJSON("http://ip-api.com/json", function(json) {
  console.log("Latitude is: " + json.lat);
     $("p").html(json.lat);
});

});
<div class="container-fluid">
<div class="row text-center">
<h2>Local Weather</h2>
<h3> json.lat </h3>
<p></p>
</div>
here goes
Prakash Shiwakoti
@pshiwakoti1
its not displaying in html page
Tony Hudson
@ngohungphuc
hmmm I'm just tested on code pen everything work fine
f12 go to console tab
see if any error there
Prakash Shiwakoti
@pshiwakoti1
@ngohungphuc what does the line do: $("p").html(json.lat);
Tony Hudson
@ngohungphuc
is just write a text to your browser
Prakash Shiwakoti
@pshiwakoti1
Mixed Content: The page at 'https://codepen.io/pshiwakoti1/pen/XpvdYz?editors=1111' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://ip-api.com/json'. This request has been blocked; the content must be served over HTTPS.
send @ jquery.min.js:4
Tony Hudson
@ngohungphuc
check in jquery document for further
Prakash Shiwakoti
@pshiwakoti1
I removed http s part and it worked fine
But I am not sure now how to add caption before latitude
I want to say latitude is 37.77
Tony Hudson
@ngohungphuc
<p id="lat"> Latitude is :</p>
<p id="lon"> Lon is :</p>
$("#lat").html(json.lat);
$("#lon").html(json.lon);
Moisés Man
@moigithub
u can create a html structure on ur page.. and set an id..
ie:
<p>Latitude is: <span id="lat">00</span></p>
then use that id on ur selector
$("#lat").html(json.lat);