<head>
<!-- include flatWeatherPlugin.css and copy the font folder to one folder above your /css folder -->
<link href="path/to/css/ flatWeatherPlugin.css" rel="stylesheet">
<!-- include a copy of jquery (if you haven't already) -->
<script src="path/to/js/jquery-2.1.1. min.js"></script>
<!-- include flatWeatherPlugin -->
<script src="path/to/js/jquery. flatWeatherPlugin.js"></script >
<script type="text/javascript">
$(document).ready(function() {
//Setup the plugin, see readme for more examples
var example = $("#example").flatWeatherPlugi n({
location: "Boston, MA", //city and region *required
country: "USA", //country *required
//optional:
api: "openweathermap", //default: openweathermap (openweathermap or yahoo)
//apikey: "your-api-key", //optional api key for openweather
view : "partial", //default: full (partial, full, simple, today or forecast)
displayCityNameOnly : true, //default: false (true/false) if you want to display only city name
forecast: 4, //default: 5 (0 -5) how many days you want forecast
render: true, //default: true (true/false) if you want plugin to generate markup
loadingAnimation: true //default: true (true/false) if you want plugin to show loading animation
//units : "metric" or "imperial" default: "auto"
});
});
</script>
</head>
<body>
<!-- have a target for where you want it shown -->
<div id="example"></div>
</body>
How can I show this jQuery code in practice
--
unfortunately I do not understand the question, you might want to elaborate
--
How Can I Show jQuery code of my app
--
sorry, I still don't understand
please explain in detail what you are trying to do
--
I'm 'll show it on the web with the weather code. How can I integrate it into app
--
--
you can try to use the webviewer
During development, you have to use the development path to the embedded html document:
file:///mnt/sdcard/ AppInventor/assets/<NAME OF YOUR HTML FILE>.html
Before packaging the app, use the production path.
file:///android_asset/<NAME OF YOUR HTML FILE>.html
--
1. upload the 3 libraries as assets into App Inventor
2. modify the html file (remove the paths to the libraries, see below, everything is in one directory...)
<!-- include flatWeatherPlugin.css and copy the font folder to one folder above your /css folder -->
<link href="flatWeatherPlugin.css" rel="stylesheet">
<!-- include a copy of jquery (if you haven't already) -->
<script src="jquery-2.1.1.min.js"></sc ript>
<!-- include flatWeatherPlugin -->
<script src="jquery.flatWeatherPlugin. js"></script>
<link href="flatWeatherPlugin.css" rel="stylesheet">
<!-- include a copy of jquery (if you haven't already) -->
<script src="jquery-2.1.1.min.js"></sc
<!-- include flatWeatherPlugin -->
<script src="jquery.flatWeatherPlugin.
3. upload the modified html file as asset into AppInventor
4. and use the correct path to the html file, see also here https://puravidaapps.com/ tutorials.php#html
During development, you have to use the development path to the embedded html document:
file:///mnt/sdcard/
Before packaging the app, use the production path.
file:///android_asset/<NAME OF YOUR HTML FILE>.html
댓글 없음:
댓글 쓰기