Permalink
Browse files

more jquery integration documentation

  • Loading branch information...
1 parent 8a19ac7 commit 04897b2d6815ebce59c94cdcc6054c2b3541c857 @rsaccon rsaccon committed Nov 3, 2010
Showing with 16 additions and 10 deletions.
  1. +4 −0 README.md
  2. +12 −10 docs/jquery.md
View
@@ -38,6 +38,10 @@ There are a few `persistence.js` plug-ins available that add functionality:
the database schema), see `docs/migrations.md` for more information.
* `persistence.sync.js`, supports database synchronization with a
remote server, see `docs/sync.md` for more information.
+* `jquery.persistence.js`, adds jQuery integration, including
+ jQuery-mobile ajax request interception and re-routing to persistencejs,
+ see `docs/jquery.md` for more information and `demo/jquerymobile` for a
+ simple demo.
A Brief Intro to Async Programming
----------------------------------
View
@@ -25,26 +25,28 @@ Simple example:
You can find more examples in `test/test.persistence-jquery.js`.
-jQuery mobile integration
-=========================
-jQuery mobile (jqm) ajax request re-routing to persitencejs for:
+## jQuery mobile integration
+jQuery mobile (jqm) ajax request re-routing to persitencejs for:
+
* html page loading (caches the page in local DB)
* form submission
re-routed URL paths have the following format:
- `optional/path/prefix / entity-name / path/to/response-template-key`
+
+ optional/path/prefix / entity-name / path/to/response-template-key
+
+URL needs to match the following criteria for re-routing:
-URL needs to match the following criteria for re-routing:
* path prefix must be equal `persistence.jqmUrlPathPrefix`
* entity with given entity-name must exist
Global settings (and it's default values):
-------------------------------------------
-`persistence.jqmUrlPathPrefix = ""`
-`persistence.jqmTemplateKeyField = "path"` Page entity template-key field name
-`persistence.jqmDataField`= "data" Page entity template data field name
-*IMPORTANT:* Images need to be embedded into HTML response via data URL's)
+ persistence.jqmUrlPathPrefix = ""
+ persistence.jqmTemplateKeyField = "path" (Page entity template-key field name)
+ persistence.jqmDataField`= "data" (Page entity template data field name)
+
+**Images need to be embedded into HTML response via data URL's**
Ajax page loading example:

0 comments on commit 04897b2

Please sign in to comment.