in jquery mobile when press to reload the
<button data-icon=“arrow-d” data-iconpos=“left” id=“newsButton”
does not… only load with:
$(document).ready(function(e) {
$("newsButton").on("click", function(event, ui) {
news();
});
news();
loadDB();
});
<div data-role="header"
data-position="fixed"
data-id="vs_header">
<h1>News/Events - Polis</h1>
<a href="#" data-rel="back" data-icon="arrow-l" data-iconpos="left">Back</a>
<a href="#home0" data-icon="home" data-iconpos="notext">Home</a>
</div>
<div data-role="content">
<button data-icon="arrow-d" data-iconpos="left" id="newsButton" data-theme="b">Load News/Events/Announcements</button>
<div id="newsFeed">
</div>
</div>
function news() {
var url = "announcements.php";
$('#newsFeed').html(spinner).load(url, function(responseTxt, statusTxt, xhr) {
if(statusTxt=="error")
$('#newsFeed').html("Error: "+xhr.status+": "+xhr.statusText+". Check your Internet Connection, is Required!");
});
e.preventDefault();
}