PhoneGap jQuery Mobile - xcode

I'm trying to make a PhoneGap app using jquerymobile, but it doesn't seem to work...
In my index.html I wrote below code;
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
<meta charset="utf-8">
<link rel="stylesheet" href="css/jquery.mobile-1.1.0.min.css"/>
<script type="text/javascript" charset="utf-8" src="cordova-1.8.1.js"></script>
<script type="text/javascript" charset="utf-8" src="javascripts/jquery-1.7.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="javascripts/jquery.mobile-1.1.0.min.js"></script>
<script type="text/javascript">
</script>
I put jquery mobile files into my www file.
Could someone teach me how to read jquery file using PhoneGap??
I'm sorry for my English is not good...
Thank you in advance.

I have some sample applications in github repository which you can use for reference.
cordova-examples
phonegap with jquery mobile

Related

Error Create Canvas not defined- While trying to save sample project

I am trying to learn Java Script and I referring to Daniel Shiffman videos. I have installed Bracket and have downloaded the example project, On writing an implementation for setup and draw method I am getting the error [ERROR: createCanvas is not defined] in the ESLint(4) editor console.
I have attached the screenshot for reference.
referred the link (https://forum.processing.org/two/discussion/20819/getting-started-with-p5-js-using-brackets-having-problems) but that did not resolve my issue.
The video that I am looking in is https://www.youtube.com/watch?v=nmZbhManVcY
Update: When I click on Index.html it opens perfectly fine in the browser. The problem is only at the editor.
Index.html:
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>p5.js example</title>
<style> body {padding: 0; margin: 0;} </style>
<script src="p5.js"></script>
<script src="p5.sound.js"></script>
<script src="sketch.js"></script>
</head>
<body>
</body>
OputPut:

Why does Magento 2 new theme from scratch has many js files included?

I am just beggining to learn Magento and would like a thougrogh explanation if possible.
I just created a new theme from scratch with NO parent theme, and I found many JS and two CSS files included by default.
Here is a sample:
<link rel="stylesheet" type="text/css" media="all"
href="http://192.168.1.9/magento/pub/static/version1495681460/frontend/btata/themeone/en_US/mage/calendar.css">
<link rel="icon" type="image/x-icon"
href="http://192.168.1.9/magento/pub/static/version1495681460/frontend/btata/themeone/en_US/Magento_Theme/favicon.ico">
<link rel="shortcut icon" type="image/x-icon"
href="http://192.168.1.9/magento/pub/static/version1495681460/frontend/btata/themeone/en_US/Magento_Theme/favicon.ico">
<script type="text/javascript"
src="http://192.168.1.9/magento/pub/static/version1495681460/frontend/btata/themeone/en_US/requirejs/require.js"></script>
<script type="text/javascript"
src="http://192.168.1.9/magento/pub/static/version1495681460/frontend/btata/themeone/en_US/mage/requirejs/mixins.js"></script>
<script type="text/javascript"
src="http://192.168.1.9/magento/pub/static/version1495681460/_requirejs/frontend/btata/themeone/en_US/requirejs-config.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="http://192.168.1.9/magento/pub/media/styles.css">
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="jquery"
src="http://192.168.1.9/magento/pub/static/version1495681460/frontend/btata/themeone/en_US/jquery.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_"
data-requiremodule="jquery/jquery.mobile.custom"
src="http://192.168.1.9/magento/pub/static/version1495681460/frontend/btata/themeone/en_US/jquery/jquery.mobile.custom.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="js/responsive"
src="http://192.168.1.9/magento/pub/static/version1495681460/frontend/btata/themeone/en_US/js/responsive.js"></script>
My questions are:
1- Do I have to keep those files?
2- If not, how to remove them?
3- Why are some of them missing? see picture.
Missing files
Thanks

MicrosoftAjax.js is not loaded successfully in word web add in

I am building a word web add-in with VS2015 and pretty much randomly (I don't change anything, then get this new error) office.js will crash with the error
0x800a139e - JavaScript runtime error: MicrosoftAjax.js is not loaded successfully.
It is super frustrating because I cannot always repeat the error and the javascript engine afterwards completely crashes causing me to restart visual studio and reload the project (NOT fun when doing a live demo)
EDIT: attached html calling for officejs
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title></title>
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/1.0/fabric.min.css">
<link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/1.0/fabric.components.min.css">
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>
<!-- To enable offline debugging using a local reference to Office.js, use: -->
<!-- <script src="../../Scripts/Office/MicrosoftAjax.js" type="text/javascript"></script> -->
<!-- <script src="../../Scripts/Office/1/office.js" type="text/javascript"></script> -->
<link href="../App.css" rel="stylesheet" type="text/css" />
<script src="../App.js" type="text/javascript"></script>
<link href="Home.css" rel="stylesheet" type="text/css" />
<script src="Home.js" type="text/javascript"></script>
</head>
I know I am a little late on the answer, but I ran into the same issue. This microsoft dev article addresses and provides the solution to this issue.
https://dev.office.com/blogs/Office-Store-add-in-validation-changes-using-MicrosoftAjax-js
Basically the new office.js script in the html, that used to load microsoft ajax does not any longer since 2016. i.e.
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>
Some functions like Excel.run were checking to make sure microsoft ajax was loaded and not working for me in an Excel add-in. The solution is to just load ajax yourself, or if not using ajax reference the microsoft dev announcement above and load a different office.js package the announcement provides.

some bug in FireFox polymer.dart | dart2js

Could you please help me to detect and fix same bug in the simple Click Counter application.
I generated the Click Counter application from Dart Editor (New project -> simple web application using polymer library..)
Now I want to add Social Likes functionality (see http://sapegin.github.io/social-likes/.)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sample app</title>
<!-- include the web_components polyfills with support for Dart. -->
<script src="packages/web_components/platform.js"></script>
<script src="packages/web_components/dart_support.js"></script>
<!-- import the click-counter -->
<link rel="import" href="clickcounter.html">
<link rel="stylesheet" href="cc.css">
<link rel="stylesheet" type="text/css" href="social-likes_birman.css" />
<script type="text/javascript" src="jquery-1.11.1.js"></script>
<script type="text/javascript" src="social-likes.min.js"></script>
</head>
<body>
<h1>Cc</h1>
<p>Hello world from Dart!</p>
<div id="sample_container_id">
<click-counter count="5"></click-counter>
</div>
<div class="social-likes">
<div class="facebook">Facebook</div>
<div class="twitter">Twitter</div>
<div class="plusone">Google+</div>
</div>
<!-- bootstrap polymer -->
<script type="application/dart">export 'package:polymer/init.dart';</script>
<script src="packages/browser/dart.js"></script>
</body>
</html>
This code works perfect in Dartium and Chrome, but doesn't work in Firefox (the styles of Social Likes is not applied! The web console of FireFox doesn't contain any error..
Dart Editor version 1.7.0.dev_04_06 (DEV)
Dart SDK version 1.7.0-dev.4.6
Firefox 33
The code of application is attached to this issue.
I really don't understand what is wrong. Is there a bug in FireFox or polymer or dart2js? This bug is very critical for me...

Application Cache - net::ERR_FAILED

I'm trying to build an offline web form. It only uses jQuery and twitter bootstrap as external resources. I've tried to cache them but when I refresh offline I get net::ERR_FAILED for both jQuery and bootstrap. I'm very new to AppCache so any help is appreciated. Here is my manifest and where I'm including things in my html:
CACHE MANIFEST
../style-bootstrap.css
http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
NETWORK:
*
HTML:
<!DOCTYPE html>
<html lang="en-us" manifest="/includes/pouchcontacts.manifest" type="text/cache-manifest">
<head>
<meta charset="utf-8" />
<title>Contacts [OFFLINE]</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="style-bootstrap.css">
</head>

Resources