This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// check if localStorage is available | |
if(typeof localStorage !== 'undefined'){ | |
// get the saved data if it's available | |
var localNewsJSON = localStorage.getItem('SpiritNews'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if the page ist loaded call getNews() | |
$(document).ready(function(){ | |
getNews(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-role="page" data-theme="b"> | |
<button data-role="button" data-icon="refresh" | |
onclick="getNews(true);" data-theme="b">Update!</button> | |
<div data-role="content" id="content"></div><!-- /content --> | |
</div><!-- /page --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Spirit HTML5 App</title> | |
<meta charset="utf-8"/> | |
<!-- Import the libraries --> | |
<link rel="stylesheet" href="jquery.mobile.min.css" /> | |
<script src="jquery.min.js"></script> | |
<script src="jquery.mobile.min.js"></script> | |
<script src="textile.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a webView | |
WebView webView = (WebView)findViewById(R.id.webView); | |
// enable some settings | |
WebSettings settings = webView.getSettings(); | |
settings.setJavaScriptEnabled(true); | |
settings.setDomStorageEnabled(true); | |
// use the WebChromeClient | |
webView.setWebChromeClient(new WebChromeClient()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(document).ready(function(){ | |
$("#pageone").bind("swipeleft", function(event,ui){ | |
$.mobile.changePage($("#pagetwo")); | |
}) | |
$("#pagetwo").bind("swiperight", function(event,ui){ | |
$.mobile.changePage($("#pageone")); | |
}) | |
}); |
NewerOlder