forked from axemclion/jquery-indexeddb
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added default options to createIndex function.
- Loading branch information
Parashuram
committed
Feb 24, 2012
1 parent
3f52040
commit d4e70b1
Showing
6 changed files
with
97 additions
and
20 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
Documentation for the IndexedDB APIs will go here | ||
Jquery-IndexedDB API Reference | ||
=============================== | ||
|
||
$.indexedDB | ||
----------- | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>A self contained example for the Jquery-IndexedDB plugin</title> | ||
</head> | ||
<body> | ||
<h1>Jquery IndexedDB API example</h1> | ||
<div id = "controls"> | ||
<a href = "javascript:loaddata()">Load Data from Database</a> | ||
<a href = "javascript:()"></a> | ||
</div> | ||
<table id = "content"> | ||
<tr class = "sample"> | ||
<td class = "key"> | ||
</td> | ||
<td class = "value"> | ||
</td> | ||
</tr> | ||
</table> | ||
<div id = "console"> | ||
</div> | ||
<!-- Main IndexedDB Example functions --> | ||
<script type = "text/javascript"> | ||
var key = null; | ||
var dbConnection = $.indexedDB("ECommerceSite", { | ||
"schema": { | ||
"1": function(versionTransaction){ | ||
var catalog = versionTransaction.createObjectStore("catalog", { | ||
"keyPath": "itemId" | ||
}); | ||
catalog.createIndex("") | ||
} | ||
} | ||
}); | ||
|
||
function loaddata(){ | ||
dbConnection.objectStore("objectStore1").each(function(elem){ | ||
var row = document.getElementsByClassName("sample")[0].innerHTML; | ||
}); | ||
} | ||
</script> | ||
<!-- End of Main IndexedDB Example functions --> | ||
<!-- Helper functions --> | ||
<script tyoe = "text/javascript"> | ||
var console = { | ||
"log": function(msg){ | ||
|
||
} | ||
}; | ||
</script> | ||
</body> | ||
</html> |
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
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
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