title: javascript - geolocation not working in codepen
body: <p>I'm trying to implement a simple weather app in codepen. The app works fine on localhost 
  It asks for permission to use navigator.geolocation and if accepted it shows the weather,
  but on codepen it's not even asking for permission.</p>
  
  <p>here is the link</p>
  
  <p><a href="http://codepen.io/asamolion/pen/BzWLVe" rel="noreferrer">http://codepen.io/asamolion/pen/BzWLVe</a></p>
  
  <p>Here is the JS function </p>
  
  <pre><code>function getWeather() {
      'use strict';
      $('#getWeatherButton').hide();
      if (navigator.geolocation) {
          navigator.geolocation.getCurrentPosition(function (position) {
              var url = 'http://api.openweathermap.org/data/2.5/weather?APPID=53ac88144e6ee627ad0ed85277545ff9';
              //            var url = 'example.js';
              var apiCall = url + '&amp;lat=' + position.coords.latitude + '&amp;lon=' + position.coords.longitude;
              //            window.location.href = apiCall;
              $.getJSON(apiCall, function (json) {
                  setSkycon(parseInt(json.weather[0].id, 10));
                  $('#location').html(json.name + ', ' + json.sys.country);
                  var temp = (Math.round((json.main.temp - 273.15) * 100) / 100);
                  $('#temp').html(temp + '&lt;span id="degree"&gt;&amp;deg;&lt;/span&gt;&lt;span id="FC" onclick="convert()"&gt;C&lt;/span&gt;');
                  $('#condition').html(json.weather[0].main);
              });
  
          });
      }
  };
  </code></pre>
  
  <p>Can anybody tell me why codepen is not asking for permission?</p>