I'm trying to access an API via jquery with ajax , here's my code
$(document).ready(function(){
function kimonoCallback(data) {
var ticker = '<ul id="webticker">';
var url = data.results.collection[i].alaune;
$.each(url,function(i, news ){
ticker += '<li>';
ticker += '<a href="'+ news.href+ '">';
ticker += '<img src="img/ticker_sep.png" alt="sep"/>';
ticker += '"'+ news.text +'" </a></li>';
});
ticker += '</ul>';
$('#tickernews').html(ticker);
}
$.ajax({
"url":"https://www.kimonolabs.com/api/d7dujppi?apikey=xxxxxxxxxxxxxxxxxxxx&callback=kimonoCallback",
"crossDomain":true,
"dataType":"jsonp"
});
});
when i try to see the results in the webpage nothing come up no error in the console. so how do i make the request and display the text my webpage.
check the api here