I am creating Windows Phone 8 HTML 5 App. I trying to ajax post for getting weather information. But i am not getting any response. I am unable to trace the problem behind it.
$(document).ready(function () {
var apiUrl = "http://api.worldweatheronline.com/free/v1/weather.ashx?q=London&format=json&num_of_days=5&key=KEY GOES HERE";
//CALL BACK FUNCTION
function mapWeather() {
$("#contentPanel").text("111");
$.ajax({
url: apiUrl,
type: 'GET',
success: function (data) {
$("#contentPanel").text("adfdf");
}
});
}
});
HTML
<div id="row-fluid">
<div class="input-append">
<input type="text" id="searchCity" />
<button type="button" id="addCity" unselectable="on" class="btn btn-primary" onclick="mapWeather()">+</button>
</div>
<div id="contentPanel">
testing
</div>
</div>