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
Nathan
@Nathandim
@chungeric Check this
$(document).ready(function(){

  var api = "http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=6d74d0390619e3ee3cfa85e3bc4ad80c&callback=?";

  $.getJSON(api, function(data){
    alert(data.coord.lon);
  });

});
CamperBot
@camperbot
:bulb: to format code use backticks! ``` more info
Nathan
@Nathandim
Basically it's what @jdtdesigns said, it needs the "&callback=?" at the end of the url to behave with codepen
JD Tadlock
@jdtdesigns
@Nathandim Not for forismatic
they use 'jsonp=?' to return jsonp
Nathan
@Nathandim
oh so it depends from the api :worried:
JD Tadlock
@jdtdesigns
yep ;)
Nathan
@Nathandim
but the goal is to get jsonp instead of just json
JD Tadlock
@jdtdesigns
for codepen, sometimes you need it
Eric Chung
@chungeric
$(document).ready( function(){
  $.getJSON("http://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&jsonp=?", function(response){
    console.log(response.quoteText);
  });
});
not working, maybe i'm doing something wrong
JD Tadlock
@jdtdesigns
@chungeric
$(document).ready( function(){
  $.getJSON("http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=?", function(json){
    console.log(json);
  });
});
works fine for me ;)
@chungeric post your codepen
Eric Chung
@chungeric
Lol even that doesn't work, ok hold on
JD Tadlock
@jdtdesigns
@chungeric Thought so. You're loading codepen over https. Remove https from the url and you're good to go. ;)
You can't load a page over secure https and then request data through http. It will throw a 'Mixed Content' error
Eric Chung
@chungeric
Oh wow, that's it?
Wait, would you happen to know why i'm on https?
JD Tadlock
@jdtdesigns
your browser will show the errors by the way in the console
ctrl shift js
Eric Chung
@chungeric
Yeah it was showing that error
JD Tadlock
@jdtdesigns
ctrl shift j
MrMacy
@MrMacy
Please help. I'm building my first portfolio page, and I'm can't seem to get any text to show belos my navigation bar. here's my code as is

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>

<link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet">

<style>
.orange-text {
color:#FF3D00!important;}
ul { background: #078; list-style-type: none;
margin: -4px;
padding: 0;
font-size: 25px;
border-color:#607D8B;

}
ul {position: fixed;
top: 5;
left:.4%;
right:.4%;
width: 100%;
}
h2 {display: inline-block;}
h2 {text-decoration: "none"; margin: -5px;}
h2 {font-family: 'Pacifico'; font-size: 40px;}
#navcontainer ul li { display: inline; }
#navcontainer ul li a { text-decoration: none; float: right; padding: 5px; margin: 5px; }


</style>

<nav class="container-fluid" id="navcontainer">

<ul class="form"> <h2 id="MrMacy"><li><a class="orange-text" href=#>MrMacy</a></li></h2><li><a class="orange-text" href=#>About</a></li><li><a class="orange-text" href=#>Portfolio</a></li><li><a class="orange-text" href=#>Contact</a></li><li><a class="orange-text" href=#>Links</a></li>
</ul></nav>

<div>


<p>aslkdjfasdfoj</p>

</div>

JD Tadlock
@jdtdesigns
codepen might have automatically loaded you through https @chungeric
Eric Chung
@chungeric
Hm okay, well thanks for the big help :) @jdtdesigns
CamperBot
@camperbot
chungeric sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 888 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
@chungeric welcome
MrMacy
@MrMacy
any help, anybody?
Nathan
@Nathandim
well now my problem is to make openworldmap get called in https then, since Chrome won't allow grabbing lat and longitude with plain http due to mixed content error
playingwithinfinity
@playingwithinfinity
@Nathandim Just open CodePen using http instead
Nathan
@Nathandim
navigator.geolocation won't work in Chrome with plain http
my other option I guess is to use an API to get lat and lon
playingwithinfinity
@playingwithinfinity
Use another API then
Erd
@alboz1
did anyone experience the same problem?
I have a background image which is fixed and is attached to a header which is height: 100vh and it works perfectly in desktop but on mobile it keeps zooming in randomly
MrMacy
@MrMacy

@MrMacy
Please help. I'm building my first portfolio page, and I'm can't seem to get any text to show belos my navigation bar. here's my code as is

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>

<link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet">

<style>
.orange-text {
color:#FF3D00!important;}
ul { background: #078; list-style-type: none;
margin: -4px;
padding: 0;
font-size: 25px;
border-color:#607D8B;

}
ul {position: fixed;
top: 5;
left:.4%;
right:.4%;
width: 100%;
}
h2 {display: inline-block;}
h2 {text-decoration: "none"; margin: -5px;}
h2 {font-family: 'Pacifico'; font-size: 40px;}
#navcontainer ul li { display: inline; }
#navcontainer ul li a { text-decoration: none; float: right; padding: 5px; margin: 5px; }


</style>

<nav class="container-fluid" id="navcontainer">

<ul class="form"> <h2 id="MrMacy"><li><a class="orange-text" href=#>MrMacy</a></li></h2><li><a class="orange-text" href=#>About</a></li><li><a class="orange-text" href=#>Portfolio</a></li><li><a class="orange-text" href=#>Contact</a></li><li><a class="orange-text" href=#>Links</a></li>
</ul></nav>

<div>


<p>aslkdjfasdfoj</p>

</div>

Eric Chung
@chungeric
@MrMacy can you post the codepen link instead?
Travmatth
@Travmatth
so i’m looking at the responses of the twitchtv api, and i’m not sure how to differentiate a nonexistent user from an offline user. i’m not sure if we need to do so in the project
MrMacy
@MrMacy
Eric Chung
@chungeric
@MrMacy Your text is just appearing behind your navigation bar, since it's fixed to the top
@MrMacy Maybe add some padding to the top of the div to push the text below the navigation bar
hernanfinucci
@hernanfinucci
heyy does someone know why doesn´t this js code work?
MrMacy
@MrMacy
@chungeric thank you, that worked. First time I wasn't able to figure it out by googling
CamperBot
@camperbot
mrmacy sends brownie points to @chungeric :sparkles: :thumbsup: :sparkles: