This is my code. I am trying to check if I am able to get the data from the api. Putting the api url in the browser shows the json data but console.log does not show anything.
$('document').ready(function() {
$('#lesotho').click(function() {
var request = $.ajax({
url: "https://cors-anywhere.herokuapp.com/http://universities.hipolabs.com/search?country=lesotho",
dataType: "jsonp"
});
request.done(function(data) {
console.log(data);
});
});
});