Question…..So I have a website in which I used the json weather javascript code to display weather…up near the top:
[URL=”http://www.apartmenthotelmiamibeach.com/”]weather
I tried it on our other website but it failed miserably..It’s supposed to be above the “our hotels” image. All you see is text…not even the correct weather text:
[URL=”http://www.southbeachgroup.com/”]other website
The javascript is near the bottom:
<script type=”text/javascript”>
setTimeout(function(){
$.jsonp({
type: ‘get’,
url: ‘
dataType: ‘jsonp’,
callbackParameter: “callback”,
error: function(xhr, status, error) {
$(‘#weather’).hide();
},
success: function(data) {
$(‘#weather span’).html( (data.weatherObservation.clouds == ‘n/a’ ? ‘clear’ : data.weatherObservation.clouds) + ‘ and ‘ + Math.round( (1.8 * parseFloat(data.weatherObservation.temperature)) + 32) + ‘°’);
}
});
}, 1000);
</script>
Can anyone tell me why it is not working? ?