Skip to content

Instantly share code, notes, and snippets.

View dhavaln's full-sized avatar
💭
I may be slow to respond.

Dhaval Nagar dhavaln

💭
I may be slow to respond.
View GitHub Profile
@dhavaln
dhavaln / AndroidManifest.xml
Created June 5, 2012 06:57
Cordova 1.7 Simple Test
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dhavaln.phonegap"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
@dhavaln
dhavaln / footer.html
Created June 6, 2012 05:42
jQuery mobile fixed footer
@dhavaln
dhavaln / index.html
Created June 6, 2012 10:39
jQuery Mobile Listview Filter Test
<!DOCTYPE HTML>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.7.1.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css"></link>
</head>
<body>
<div data-role="page" id="home">
@dhavaln
dhavaln / index.html
Created June 6, 2012 10:41
jQuery Mobile Listview Filter Test
<!DOCTYPE HTML>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.7.1.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css"></link>
</head>
<body>
<div data-role="page" id="home">
@dhavaln
dhavaln / index.html
Created June 7, 2012 05:44
Include Phonegap/Cordova JS based on the Device
<!DOCTYPE HTML>
<html>
<!DOCTYPE HTML>
<head>
<meta name="viewport" content="width=320; user-scalable=no" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>PhoneGap Test</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.css" >
<script type="text/javascript" charset="utf-8"
@dhavaln
dhavaln / filesystem.js
Created June 8, 2012 08:51
PhoneGap Filesystem Example
/**
* Prepare the App Folder
*/
(function(){
window.appRootDirName = ".myapp";
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log("device is ready");
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
@dhavaln
dhavaln / filesystem_test.html
Created June 9, 2012 14:22
PhoneGap Nested Directory Create Sample
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" charset="utf-8" src="lib/android/cordova-1.7.0.js"></script>
<script type="text/javascript">
(function(){
@dhavaln
dhavaln / App.java
Created June 13, 2012 04:59
Android to Javascript Call in Phonegap
public class App extends DroidGap {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("file:///android_asset/www/index.html");
Thread t = new Thread() {
public void run() {
try {
for (int i = 0; i < 10; i++) {
@dhavaln
dhavaln / index.html
Created June 22, 2012 07:14
jQuery iFrame Draggable Test
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>jQuery iFrame Draggable Test</title>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.8.18/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="/css/normalize.css">
var db;
var dbpath;
var dbCreated = false;
var scroll = new iScroll('wrapper', { vScrollbar: false, hScrollbar:false, hScroll: false });
var id1;
var email;
var picture;
var xDESC;
var xName;
var userNome;