Working on an app using jQuery with the SimpleWeather plugin for HTML5 and Cordova.
Looking to overlay a background-image with the temperature.
-HTML-HEAD-
$(document).ready(function() {
$.simpleWeather({
location: '',
woeid: '12474497',
unit: 'c',
success: function(weather) {
html = '<p>'+weather.temp+'°'+weather.units.temp+'</p>';
$("#weather").html(html);
},
error: function(error) {
$("#weather").html('<p>'+error+'</p>');
}
});
});
-HTML-
<div id="third" class="top_navi">
<div id="weather">
<a href="#" onclick="window.open('http://mobile.wetter.com/', '_blank', 'location=no')"></a>
</div>
</div>
-CSS-
#third{
background:url(../img/start/btnweather.jpg);
width: 95px;
height: 45px;
}
#third a{
width: 100%;
height: 100%;
display: block;
}
Link works fine without including the Temperature. How do I display the temperature and also keep the link functional?