-1
I am trying for several hours to consume the links of the images of a web service through Ajax and I can’t, this is the web service link (https://api.tenor.com/v1/search?q=happy).
The goal is to take the link of the image and show the image on the screen. It says that this indefinite link, I have no idea why this is happening.
See my code:
$(function(){
$.ajax({
url:'https://api.tenor.com/v1/search?q=happy',
type:'GET',
dataType:'json',
beforeSend:function(){
$('.gifs').html('<div class="col-md-12"><i class="fas fa-7x fa-spinner fa-spin"></i></div>');
},
success:function(json){
var html = '';
for(var i in json){
html += '<div class="col-md-4"><div class="filme"><img src="'+json[i].weburl+'"/>'+'</div></div>';
}
$('.gifs').html(html);
}
});
});
Hello. Unfortunately it hasn’t worked out yet. When inspecting elements there is the image url in the code, but "strangely" still doesn’t appear on the page.
– Gileno Mascarenhas
I edited the answer, the images are showing
– Bins
Now yes! Thank you so much for your help.
– Gileno Mascarenhas