What am I doing wrong with the following code that is not displayed in HTML? When I modify it and the page is HTTP, it works perfect, but when using an HTTPS web, it does not show anything.
<script type = "text/javascript" language = "javascript">
jQuery(document).ready(function($) {
$.getJSON('https://las.api.pvp.net/api/lol/las/v1.4/summoner/by-name/mohademago?api_key=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx', function(data) {
var data = data;
$("<p/>", {
html: 'ID: ' + data.mohademago.id
}).appendTo("body");
$("<p/>", {
html: 'Nombre: ' + data.mohademago.name
}).appendTo("body");
}).fail(function() {
console.log('Error al consumir la API!');
});
});
</script>
This is the structure
{
"mohademago": {
"id": 4294825,
"name": "mohademago",
"profileIconId": 1594,
"revisionDate": 1491930966000,
"summonerLevel": 30
}
}